FreeBSD 6.2 Raid-1
How to setup software raid-1 during installation of FreeBSD 6.2.
Pre req; Server with two sata harddrives prefered same brand and make.
Assume,
Hdd 1 = ad0
Hdd 2 = ad1
Start installation, select ad0 as hdd, choose packages add some accounts etc. But DO NOT REBOOT when done!
Go back to installation and start "Fix it" shell (ALT+F4)
# sysctl kern.geom.debugflags=16
# gmirror label -v -b round-robin gm0 /dev/ad0
# echo geom_mirror_load="YES" >> /boot/loader.conf
# vi /etc/fstab
Edit : i
add /mirror/ after dev and change ad0 to gm0
Real world example below
Device Mountpoint FStype Options Dump Pass
/dev/mirror/gm0s1b none swap sw 0 0
/dev/mirror/gm0s1a / ufs rw 1 1
/dev/mirror/gm0s1e /tmp ufs rw 2 2
/dev/mirror/gm0s1f /usr ufs rw 2 2
/dev/mirror/gm0s1d /var ufs rw 2 2
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
Check config and reboot
Continue below if reboot successful
# gmirror insert gm0 /dev/ad1
# gmirror status
Check status, ad1 (hdd 2) should start rebuilding from ad0 (hdd 1)
Source
http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html
Pre req; Server with two sata harddrives prefered same brand and make.
Assume,
Hdd 1 = ad0
Hdd 2 = ad1
Start installation, select ad0 as hdd, choose packages add some accounts etc. But DO NOT REBOOT when done!
Go back to installation and start "Fix it" shell (ALT+F4)
# sysctl kern.geom.debugflags=16
# gmirror label -v -b round-robin gm0 /dev/ad0
# echo geom_mirror_load="YES" >> /boot/loader.conf
# vi /etc/fstab
Edit : i
add /mirror/ after dev and change ad0 to gm0
Real world example below
Device Mountpoint FStype Options Dump Pass
/dev/mirror/gm0s1b none swap sw 0 0
/dev/mirror/gm0s1a / ufs rw 1 1
/dev/mirror/gm0s1e /tmp ufs rw 2 2
/dev/mirror/gm0s1f /usr ufs rw 2 2
/dev/mirror/gm0s1d /var ufs rw 2 2
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
Check config and reboot
Continue below if reboot successful
# gmirror insert gm0 /dev/ad1
# gmirror status
Check status, ad1 (hdd 2) should start rebuilding from ad0 (hdd 1)
Source
http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html
0 Comments:
Skicka en kommentar
<< Home