JSP - Johnson's Server Project
SERVER - Setup for Raid 5


Front view of server
ad2 (backup)Water
Pump
ad0 - Main
ad4 (Blue Cable Primary) ad6 (Black Cable Primary)
ad5 (Blue Cable Secondary) ad7 (Black Cable Secondary)
ad8 (Red Cable Primary) ad10 (Purple Cable Primary)
ad9 (Red Cable Secondary) ad11 (Purple Cable Secondary)
mir1ad4 & ad8
mir2ad5 & ad9
mir3ad6 & ad10
mir4ad7 & ad11

Ignore the VINUM section - I've since gone to GMIRROR

<
Partition Disks Create a partition for each RAID disk - for RAID 5, each disk must be the same size.
Use /stand/sysinstall since beginning and end cylinder locators are automatically calculated
run /stand/sysinstall
Do Post Install Configuration

Pick Disk Slice Editor
Create a Slice (Use A (all) option) for ad4, ad5, ad6
W (Write)
Leave Boot Record untouched
Q (Quit)
Disk Labels Now create disk labels for each of these disks.
run /stand/sysinstall
Do Post Install Configuration

Pick Disk Label Editor
Create a label for ad4, ad5, .. ad11 (8 disks)
Accept the full size of the selected slice
Select FS (File System)
Enter a dummy mount point (such as /d4, /d5, ... /d11)
W (Write) (apparently the disk is formatted here since it takes a while)
Q (Quit)
Start GMIRROR # gmirror load
Create the mirrors # gmirror label -v -b round-robin mir1 ad4
Do this for mir1 (ad4), mir2 (ad5), mir3 (ad6) mir4 (ad7)
Create the file systems

(Don't do this if ad4, etc already have valid data)
# newfs /dev/mirror/mir1
(and for mir2, 3, 4)
Create the directories # cd /
# mkdir mraid
# cd /mraid
# mkdir mir1
(, mir2, mir3, mir4)
Mount the mirrors # mount /dev/mirror/mir1 /mraid/mir1  (, mir1, mir2, mir4)
Add the other disks to the mirrors gmirror insert mir1 ad8
mir2 with ad9, mir3 with ad10, mir4 with ad11
Status Checks# gmirror status
Autostart of GMirror Add geom_mirror_load="YES" in /boot/loader.conf
Automount of mirror drives edit /etc/fstab
add
/dev/mirror/mir1 /mraid/mir1 usr rw 1 1
/dev/mirror/mir2 /mraid/mir2 usr rw 1 1
/dev/mirror/mir3 /mraid/mir3 usr rw 1 1
/dev/mirror/mir4 /mraid/mir4 usr rw 1 1
One disk failed. Replace it with a brand new one: gmirror forget data
gmirror insert data da1