Re: RAID5 Shrinking array-size nearly killed the system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[CC restored]

On 03/12/2011 12:37 PM, Rory Jaffe wrote:
> This is my plan now--did I get this right? -- thanks --
> 
> shutdown -r now # go to live cd
> umount /dev/md0 #just to make sure
> e2fsck /dev/md0
> resize2fs /dev/md0 3800G #3.2T currently in use
> shutdown -r now # go back to main system
> mdadm --grow /dev/md0 --array-size 4000000000
> mdadm -G -n 4 -x 2 --backup-file=/path/to/file.bak /dev/md0
> resize2fs /dev/md0

I would do everything in the LiveCD environment, and I would add an fsck after the resize, and again at the end.

In the LiveCD, there's a good chance the array will be assembled for you, but as a different number.  That shouldn't cause any problems, but it affects the commands you'll type.  "cat /proc/mdstat" will give you a quick summary of where you stand.

I can't comment on the size figures you've chosen, as you haven't shared the output of "mdadm -D /dev/md0" and "mdadm -E" for each of the component devices.

Also note that the backup file needed by mdadm cannot be *inside* the array you are resizing.  You *must* have another storage device for it.  I use a thumb drive with my LiveCD for this kind of task.

Phil
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux