User Tools

Site Tools


resize_raid_array_and_create_second_array

Resize_raid_array_and_create_second_array

Misc commands to resize raid array and create a second array

parted /dev/sda #resize 3 #gave out an error saying unsupported features. It showed what features were supported with resize. I needed to see what features were been used on the partition: dumpe2fs /dev/sda3 debugfs -w /dev/sda3 -R “features ^ext_attr” debugfs -w /dev/sda3 -R “features ^resize_inode” parted was then able to resize the partitions.

mdadm –create /dev/md3 –level 1 –raid-devices=2 /dev/sda3 /dev/sdb3 #I tried to assemble the md2 array using mdadm –assemble /dev/md2 /dev/sda3 /dev/sdb3 but it said that there was no superblock found. #mdadm examine and detail of md2 and the individual partitions showed no superblock either. #As a result the array had to be created with the above command. It also resynced itself ok.

mdadm –create /dev/md3 –level 1 –raid-devices=2 /dev/sda4 /dev/sdb4 pvcreate /dev/md3 vgcreate mainvol /dev/md3

Make sure to update /etc/mdadm/mdadm.conf with the correct UUID (mdadm –examine –scan) otherwise the mdadm wont auto assembly on boot.

Links: http://kevin.deldycke.com/2007/03/how-to-recover-a-raid-array-after-having-zero-ized-superblocks/ http://wiki.kartbuilding.net/index.php/RAID_1_and_Xen_(dom0) http://wiki.kartbuilding.net/index.php/LVM_on_XEN_(dom0) http://serverfault.com/questions/43897/how-do-i-get-mdadm-to-auto-assemble-my-raid-array

Old / Not used

The following below didn't work. It is just here for reference.

e2fsck -f /dev/md2 resize2fs /dev/md2 300G mdadm –grow /dev/md2 –size=335544320 (use 320GB to be save. 320 x 1024 x 1024) resize2fs /dev/md2 e2fsck -f /dev/md2 Link: http://www.howtoforge.com/how-to-resize-raid-partitions-shrink-and-grow-software-raid

resize_raid_array_and_create_second_array.txt · Last modified: 2022/07/19 20:13 by 127.0.0.1