Quote:
Originally posted by chuck77
Currently our Proliant server using raid 1 mirroring between 2 9.1GB. If i were i add another 9.1 GB and make it raid 5.
Can this be done without re-setting up the whole linux OS ??
What can i do ?? Pls advise...
|
Yes and No. I can't recommend that you use more than one partition on a drive in an active array as it seems to me that it would severely hurt your performance and reliability. Think about it - we're trying to write data in parallel (striping) to one array, but when we also want to write to another partition on a drive that participates in that array something has to stop and wait. This could lead to a lot of resyncs in a RAID5 setup.
You could just use a partition of that new 18GB drive to build your new array, but you would 'lose' the remaining space on that drive.
I use the raidtools 0.9 package which allows me to use the 'failed-disk' directive. (I'm not familiar with hardware RAID as my budget won't allow) I'm not sure if the Compaq controller will let you do the same thing but here's all I can offer. In short it will let you set up a crippled RAID5 array so you can set up your stuff. It goes something like this.
fdisk your new drive and create partition(s) to match your other drives. Then you need to set the partition type to raid autodetect (going from memory I think it's type 'fd'). Next you can format it and mount it.
So now your system looks something like this:
2 x 9.1GB RAID1 = 9.1GB Storage (/dev/sda, /dev/sdb)
1 x 9.1GB disk = 9.1GB Storage (/dev/sdc) (you created a partition on the new drive to match the original 9.1GB drives)
You now need to copy the contents of your RAID1 array to your new drive. I ran across this nifty command in one of the Software RAID how-to's. 'cd' to your root directory. mount your new, formatted drive to something simple like /mnt. Then...
Code:
find . -xdev | cpio -pm /mnt
This will copy your stuff to the new drive. Now you can go about creating the new RAID5 array. My /etc/raidtab would look something like this
Code:
raiddev /dev/md0
raid-level 5
nr-raid-disks 3
nr-spare-disks 0
persistent-superblock 1
parity-algorithm left-symmetric
chunk-size 32
device /dev/sda1
raid-disk 0
device /dev/sdb1
raid-disk 1
device /dev/hdc1
failed-disk 2
By using the setup as above, when I create the new array it wont stomp on the data I copied to the new drive as it was tagged as a 'failed-disk'. In RAID5 the array can function with one drive not participating. Now you can create the array /dev/md0 and format it. Only the first two drives will be a part of it. From here you can format your new array and copy the contents of the failed drive to md0 (by using the handy tool mentioned above). Once that is complete I just 'raidhotadd' the new drive to md0 and then the array can rebuild.
BEFORE YOU TRY ANYTHING LIKE THIS PLEASE BACK UP!!!
and also check out the Boot/Root RAID How-To on linuxdoc.org!