howto software raid under FreeBSD?
4711 at chello.at
Sun Oct 31 19:15:50 PST 2004
On Sunday 31 October 2004 23:33, Matthias F. Brandstetter wrote:
> Any docs for gmirror except man page out there anywhere? Something like how
> to use it for root file system, how to convert a non-gmirror system,
> kernel configuration etc.
Short time ago there was a thread on the current list:
If you use the whole disk as provider and your disk has left free 512 bytes
after the end of the last slice, gmirror setup works very easy and fast (no
need to use dump/restore or dd):
- Boot into the live-filesystem.
- Do a 'gmirror load' and label your "old" disk with 'gmirror label -v ...'.
- Mount the (now mirrored) / partition on /mnt.
- echo 'geom_mirror_load="YES"' >> /mnt/boot/loader.conf
- echo 'swapoff="YES"' >> /mnt/etc/rc.conf
- Edit /mnt/etc/fstab to reflect the newly created mirror devices.
- Add a second disk to the mirror: 'gmirror insert -v ...'.
- If you use gdm replace 'reboot' by 'shutdown -r now'.
This also works for an already existing ataraid raid1 array, you just need to
delete the mirror before you start with the gmirror setup.
That's how gmirror converted my devices when I a command like:
'gmirror label -v -b split -s 4096 mirror0 ad4':
slice /dev/ad4s1 --> /dev/mirror/mirror0s1
/ /dev/ad4s1a --> /dev/mirror/mirror0s1a
swap /dev/ad4s1b --> /dev/mirror/mirror0s1b
raw --> /dev/mirror/mirror0s1c
/usr /dev/ad4s1d --> /dev/mirror/mirror0s1d
/home /dev/ad4s1e --> /dev/mirror/mirror0s1e
If you have a more complex slice/partition setup, it's a good idea to do at
least a fine backup of your disklabels before you start conversion.
Christian Hiris <4711 at chello.at> | OpenPGP KeyID 0x3BCA53BE
OpenPGP-Key at hkp://wwwkeys.eu.pgp.net and http://pgp.mit.edu
More information about the freebsd-questions