Re: mdadm doesn't wont to grow - help please

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

 



W dniu 15.05.2012 02:14, NeilBrown pisze:
> On Mon, 14 May 2012 15:49:53 +0200 Sergiusz Brzeziński
> <Sergiusz.Brzezinski@xxxxxxxxxxxxxx>  wrote:
>
>> Hi,
>>
>> I would like to grow the RAID1.
>>
>> - Raid1 size has about 50GB
>> - two HD partition (sda2, sdb2) have about 80GB+ (each)
>>
>> I do:
>>
>> # mdadm --grow /dev/md0 --size=max
>>
>> and I get the info, that the new size is 50GB. And I wonder: why not 80GB? The
>> size doesn't change! If I try to force size (--size=xxxxx), I get the message
>> that there is no space.
>>
>> What did I wrong?
>
> Probably used an ancient version of mdadm - more than a couple of months
> old :-)
>
> If you
>    for i in /sys/block/md0/md/dev*/size
>    do echo 0>  $i
>    done
> then try again it might work better.
>
> Newer mdadm (since May 2011) do this for you.
>
> If you look at the "mdadm -E /dev/sda2" output before and after you will
> notice that "Avail Dev Size" changes.
>
> You can achieve the same effect by stopping the array, the assembling it
> with --update=devicesize
>
>    mdadm --stop /dev/md0
>    mdadm --assemble /dev/md0 --update=devicesize /dev/sd[ab]2
>    mdadm --grow /dev/md0 --size=max
>
> NeilBrown
[...]

Hi,

Yes, that helped!

Bevore:

 Avail Dev Size : 104855552 (50.00 GiB 53.69 GB)
     Array Size : 104855552 (50.00 GiB 53.69 GB)



# echo 0 > /sys/block/md1/md/dev-sda2/size


After:

Avail Dev Size : 175625584 (83.74 GiB 89.92 GB)
     Array Size : 104855552 (50.00 GiB 53.69 GB)
  Used Dev Size : 104855552 (50.00 GiB 53.69 GB)


And now:
# mdadm --grow /dev/md1 --size=max
works as expected

thank's a lot

best regards

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