How to extend Linear RAID
Hello All,
* Please do not try this on Production server. Make sure you can do this or not:)Read More
# Sample raid-1 configuration
raiddev /dev/md2
raid-level 0
nr-raid-disks 2
chunk-size 4
Most of all you know that we use linear just like LVM.
This is my server ...little small though:(
raiddev /dev/md0
raid-level linear # it's not obvious but this *must* be
persistent-superblock 1 # set this to 1 if you want autostart,
chunk-size 32
nr-raid-disks 2
device /dev/hdc3
raid-disk 0
device /dev/hda4
raid-disk 1
raid-level linear # it's not obvious but this *must* be
persistent-superblock 1 # set this to 1 if you want autostart,
chunk-size 32
nr-raid-disks 2
device /dev/hdc3
raid-disk 0
device /dev/hda4
raid-disk 1
# Sample raid-1 configuration
raiddev /dev/md2
raid-level 0
nr-raid-disks 2
chunk-size 4
device /dev/hdc2
raid-disk 0
raid-disk 0
device /dev/hda3
raid-disk 1
Last week this RAID partition got full...suddenly i got mail from boss..:D
That wasnt much funny though.
So I have following procedures and belive me it works..
1. Unmount the raid partition
2. Stop the raid....raidstop /dev/md0
3. Update your /etc/raidtab file ...i have added new partition into it
device /dev/hdb1
raid-disk 2
2. Dont forget to change nr-raid-disk line.
3. Now give the command
mkraid /dev/md0
It will create a raid array..you can see the 3rd partition is added into a raid array
cat /proc/mdstat
But after this all procedure you have run one more command
resize2fs /dev/md0
Now after mounting that partition you will get know you can successfully extended the RAID partition.
No comments:
Post a Comment