Thread (2 messages) 2 messages, 2 authors, 2011-03-12

Re: RAID5 Shrinking array-size nearly killed the system

From: Phil Turmel <hidden>
Date: 2011-03-12 17:58:58

[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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help