public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
* mdadm can't reshape/resize arrays
@ 2009-06-24 15:03 Goswin von Brederlow
  2009-06-24 22:07 ` NeilBrown
  0 siblings, 1 reply; 3+ messages in thread
From: Goswin von Brederlow @ 2009-06-24 15:03 UTC (permalink / raw)
  To: linux raid

Hi,

I'm trying to resize/reshape some of my arrays:

md1 : active raid1 sdc5[1]
      9767424 blocks [2/1] [_U]
      bitmap: 48/150 pages [192KB], 32KB chunk

% mdadm --grow --size max /dev/md1
mdadm: Cannot set device size for /dev/md1: Device or resource busy

and dmesg says:
  md: couldn't update array info. -16


md2 : active raid5 sdc2[6](S) sde2[3] sdg1[1] sdf3[4] sdd1[5] sdb1[2]
sda1[0]
      945625280 blocks level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]
      bitmap: 0/181 pages [0KB], 512KB chunk

% mdadm --grow -n 7 /dev/md2 
mdadm: Need to backup 1920K of critical section..
mdadm: Cannot set device size/shape for /dev/md2: Device or resource busy

and dmesg says:
  md: couldn't update array info. -16


% uname -a
Linux frosties 2.6.29.4-frosties-1 #8 Sun Jun 7 00:48:55 CEST 2009 x86_64 GNU/Linux

% mdadm --version
mdadm - v2.6.9 - 10th March 2009


Anyone have an idea what is wrong there?

MfG
        Goswin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mdadm can't reshape/resize arrays
  2009-06-24 15:03 mdadm can't reshape/resize arrays Goswin von Brederlow
@ 2009-06-24 22:07 ` NeilBrown
  2009-06-25  8:20   ` Goswin von Brederlow
  0 siblings, 1 reply; 3+ messages in thread
From: NeilBrown @ 2009-06-24 22:07 UTC (permalink / raw)
  To: Goswin von Brederlow; +Cc: linux raid

On Thu, June 25, 2009 1:03 am, Goswin von Brederlow wrote:
> Hi,
>
> I'm trying to resize/reshape some of my arrays:
>
> md1 : active raid1 sdc5[1]
>       9767424 blocks [2/1] [_U]
>       bitmap: 48/150 pages [192KB], 32KB chunk
>
> % mdadm --grow --size max /dev/md1
> mdadm: Cannot set device size for /dev/md1: Device or resource busy
>
> and dmesg says:
>   md: couldn't update array info. -16
>
>
> md2 : active raid5 sdc2[6](S) sde2[3] sdg1[1] sdf3[4] sdd1[5] sdb1[2]
> sda1[0]
>       945625280 blocks level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]
>       bitmap: 0/181 pages [0KB], 512KB chunk
>
> % mdadm --grow -n 7 /dev/md2
> mdadm: Need to backup 1920K of critical section..
> mdadm: Cannot set device size/shape for /dev/md2: Device or resource busy
>
> and dmesg says:
>   md: couldn't update array info. -16
>
>
> % uname -a
> Linux frosties 2.6.29.4-frosties-1 #8 Sun Jun 7 00:48:55 CEST 2009 x86_64
> GNU/Linux
>
> % mdadm --version
> mdadm - v2.6.9 - 10th March 2009
>
>
> Anyone have an idea what is wrong there?

md cannot grow arrays with bitmaps as it is not able to grow the bitmap.
You need to remove the bitmap, grow the array, then add the bitmap.
And unfortunately you cannot add the bitmap until the grow
has finished.

Yes, there is room for improvement here.

NeilBrown


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mdadm can't reshape/resize arrays
  2009-06-24 22:07 ` NeilBrown
@ 2009-06-25  8:20   ` Goswin von Brederlow
  0 siblings, 0 replies; 3+ messages in thread
From: Goswin von Brederlow @ 2009-06-25  8:20 UTC (permalink / raw)
  To: NeilBrown; +Cc: Goswin von Brederlow, linux raid

"NeilBrown" <neilb@suse.de> writes:

> On Thu, June 25, 2009 1:03 am, Goswin von Brederlow wrote:
>> Hi,
>>
>> I'm trying to resize/reshape some of my arrays:
>>
>> md1 : active raid1 sdc5[1]
>>       9767424 blocks [2/1] [_U]
>>       bitmap: 48/150 pages [192KB], 32KB chunk
>>
>> % mdadm --grow --size max /dev/md1
>> mdadm: Cannot set device size for /dev/md1: Device or resource busy
>>
>> and dmesg says:
>>   md: couldn't update array info. -16
>>
>>
>> md2 : active raid5 sdc2[6](S) sde2[3] sdg1[1] sdf3[4] sdd1[5] sdb1[2]
>> sda1[0]
>>       945625280 blocks level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]
>>       bitmap: 0/181 pages [0KB], 512KB chunk
>>
>> % mdadm --grow -n 7 /dev/md2
>> mdadm: Need to backup 1920K of critical section..
>> mdadm: Cannot set device size/shape for /dev/md2: Device or resource busy
>>
>> and dmesg says:
>>   md: couldn't update array info. -16
>>
>>
>> % uname -a
>> Linux frosties 2.6.29.4-frosties-1 #8 Sun Jun 7 00:48:55 CEST 2009 x86_64
>> GNU/Linux
>>
>> % mdadm --version
>> mdadm - v2.6.9 - 10th March 2009
>>
>>
>> Anyone have an idea what is wrong there?
>
> md cannot grow arrays with bitmaps as it is not able to grow the bitmap.
> You need to remove the bitmap, grow the array, then add the bitmap.
> And unfortunately you cannot add the bitmap until the grow
> has finished.
>
> Yes, there is room for improvement here.
>
> NeilBrown

Most notably that mdadm catches that and gives a sensible error.

Thanks.

MfG
        Goswin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-25  8:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-24 15:03 mdadm can't reshape/resize arrays Goswin von Brederlow
2009-06-24 22:07 ` NeilBrown
2009-06-25  8:20   ` Goswin von Brederlow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox