How to resize RAID-1 partitions (mdraid)

Roberto Ragusa mail at robertoragusa.it
Sat May 29 15:37:15 UTC 2010


Sam Varshavchik wrote:
> That bad news, since these are existing partitions, so presumably the
> raid metadata is at the end.
> 
> The good news is that I took a look at the current parted online manual,
> and it looks like there's some support in parted now. The current
> version of parted seems to accept /dev/mdX as a parameter, and the
> resize command is documented. So, I think what I need to do is:
> 
> 1) Use parted to shrink the filesystem on /dev/mdX
> 
> 2) Use mdadm --grow to reduce the size of the /dev/mdX array
> 
> 3) Go back to parted, and use the "move" command to reduce the size of
> the partition on both disks. Not the "resize" command, because I already
> resized the filesystem, right?

Your first mail did not really describe what you want. The plan
in your last mail seems to imply a few details.

You say "resize". Is it enlarge or shrink? It seems it is "shrink".
What other partitions you have on the disks?
Do you have other partitions before or after the changing ones?
If you are shrinking, where do you want the free space to appear,
before or after? It seems you want it before (because of the "move").

Write down all the details (including /proc/partitions /proc/mdstat etc.)
and you will get better advice from the list.
The solution could be very different from what you have in mind.

Best regards.
-- 
   Roberto Ragusa    mail at robertoragusa.it


More information about the users mailing list