RAID 5 + 1 hot spare setup
==========================
Notes: 1. The following steps assume the DiskSuite software has been
installed already.
2. There are a lot more Disksuite options available (e.g. different
levels of RAID setup and adding more disks to a hot RAID).
See the DiskSuite Tool manual for details.
--------------------------
1. metadb setup
- Create at least 3 metadb copies on 3 separate disks. Why at least
3 copies? metadb is where raid setup information and logs are stored
and if you lose all your metadbs, your RAID is pretty much hosed. Just
ask John Ward. ;-)
- 5MB partition for each metadb should be enough.
A. as root, run "format" to create 5MB partition for metadb. make
sure you know the exact devices for your RAID setup.
Note: since root slice "s0" is there already (usually 128MB), you
can use it for metadb.
B. enable metadbs.
metadb -c 3 -a -f /dev/dsk/c0t8d0s0 /dev/dsk/c0t9d0s0 /dev/dsk/c0t10d0s0
(-c 3 ==> 3 copies of metadb
-a ==> add metadb, can be used later to add more metadbs w/o -f
-f ==> initial creation of metadb)
*In this case, I am using slice 0 of disks c0t8d0, c0t9d0, and c0t10d0.
2. md.tab file
- Defines how you want to configure your RAID (mirror, stripe, etc)
and how many disks you want in your RAID
- For RAID 5 (5 disks) and 1 hot spare...
A. Edit /etc/lvm/md.tab and add the following to it (d8 and hsp001)
d8 1 5 /dev/dsk/c0t8d0s6 /dev/dsk/c0t9d0s6 /dev/dsk/c0t10d0s6 \
/dev/dsk/c0t11d0s6 /dev/dsk/c0t12d0s6
hsp001 /dev/dsk/c0t13d0s6
Note: md.tab explains what each number means. ("1" signifies all
the disks are on 1 controller, and "5" is how many disks you
want the RAID to be. And hsp001 is my hot spare (You want
to keep this the same size as the other disks)
B. metainit - enable metadevices (RAID data disks) and hot spare
metainit d8
metainit hsp001
3. metatool utililty
run "metatool" tool to make sure you've setup the disks as one
unit properly.
4. create a new filesystem on that RAID data unit
- think of /dev/md/dsk/ is to RAID as /dev/dsk/ is to regular disks.
- since we defined "d8" as the RAID in /etc/lvm/md.tab, to create
a new fs on it type:
newfs -m 0 /dev/md/dsk/d8
(this command takes about 20mins to complete on a Sun Blade 1000
for a 175GB disk)
5. mkdir /raid_disk
6. mount /dev/md/dsk/d8 /raid_disk
7. modify /etc/vfstab to reflect the new RAID
8. as a precaution, I recommend backing up the RAID unit as well.
=====================================================================
5/02/2001 - Steve Chen (steveywc@uci.edu)