Expanding size of existing raid1 md device

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

 



Hi,

I'm wondering if there is any way to do the following...

Assume I've got a system with 2 18GB disks. Each disk has 2 partitons
which are then setup as mirrored md devices.
/dev/md0 uses small 100MB partitions on each drive
/dev/md1 uses the rest of each disk (ie: ~17.9GB)

I'd like to be able to upgrade the system to use 36GB disks, such that
the /dev/md1 partition expands to take up the rest of the additional
space provided by the 36GB disk.

So, the process might look something like:
- fail and remove the partition for both md arrays
- remove 1 of the 18GB disks
- insert new 36GB disk
- partition 36GB disk with 100MB partition for /dev/md0
- partition 36GB disk with 35.9GB partition for /dev/md1
- hotadd the 36GB disk partitions so that it syncs with 18GB disk
- wait for sync to complete
- fail and remove the partitions on both md arrays on the 18GB disk
- remove the 18GB disk
- insert new 36GB disk
- partition 36GB disk with 100MB partition for /dev/md0
- partition 36GB disk with 35.9GB partition for /dev/md1
- hotadd the 36GB disk partitions so that it syncs with the other 36GB
disk

Having tried this, it works except that /dev/md1 does not make use of
the additional space provided by the 36GB disks even though the
partitions on both disks are larger. It appears to me that it is using
the value from the superblock when the array was created (which makes
sense).

Is there some way to force the md driver to expand to use the maximum
size available based on the disks/partitions in the array? Perhaps from
mdadm? Or is some kind of patch to the kernel required to make this
work? If so, any pointers as to where I'd look?

Thanks!

Sean.




-- 

Sean C. Kormilo, STORM Software Architect, Nortel Networks
              email: skormilo@nortelnetworks.com
  

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
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