Re: Trouble Shrinking RAID6 from 5 to 4 drives

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

 



On Sat, Jan 19, 2019 at 09:52:11PM +0500, Roman Mamedov wrote:
> Read `man mdadm` for --size. What you need is --array-size.

mdadm should even be nice enough to provide the exact size required 
to make the operation.

| # mdadm --grow /dev/md42 --raid-devices=4
| mdadm: this change will reduce the size of the array.
|        use --grow --array-size first to truncate array.
|        e.g. mdadm --grow /dev/md42 --array-size 5860011008

(This is just an example.)

You have to be really, really sure your filesystem does not exceed 
the new size.

I think mdadm actually accepts G units here, so if you did 
a resizefs 2345G you can use --array-size=2345G as well 
(and mdadm will still complain if it's not small enough
 when trying to reduce number of devices afterwards)

Why not switch to RAID-5 instead?

Regards
Andreas Klauer



[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