Re: Trouble increasing md component size

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

 



On Wednesday June 18, chris@xxxxxxxxxxxx wrote:
> Peter Rabbitson <rabbit+list@xxxxxxxxx> writes:
> 
> > I had exactly the same problem some months ago. The key is in the
> > (obscure) assembly option --update=devicesize. Find it in the mdadm
> > manpage and the whole picture will come together instantly. The wisdom is
> > not very widespread as this affects only V1.1 and 1.2 superblocks.
> 
> Thanks, that's great. I've been using a man page slightly older (2.5.6) than
> the mdadm binary I'm using (2.6.7), which doesn't mention update=devicesize,
> although I'd probably have missed it anyway!
> 
> However, is there a way to do this without stopping the array first? I'm
> using it as an LVM PV and slicing it up into logical volumes which clients
> will be running off while I'm wanting to grow it.

Not currently, no.

It would require changing the 'size' as known by md of each device
first.  i.e. /sys/block/mdX/md/dev-*/size.
However this currently cannot be changed while the array is active.

I cannot immediately see a good reason why not.  It may be as simple
as removing

	if (my_mddev->pers)
		return -EBUSY;

from the start of rdev_size_store, but I wouldn't recommend
experimenting with that on a production system....

Then you would need some code to update the device sizes to match
their real size (but only if the metadata is at the start of the
device .. or maybe relocating the metadata first ...)

Then you could "--grow --size=max" happily.

I'd put this on my todo list if it wasn't so long already :-)
(Well, I've put it there anyway, but no promises).

NeilBrown

--
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