Diff for /wikisrc/set-up_raidframe.mdwn between versions 1.6 and 1.7

version 1.6, 2011/07/06 03:51:16 version 1.7, 2011/07/13 15:17:25
Line 4  After posting lots of questions, and get Line 4  After posting lots of questions, and get
   
 So ...  So ...
   
 Here's what I did recently to get raidframe(4) up and running on my new server.  Here's what I did recently to get  [[!template id=man name="raid" section="4"]] up and running on my new server.
   
 1. This is really important!  Read the man page for raidctl(8).  It is a long man page, but it is important to understand how things work.  And there are some actual examples towards the end, which will only make sense if you've read the intro material.  Don't be intimidated by all the detail, just RTFM before you start!  1. This is really important!  Read the man page for  [[!template id=man name="raidctl" section="8"]].  It is a long man page, but it is important to understand how things work.  And there are some actual examples towards the end, which will only make sense if you've read the intro material.  Don't be intimidated by all the detail, just RTFM before you start!
   
 2. Use dd(1) to completely erase the drives.  This is useful to make sure that any existing labels/wedges/etc. get removed, and also makes it easier to initialize the raidset parity.  On Western Digital SATA-II 500GB drive, it took less than two hours (each) for this step.  (The operation starts off at ~110GB/sec, but will get slower as the heads get closer to the center of the drive where there are fewer sectors per cylinder.)  2. Use [[!template id=man name="dd" section="1"]] to completely erase the drives.  This is useful to make sure that any existing labels/wedges/etc. get removed, and also makes it easier to initialize the raidset parity.  On Western Digital SATA-II 500GB drive, it took less than two hours (each) for this step.  (The operation starts off at ~110GB/sec, but will get slower as the heads get closer to the center of the drive where there are fewer sectors per cylinder.)
   
         dd if=/dev/zero bs=32k of=/dev/rwd2a          dd if=/dev/zero bs=32k of=/dev/rwd2a
         dd if=/dev/zero bs=32k of=/dev/rwd3a          dd if=/dev/zero bs=32k of=/dev/rwd3a
   
 3. This step might not be necessary but I wasn't taking any chances!  Also, this step is only applicable on ports which use DOS disk layouts.  For other ports, you should be able to skip this step, and proceed directly to Step 4.  3. This step might not be necessary but I wasn't taking any chances!  Also, this step is only applicable on ports which use DOS disk layouts.  For other ports, you should be able to skip this step, and proceed directly to Step 4.
   
  Use fdisk(8) to set up DOS/Windows partition data.  Make sure you use the "-A 2048" option for alignment.   Use  [[!template id=man name="fdisk" section="8"]] to set up DOS/Windows partition data.  Make sure you use the "-A 2048" option for alignment.
   
         fdisk -uai -A 2048 wd2a          fdisk -uai -A 2048 wd2a
         fdisk -uai -A 2048 wd3a          fdisk -uai -A 2048 wd3a
Line 43  Here's what I did recently to get raidfr Line 43  Here's what I did recently to get raidfr
         Bootselector disabled.          Bootselector disabled.
         First active partition: 0          First active partition: 0
   
  (The "PBR is not bootable" line will not appear if you later use installboot(8) - see step 14 below.)   (The "PBR is not bootable" line will not appear if you later use [[!template id=man name="installboot" section="8"]] - see step 14 below.)
   
 4. Use disklabel(8) to provide a NetBSD disklabel on each member of the raidset.  Create an 'e' partition that describes the whole disk - so it is essentially a copy of the 'c' partition.  Make sure that the offset of your 'e' partition is large enough to accomodate any architecture-specific bootstrap requirements, and that the offset is a multiple of the hard drive's native transfer size.  4. Use  [[!template id=man name="disklabel" section="8"]] to provide a NetBSD disklabel on each member of the raidset.  Create an 'e' partition that describes the whole disk - so it is essentially a copy of the 'c' partition.  Make sure that the offset of your 'e' partition is large enough to accomodate any architecture-specific bootstrap requirements, and that the offset is a multiple of the hard drive's native transfer size.
   
  Set the fstype on your 'e' partition to RAID (4.2BSD will also work, but not if you want to use RAID_AUTOCONFIG).   Set the fstype on your 'e' partition to RAID (4.2BSD will also work, but not if you want to use RAID_AUTOCONFIG).
   
Line 80  Here's what I did recently to get raidfr Line 80  Here's what I did recently to get raidfr
         START queue          START queue
         fifo 100          fifo 100
   
 6. Create the raidset using raidctl(8).  Until you do this for the first time, there are no raid "component labels" on the member drives, so you will need to use the "-C" option;  if the raidset has been previously created, you should use "-c" instead (this is what /etc/rc.d/raidframe uses at system startup).  6. Create the raidset using  [[!template id=man name="raidctl" section="8"]].  Until you do this for the first time, there are no raid "component labels" on the member drives, so you will need to use the "-C" option;  if the raidset has been previously created, you should use "-c" instead (this is what /etc/rc.d/raidframe uses at system startup).
   
         raidctl -C /etc/raid1.conf raid1          raidctl -C /etc/raid1.conf raid1
   
Line 138  Here's what I did recently to get raidfr Line 138  Here's what I did recently to get raidfr
          e: 125829120 104857600  4.2BSD   2048 16384    0  # (Cyl. 102400 - 225279)           e: 125829120 104857600  4.2BSD   2048 16384    0  # (Cyl. 102400 - 225279)
          f: 257708288 230686720  4.2BSD   2048 16384    0  # (Cyl. 225280 - 476948*)           f: 257708288 230686720  4.2BSD   2048 16384    0  # (Cyl. 225280 - 476948*)
   
 14. You will also need to run installboot(8) to make the raidset bootable. Do this for each member drive.  Please note that installboot is run for the RAID partition on each member disk, and NOT on the raidn disk!  This also assumes that the RAID partition (the 'e' partition, see step 4 above) starts at the beginning of the whole-NetBSD 'c' partition.  If you don't do this, I don't think that the i386 MBR boot code will be able to find your bootstrap image.  14. You will also need to run  [[!template id=man name="installboot" section="8"]] to make the raidset bootable. Do this for each member drive.  Please note that installboot is run for the RAID partition on each member disk, and NOT on the raidn disk!  This also assumes that the RAID partition (the 'e' partition, see step 4 above) starts at the beginning of the whole-NetBSD 'c' partition.  If you don't do this, I don't think that the i386 MBR boot code will be able to find your bootstrap image.
   
         mount /dev/raid0a /mnt          mount /dev/raid0a /mnt
         installboot /dev/wd0e /usr/mdec/bootxx_ffsv1 /mnt/boot          installboot /dev/wd0e /usr/mdec/bootxx_ffsv1 /mnt/boot

Removed from v.1.6  
changed lines
  Added in v.1.7


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb