Migrating to gmirrored RAID1

Henry Karpatskij henkka at spheroid.fi
Mon Aug 18 09:58:53 UTC 2008


I have a failing IDE disk which is running my 7.0-p1 server. I've been  
investigating the possible solutions and I've decided to go with two  
new IDE disks and gmirror. However, I'm not too familiar with disk  
internals, I know how to install the system and somehow understand the  
concept of slices and partitions, but that's about it.

I found some examples on how to install the gmirror on a running  
system, but they all have in common that they just add new spare disk  
to the system and turn on the mirroring to it, but I need to replace  
the current disk which is not the same size as the new ones.

Any suggestions how one would do such an operation? Should I just re- 
install the server to a new disk, turn on the mirroring and then  
restore the configuration and files from the failing disk? Or is it  
easier to add the disks to the running system, turn on mirroring and  
then somehow dump the current disk to the mirror and then re-configure  
it to boot from the gmirror and remove the failing disk?

Current df output:

Filesystem  1K-blocks    Used    Avail Capacity  Mounted on
/dev/ad0s1a    507630  159262   307758    34%    /
devfs               1       1        0   100%    /dev
/dev/ad0s1e    507630      56   466964     0%    /tmp
/dev/ad0s1f  33573476 6044408 24843190    20%    /usr
/dev/ad0s1d   1762414  381632  1239790    24%    /var
devfs               1       1        0   100%    /var/named/dev

Thanks in advance,

Henry Karpatskij

More information about the freebsd-questions mailing list