What are some better ways to turn on RAID level 0 in OpenBSD 4.2 -
stable - and still stay with the GENERIC kernel?

My first try worked but I went about it by making a new kernel, which is
frowned upon and probably adds unneeded steps.  However, here's the change :

         # diff GENERIC GENERIC.RAID
         729c729
         < #pseudo-device       raid    4       # RAIDframe disk driver
         ---
         > pseudo-device        raid    4       # RAIDframe disk driver


To put it into context here are the steps to make the RAID device:

         # prepare first drive unit
         fdisk -i wd1
         disklabel -E wd1
         newfs -q wd1a

         # prepare second drive unit
         fdisk -i wd2
         disklabel -E wd2
         newfs -q wd2a

         # raid specifications
         cat << CONF > /etc/raid0.conf
         START array
         1 2 0
         START disks
         /dev/wd1a
         /dev/wd2a
         START layout
         128 1 1 1
         START queue
         fifo 100
         CONF

         # first-time configuration
         raidctl -C /etc/raid0.conf raid0
        
         # check is it there
         raidctl -s raid0

         # create disklable and file system on raid device
         disklabel -E raid0
         newfs -q raid0a

         # set mount options
         cat << FSTAB > /etc/fstab
         /dev/raid0a /raid ffs rw,nodev,nosuid 1 2
         FSTAB
        
         # create mount point
         mkdir /raid && mount

         # check and re-initialize the parity
         raidctl -vP raid0
         # rebuild
         raidctl -R /dev/wd1a raid0

Regards
-Lars

Reply via email to