Raid5 to another raid level??

Raid5 to another raid level??

am 01.09.2011 23:50:31 von Michael Busby

I have found the following and see that you can convert from raid4 to
raid0 fairly easy


http://ubuntuforums.org/showpost.php?p=10412231&postcount=20

i have a 2 disk raid5 and want to be able to convert this to raid0, i
was thinking of adding a extra 2 disk and setting them up as raid0,
moving the data over then adding the original raid5 disks to the raid0
setup, but i see that you are unable to add disk to a raid0 setup,
would it be possible to setup a raid4 with 2 disks and 1 missing, move
the data from the raid5 to raid4 then add both of the original disks
to the raid4 the downgrade this to raid0???
--
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

Re: Raid5 to another raid level??

am 02.09.2011 00:34:46 von John Robinson

On 01/09/2011 22:50, Michael Busby wrote:
> I have found the following and see that you can convert from raid4 to
> raid0 fairly easy
>
>
> http://ubuntuforums.org/showpost.php?p=10412231&postcount=20
>
> i have a 2 disk raid5 and want to be able to convert this to raid0, i
> was thinking of adding a extra 2 disk and setting them up as raid0,
> moving the data over then adding the original raid5 disks to the raid0
> setup, but i see that you are unable to add disk to a raid0 setup,
> would it be possible to setup a raid4 with 2 disks and 1 missing, move
> the data from the raid5 to raid4 then add both of the original disks
> to the raid4 the downgrade this to raid0???

Off the top of my head, feeling slightly sozzled (been for a few beers),
this might work, but as your linked post referring to a list reply from
Neil Brown says, you should test first. You could use some USB sticks,
or alternatively loopback devices are ideal for this kind of test.

Cheers,

John.

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

Re: Raid5 to another raid level??

am 02.09.2011 01:50:44 von Michael Busby

Will test tomorrow once back in the office, hope the 4tb sync will be
finished by then

I will report back my findings



-- Sent from my HP TouchPadOn 1 Sep 2011 11:34 PM,
wrote:
On 01/09/2011 22:50, Michael Busby wrote:
> I have found the following and see that you can convert from raid4 to
> raid0 fairly easy
>
>
> http://ubuntuforums.org/showpost.php?p=10412231&postcount=20
>
> i have a 2 disk raid5 and want to be able to convert this to raid0, i
> was thinking of adding a extra 2 disk and setting them up as raid0,
> moving the data over then adding the original raid5 disks to the raid0
> setup, but i see that you are unable to add disk to a raid0 setup,
> would it be possible to setup a raid4 with 2 disks and 1 missing, move
> the data from the raid5 to raid4 then add both of the original disks
> to the raid4 the downgrade this to raid0???

Off the top of my head, feeling slightly sozzled (been for a few beers),
this might work, but as your linked post referring to a list reply from
Neil Brown says, you should test first. You could use some USB sticks,
or alternatively loopback devices are ideal for this kind of test.

Cheers,

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

Re: Raid5 to another raid level??

am 02.09.2011 02:54:49 von Michael Busby

As could not sleep, have just tested and works fine...here is what i have done

sdd and sde are the 2 new disks

mdadm -C /dev/md1 -l4 -n3 -e 1.0 /dev/sdd /dev/sde missing

not sure if worth now using 1.2 as this seems the default setting if
not specified??

sdb and sdc are the old raid 5 disks

echo frozen > /sys/block/md0/md/sync_action
mdadm /dev/md0 --add /dev/sdb
mdadm --grow --force /dev/md0 --raid-disks=4

echo frozen > /sys/block/md0/md/sync_action
mdadm /dev/md0 --add /dev/sdc
mdadm --grow --force /dev/md0 --raid-disks=5

echo raid0 > /sys/block/md0/md/level

then resize the fs...job done :)



On 2 September 2011 00:50, Michael Busby wrote:
> Will test tomorrow once back in the office, hope the 4tb sync will be
> finished by then
>
> I will report back my findings
>
>
>
> -- Sent from my HP TouchPadOn 1 Sep 2011 11:34 PM,
> wrote:
> On 01/09/2011 22:50, Michael Busby wrote:
>> I have found the following and see that you can convert from raid4 to
>> raid0 fairly easy
>>
>>
>> http://ubuntuforums.org/showpost.php?p=10412231&postcount=20
>>
>> i have a 2 disk raid5 and want to be able to convert this to raid0, i
>> was thinking of adding a extra 2 disk and setting them up as raid0,
>> moving the data over then adding the original raid5 disks to the raid0
>> setup, but i see that you are unable to add disk to a raid0 setup,
>> would it be possible to setup a raid4 with 2 disks and 1 missing, move
>> the data from the raid5 to raid4 then add both of the original disks
>> to the raid4 the downgrade this to raid0???
>
> Off the top of my head, feeling slightly sozzled (been for a few beers),
> this might work, but as your linked post referring to a list reply from
> Neil Brown says, you should test first. You could use some USB sticks,
> or alternatively loopback devices are ideal for this kind of test.
>
> Cheers,
>
> John.
>
--
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

Re: Raid5 to another raid level??

am 02.09.2011 04:19:59 von NeilBrown

On Fri, 2 Sep 2011 01:54:49 +0100 Michael Busby
wrote:

> As could not sleep, have just tested and works fine...here is what i have done
>
> sdd and sde are the 2 new disks
>
> mdadm -C /dev/md1 -l4 -n3 -e 1.0 /dev/sdd /dev/sde missing
>
> not sure if worth now using 1.2 as this seems the default setting if
> not specified??
>
> sdb and sdc are the old raid 5 disks
>
> echo frozen > /sys/block/md0/md/sync_action
> mdadm /dev/md0 --add /dev/sdb
> mdadm --grow --force /dev/md0 --raid-disks=4
>
> echo frozen > /sys/block/md0/md/sync_action
> mdadm /dev/md0 --add /dev/sdc
> mdadm --grow --force /dev/md0 --raid-disks=5

You can do all this in one step - 3 to 5.

> echo frozen > /sys/block/md0/md/sync_action
> mdadm /dev/md0 --add /dev/sdb
> mdadm /dev/md0 --add /dev/sdc
> mdadm --grow --force /dev/md0 --raid-disks=5

NeilBrown



>
> echo raid0 > /sys/block/md0/md/level
>
> then resize the fs...job done :)
>
>
>
> On 2 September 2011 00:50, Michael Busby wrote:
> > Will test tomorrow once back in the office, hope the 4tb sync will be
> > finished by then
> >
> > I will report back my findings
> >
> >
> >
> > -- Sent from my HP TouchPadOn 1 Sep 2011 11:34 PM,
> > wrote:
> > On 01/09/2011 22:50, Michael Busby wrote:
> >> I have found the following and see that you can convert from raid4 to
> >> raid0 fairly easy
> >>
> >>
> >> http://ubuntuforums.org/showpost.php?p=10412231&postcount=20
> >>
> >> i have a 2 disk raid5 and want to be able to convert this to raid0, i
> >> was thinking of adding a extra 2 disk and setting them up as raid0,
> >> moving the data over then adding the original raid5 disks to the raid0
> >> setup, but i see that you are unable to add disk to a raid0 setup,
> >> would it be possible to setup a raid4 with 2 disks and 1 missing, move
> >> the data from the raid5 to raid4 then add both of the original disks
> >> to the raid4 the downgrade this to raid0???
> >
> > Off the top of my head, feeling slightly sozzled (been for a few beers),
> > this might work, but as your linked post referring to a list reply from
> > Neil Brown says, you should test first. You could use some USB sticks,
> > or alternatively loopback devices are ideal for this kind of test.
> >
> > Cheers,
> >
> > John.
> >
> --
> 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

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

Re: Raid5 to another raid level??

am 02.09.2011 11:12:32 von Michael Busby

Thanks Neil

Is there anyway back from raid0 to raid4 as i know once at raid0 i
will no longer be able to add any disks, in theory i could change
echo raid0 > /sys/block/md0/md/level,but this would require adding a
missing disk to the raid4 at the same time, not sure how easy that
would be todo


On 2 September 2011 03:19, NeilBrown wrote:
> On Fri, 2 Sep 2011 01:54:49 +0100 Michael Busby l.com>
> wrote:
>
>> As could not sleep, have just tested and works fine...here is what i=
have done
>>
>> sdd and sde are the 2 new disks
>>
>> mdadm -C /dev/md1 -l4 -n3 -e 1.0 /dev/sdd /dev/sde missing
>>
>> not sure if worth now using 1.2 as this seems the default setting if
>> not specified??
>>
>> sdb and sdc are the old raid 5 disks
>>
>> echo frozen > /sys/block/md0/md/sync_action
>> mdadm /dev/md0 --add /dev/sdb
>> mdadm --grow --force /dev/md0 --raid-disks=3D4
>>
>> echo frozen > /sys/block/md0/md/sync_action
>> mdadm /dev/md0 --add /dev/sdc
>> mdadm --grow --force /dev/md0 --raid-disks=3D5
>
> You can do all this in one step - 3 to 5.
>
>> echo frozen > /sys/block/md0/md/sync_action
>> mdadm /dev/md0 --add /dev/sdb
>> mdadm /dev/md0 --add /dev/sdc
>> mdadm --grow --force /dev/md0 --raid-disks=3D5
>
> NeilBrown
>
>
>
>>
>> echo raid0 > /sys/block/md0/md/level
>>
>> then resize the fs...job done :)
>>
>>
>>
>> On 2 September 2011 00:50, Michael Busby =
wrote:
>> > Will test tomorrow once back in the office, hope the 4tb sync will=
be
>> > finished by then
>> >
>> > I will report back my findings
>> >
>> >
>> >
>> > -- Sent from my HP TouchPadOn 1 Sep 2011 11:34 PM,
>> > wrote:
>> > On 01/09/2011 22:50, Michael Busby wrote:
>> >> I have found the following and see that you can convert from raid=
4 to
>> >> raid0 fairly easy
>> >>
>> >>
>> >> http://ubuntuforums.org/showpost.php?p=3D10412231&postcount= 3D20
>> >>
>> >> i have a 2 disk raid5 and want to be able to convert this to raid=
0, i
>> >> was thinking of adding a extra 2 disk and setting them up as raid=
0,
>> >> moving the data over then adding the original raid5 disks to the =
raid0
>> >> setup, but i see that you are unable to add disk to a raid0 setup=
,
>> >> would it be possible to setup a raid4 with 2 disks and 1 missing,=
move
>> >> the data from the raid5 to raid4 then add both of the original di=
sks
>> >> to the raid4 the downgrade this to raid0???
>> >
>> > Off the top of my head, feeling slightly sozzled (been for a few b=
eers),
>> > this might work, but as your linked post referring to a list reply=
from
>> > Neil Brown says, you should test first. You could use some USB sti=
cks,
>> > or alternatively loopback devices are ideal for this kind of test.
>> >
>> > Cheers,
>> >
>> > John.
>> >
>> --
>> 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 =A0http://vger.kernel.org/majordomo-info.html
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Raid5 to another raid level??

am 02.09.2011 12:22:35 von NeilBrown

On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby
wrote:

> Thanks Neil
>
> Is there anyway back from raid0 to raid4 as i know once at raid0 i
> will no longer be able to add any disks, in theory i could change
> echo raid0 > /sys/block/md0/md/level,but this would require adding a
> missing disk to the raid4 at the same time, not sure how easy that
> would be todo
>

Yes, you can switch from RAID0 to RAID4 in much the same way as you switch
from RAID4 to RAID0.
You can then freeze/add-disk/change-size/unfreeze/wait/switch-back-to-RAI D0
to add more devices.

mdadm-3.2.2 should be able to do all this for you. i.e. you ask it to --grow
a RAID and --add some disks at the same time, and it will do all the required
magic.

This hasn't been tested extensively, but should work in simple cases.

Of course the more devices you have in a RAID0, the less reliability you have
- but e.g. as a cache for a tape backup system a large RAID0 is fine.

NeilBrown


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

Re: Raid5 to another raid level??

am 02.09.2011 12:35:30 von Michael Busby

Great, will test that in a bit

will mdadm 3.2.2 support converting raid4 to raid5

"A RAID4 can change the number of devices or the size of individual
devices. It cannot be converted to RAID5 yet (though that should be
trivial to implement)"

On 2 September 2011 11:22, NeilBrown wrote:
> On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby l.com>
> wrote:
>
>> Thanks Neil
>>
>> Is there anyway back from raid0 to raid4 as i know once at raid0 i
>> will no longer be able to add any disks, in theory i could change
>> echo raid0 > /sys/block/md0/md/level,but this would require adding a
>> missing disk to the raid4 at the same time, not sure how easy that
>> would be todo
>>
>
> Yes, you can switch from RAID0 to RAID4 in much the same way as you s=
witch
> from RAID4 to RAID0.
> You can then freeze/add-disk/change-size/unfreeze/wait/switch-back-to=
-RAID0
> to add more devices.
>
> mdadm-3.2.2 should be able to do all this for you. =A0i.e. you ask it=
to --grow
> a RAID and --add some disks at the same time, and it will do all the =
required
> magic.
>
> This hasn't been tested extensively, but should work in simple cases.
>
> Of course the more devices you have in a RAID0, the less reliability =
you have
> - but e.g. as a cache for a tape backup system a large RAID0 is fine.
>
> NeilBrown
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Raid5 to another raid level??

am 02.09.2011 14:49:38 von NeilBrown

On Fri, 2 Sep 2011 11:35:30 +0100 Michael Busby com>
wrote:

> Great, will test that in a bit
>=20
> will mdadm 3.2.2 support converting raid4 to raid5
>=20
> "A RAID4 can change the number of devices or the size of individual
> devices. It cannot be converted to RAID5 yet (though that should be
> trivial to implement)"

I guess the man page needs updating. You would need a reasonably recen=
t
kernel... 2.6.30 or later. I guess that isn't so recent any more.

NeilBrown


>=20
> On 2 September 2011 11:22, NeilBrown wrote:
> > On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby ail.com>
> > wrote:
> >
> >> Thanks Neil
> >>
> >> Is there anyway back from raid0 to raid4 as i know once at raid0 i
> >> will no longer be able to add any disks, in theory i could change
> >> echo raid0 > /sys/block/md0/md/level,but this would require adding=
a
> >> missing disk to the raid4 at the same time, not sure how easy that
> >> would be todo
> >>
> >
> > Yes, you can switch from RAID0 to RAID4 in much the same way as you=
switch
> > from RAID4 to RAID0.
> > You can then freeze/add-disk/change-size/unfreeze/wait/switch-back-=
to-RAID0
> > to add more devices.
> >
> > mdadm-3.2.2 should be able to do all this for you. =A0i.e. you ask =
it to --grow
> > a RAID and --add some disks at the same time, and it will do all th=
e required
> > magic.
> >
> > This hasn't been tested extensively, but should work in simple case=
s.
> >
> > Of course the more devices you have in a RAID0, the less reliabilit=
y you have
> > - but e.g. as a cache for a tape backup system a large RAID0 is fin=
e.
> >
> > NeilBrown
> >
> >
> >

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Raid5 to another raid level??

am 02.09.2011 15:11:57 von Michael Busby

I am using the 3.0.0 kernel so that should not be a issue, have just
upgraded mdadm on my box to 3.2.2 from 3.1.4

would i be right in thinking that to get from raid0 to raid5 i would
first have to change from raid0 to raid4 and add the extra disk for
parity, once i am at this level i would need a command to get the
parity data striped over the raid5 and not in a single disk like raid4
or maybe there is a way to go from raid0 direct to raid5 by adding the
extra disk and then having the parity data created and spread over the
disks....

On 2 September 2011 13:49, NeilBrown wrote:
> On Fri, 2 Sep 2011 11:35:30 +0100 Michael Busby l.com>
> wrote:
>
>> Great, will test that in a bit
>>
>> will mdadm 3.2.2 support converting raid4 to raid5
>>
>> "A RAID4 can change the number of devices or the size of individual
>> devices. It cannot be converted to RAID5 yet (though that should be
>> trivial to implement)"
>
> I guess the man page needs updating. =A0You would need a reasonably r=
ecent
> kernel... 2.6.30 or later. =A0I guess that isn't so recent any more.
>
> NeilBrown
>
>
>>
>> On 2 September 2011 11:22, NeilBrown wrote:
>> > On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby mail.com>
>> > wrote:
>> >
>> >> Thanks Neil
>> >>
>> >> Is there anyway back from raid0 to raid4 as i know once at raid0 =
i
>> >> will no longer be able to add any disks, in theory i could change
>> >> echo raid0 > /sys/block/md0/md/level,but this would require addin=
g a
>> >> missing disk to the raid4 at the same time, not sure how easy tha=
t
>> >> would be todo
>> >>
>> >
>> > Yes, you can switch from RAID0 to RAID4 in much the same way as yo=
u switch
>> > from RAID4 to RAID0.
>> > You can then freeze/add-disk/change-size/unfreeze/wait/switch-back=
-to-RAID0
>> > to add more devices.
>> >
>> > mdadm-3.2.2 should be able to do all this for you. =A0i.e. you ask=
it to --grow
>> > a RAID and --add some disks at the same time, and it will do all t=
he required
>> > magic.
>> >
>> > This hasn't been tested extensively, but should work in simple cas=
es.
>> >
>> > Of course the more devices you have in a RAID0, the less reliabili=
ty you have
>> > - but e.g. as a cache for a tape backup system a large RAID0 is fi=
ne.
>> >
>> > NeilBrown
>> >
>> >
>> >
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Raid5 to another raid level??

am 07.09.2011 03:07:56 von NeilBrown

On Fri, 2 Sep 2011 14:11:57 +0100 Michael Busby com>
wrote:

> I am using the 3.0.0 kernel so that should not be a issue, have just
> upgraded mdadm on my box to 3.2.2 from 3.1.4
>=20
> would i be right in thinking that to get from raid0 to raid5 i would
> first have to change from raid0 to raid4 and add the extra disk for
> parity, once i am at this level i would need a command to get the
> parity data striped over the raid5 and not in a single disk like raid=
4
> or maybe there is a way to go from raid0 direct to raid5 by adding th=
e
> extra disk and then having the parity data created and spread over th=
e
> disks....

(I vaguely recall already replying to this but find no evidence - apolo=
gies
if this is a duplicate).

RAID0 to RAID5 does happen in two stages but only one rebuild is needed=

mdadm should make it all 'just work'.
i.e.
mdadm -G /dev/md0 -l 5 --raid-devices=3D4 --add /dev/sdf \
--backup-file=3D/root/md0-backup

This will:
- convert the array from RAID0 to RAID5 in a 'parity-last' layout, w=
hich
is really the same thing as RAID4.
- 'freeze' recovery
- add /dev/sdf as a spare
- request a reshape to change the layout from 'parity-last' to
'left-symetric'
- 'unfreeze' recovery

Then the kernel will notice that a reshape is needed and allowed, will =
add
the spare and start reshaping the array and creating parity at the same=
time.

So you don't need an intermediate state of a complete RAID4 - a degrade=
d
RAID4 is sufficient and handled automatically.

NeilBrown


>=20
> On 2 September 2011 13:49, NeilBrown wrote:
> > On Fri, 2 Sep 2011 11:35:30 +0100 Michael Busby ail.com>
> > wrote:
> >
> >> Great, will test that in a bit
> >>
> >> will mdadm 3.2.2 support converting raid4 to raid5
> >>
> >> "A RAID4 can change the number of devices or the size of individua=
l
> >> devices. It cannot be converted to RAID5 yet (though that should b=
e
> >> trivial to implement)"
> >
> > I guess the man page needs updating. =A0You would need a reasonably=
recent
> > kernel... 2.6.30 or later. =A0I guess that isn't so recent any more=

> >
> > NeilBrown
> >
> >
> >>
> >> On 2 September 2011 11:22, NeilBrown wrote:
> >> > On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby @gmail.com>
> >> > wrote:
> >> >
> >> >> Thanks Neil
> >> >>
> >> >> Is there anyway back from raid0 to raid4 as i know once at raid=
0 i
> >> >> will no longer be able to add any disks, in theory i could chan=
ge
> >> >> echo raid0 > /sys/block/md0/md/level,but this would require add=
ing a
> >> >> missing disk to the raid4 at the same time, not sure how easy t=
hat
> >> >> would be todo
> >> >>
> >> >
> >> > Yes, you can switch from RAID0 to RAID4 in much the same way as =
you switch
> >> > from RAID4 to RAID0.
> >> > You can then freeze/add-disk/change-size/unfreeze/wait/switch-ba=
ck-to-RAID0
> >> > to add more devices.
> >> >
> >> > mdadm-3.2.2 should be able to do all this for you. =A0i.e. you a=
sk it to --grow
> >> > a RAID and --add some disks at the same time, and it will do all=
the required
> >> > magic.
> >> >
> >> > This hasn't been tested extensively, but should work in simple c=
ases.
> >> >
> >> > Of course the more devices you have in a RAID0, the less reliabi=
lity you have
> >> > - but e.g. as a cache for a tape backup system a large RAID0 is =
fine.
> >> >
> >> > NeilBrown
> >> >
> >> >
> >> >
> >
> >

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Raid5 to another raid level??

am 07.09.2011 18:26:26 von Michael Busby

Thanks for taking the time to respond, I am now running a 4 disk raid5
soon to be upgraded to a 8 disk raid6



-- Sent from my HP TouchPadOn 7 Sep 2011 02:08, wrote:
On Fri, 2 Sep 2011 14:11:57 +0100 Michael Busby com>
wrote:

> I am using the 3.0.0 kernel so that should not be a issue, have just
> upgraded mdadm on my box to 3.2.2 from 3.1.4
>
> would i be right in thinking that to get from raid0 to raid5 i would
> first have to change from raid0 to raid4 and add the extra disk for
> parity, once i am at this level i would need a command to get the
> parity data striped over the raid5 and not in a single disk like raid=
4
> or maybe there is a way to go from raid0 direct to raid5 by adding th=
e
> extra disk and then having the parity data created and spread over th=
e
> disks....

(I vaguely recall already replying to this but find no evidence - apolo=
gies
if this is a duplicate).

RAID0 to RAID5 does happen in two stages but only one rebuild is needed=

mdadm should make it all 'just work'.
i.e.
mdadm -G /dev/md0 -l 5 --raid-devices=3D4 --add /dev/sdf \
--backup-file=3D/root/md0-backup

This will:
- convert the array from RAID0 to RAID5 in a 'parity-last' layout, w=
hich
is really the same thing as RAID4.
- 'freeze' recovery
- add /dev/sdf as a spare
- request a reshape to change the layout from 'parity-last' to
'left-symetric'
- 'unfreeze' recovery

Then the kernel will notice that a reshape is needed and allowed, will =
add
the spare and start reshaping the array and creating parity at the same=
time.

So you don't need an intermediate state of a complete RAID4 - a degrade=
d
RAID4 is sufficient and handled automatically.

NeilBrown


>
> On 2 September 2011 13:49, NeilBrown wrote:
> > On Fri, 2 Sep 2011 11:35:30 +0100 Michael Busby ail.com>
> > wrote:
> >
> >> Great, will test that in a bit
> >>
> >> will mdadm 3.2.2 support converting raid4 to raid5
> >>
> >> "A RAID4 can change the number of devices or the size of individua=
l
> >> devices. It cannot be converted to RAID5 yet (though that should b=
e
> >> trivial to implement)"
> >
> > I guess the man page needs updating. =A0You would need a reasonably=
recent
> > kernel... 2.6.30 or later. =A0I guess that isn't so recent any more=

> >
> > NeilBrown
> >
> >
> >>
> >> On 2 September 2011 11:22, NeilBrown wrote:
> >> > On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby @gmail.com>
> >> > wrote:
> >> >
> >> >> Thanks Neil
> >> >>
> >> >> Is there anyway back from raid0 to raid4 as i know once at raid=
0 i
> >> >> will no longer be able to add any disks, in theory i could chan=
ge
> >> >> echo raid0 > /sys/block/md0/md/level,but this would require add=
ing a
> >> >> missing disk to the raid4 at the same time, not sure how easy t=
hat
> >> >> would be todo
> >> >>
> >> >
> >> > Yes, you can switch from RAID0 to RAID4 in much the same way as =
you switch
> >> > from RAID4 to RAID0.
> >> > You can then freeze/add-disk/change-size/unfreeze/wait/switch-ba=
ck-to-RAID0
> >> > to add more devices.
> >> >
> >> > mdadm-3.2.2 should be able to do all this for you. =A0i.e. you a=
sk it to --grow
> >> > a RAID and --add some disks at the same time, and it will do all=
the required
> >> > magic.
> >> >
> >> > This hasn't been tested extensively, but should work in simple c=
ases.
> >> >
> >> > Of course the more devices you have in a RAID0, the less reliabi=
lity you have
> >> > - but e.g. as a cache for a tape backup system a large RAID0 is =
fine.
> >> >
> >> > NeilBrown
> >> >
> >> >
> >> >
> >
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Raid5 to another raid level??

am 10.10.2011 23:47:58 von Michael Busby

I have a quick question i remember reading somewhere about not using
metadata version 0.9 with drives larger than 2tb,
> at the moment i have the following
>
> root@BlueBolt:~# cat /proc/mdstat
> Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] =
[raid4] [raid10]
> md0 : active raid5 sdd[2] sde[0] sdb[3] sdc[1]
> =A0 =A0 =A0 5860543488 blocks level 5, 512k chunk, algorithm 2 [4/4] =
[UUUU]
> =A0 =A0 =A0 bitmap: 2/15 pages [8KB], 65536KB chunk
> unused devices:
> root@BlueBolt:~# mdadm --detail /dev/md0
> /dev/md0:
> =A0 =A0 =A0 =A0 Version : 0.90
> =A0 Creation Time : Mon Jul =A04 15:08:38 2011
> =A0 =A0 =A0Raid Level : raid5
> =A0 =A0 =A0Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
> =A0 Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
> =A0 =A0Raid Devices : 4
> =A0 Total Devices : 4
> Preferred Minor : 0
> =A0 =A0 Persistence : Superblock is persistent
> =A0 Intent Bitmap : Internal
> =A0 =A0 Update Time : Mon Oct 10 22:44:11 2011
> =A0 =A0 =A0 =A0 =A0 State : active
> =A0Active Devices : 4
> Working Devices : 4
> =A0Failed Devices : 0
> =A0 Spare Devices : 0
> =A0 =A0 =A0 =A0 =A0Layout : left-symmetric
> =A0 =A0 =A0Chunk Size : 512K
> =A0 =A0 =A0 =A0 =A0 =A0UUID : ddab6c38:dee3ead0:95ba4558:1c9a49ed (lo=
cal to host BlueBolt)
> =A0 =A0 =A0 =A0 =A0Events : 0.2836102
> =A0 =A0 Number =A0 Major =A0 Minor =A0 RaidDevice State
> =A0 =A0 =A0 =A00 =A0 =A0 =A0 8 =A0 =A0 =A0 64 =A0 =A0 =A0 =A00 =A0 =A0=
=A0active sync =A0 /dev/sde
> =A0 =A0 =A0 =A01 =A0 =A0 =A0 8 =A0 =A0 =A0 32 =A0 =A0 =A0 =A01 =A0 =A0=
=A0active sync =A0 /dev/sdc
> =A0 =A0 =A0 =A02 =A0 =A0 =A0 8 =A0 =A0 =A0 48 =A0 =A0 =A0 =A02 =A0 =A0=
=A0active sync =A0 /dev/sdd
> =A0 =A0 =A0 =A03 =A0 =A0 =A0 8 =A0 =A0 =A0 16 =A0 =A0 =A0 =A03 =A0 =A0=
=A0active sync =A0 /dev/sdb
> which as you can see if using 0.90, i am looking at replacing all the=
2tb drives with 3tb versions, would i need to update the metadata vers=
ion? if so how can i go about this?
> thanks
> Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Raid5 to another raid level??

am 12.10.2011 06:10:51 von NeilBrown

--Sig_/M/oojN5uUq4dwas2ZCTkt.M
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Mon, 10 Oct 2011 22:47:58 +0100 Michael Busby
wrote:

> I have a quick question i remember reading somewhere about not using
> metadata version 0.9 with drives larger than 2tb,
> > at the moment i have the following
> >
> > root@BlueBolt:~# cat /proc/mdstat
> > Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [r=
aid4] [raid10]
> > md0 : active raid5 sdd[2] sde[0] sdb[3] sdc[1]
> > =A0 =A0 =A0 5860543488 blocks level 5, 512k chunk, algorithm 2 [4/4] [U=
UUU]
> > =A0 =A0 =A0 bitmap: 2/15 pages [8KB], 65536KB chunk
> > unused devices:
> > root@BlueBolt:~# mdadm --detail /dev/md0
> > /dev/md0:
> > =A0 =A0 =A0 =A0 Version : 0.90
> > =A0 Creation Time : Mon Jul =A04 15:08:38 2011
> > =A0 =A0 =A0Raid Level : raid5
> > =A0 =A0 =A0Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
> > =A0 Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
> > =A0 =A0Raid Devices : 4
> > =A0 Total Devices : 4
> > Preferred Minor : 0
> > =A0 =A0 Persistence : Superblock is persistent
> > =A0 Intent Bitmap : Internal
> > =A0 =A0 Update Time : Mon Oct 10 22:44:11 2011
> > =A0 =A0 =A0 =A0 =A0 State : active
> > =A0Active Devices : 4
> > Working Devices : 4
> > =A0Failed Devices : 0
> > =A0 Spare Devices : 0
> > =A0 =A0 =A0 =A0 =A0Layout : left-symmetric
> > =A0 =A0 =A0Chunk Size : 512K
> > =A0 =A0 =A0 =A0 =A0 =A0UUID : ddab6c38:dee3ead0:95ba4558:1c9a49ed (loca=
l to host BlueBolt)
> > =A0 =A0 =A0 =A0 =A0Events : 0.2836102
> > =A0 =A0 Number =A0 Major =A0 Minor =A0 RaidDevice State
> > =A0 =A0 =A0 =A00 =A0 =A0 =A0 8 =A0 =A0 =A0 64 =A0 =A0 =A0 =A00 =A0 =A0 =
=A0active sync =A0 /dev/sde
> > =A0 =A0 =A0 =A01 =A0 =A0 =A0 8 =A0 =A0 =A0 32 =A0 =A0 =A0 =A01 =A0 =A0 =
=A0active sync =A0 /dev/sdc
> > =A0 =A0 =A0 =A02 =A0 =A0 =A0 8 =A0 =A0 =A0 48 =A0 =A0 =A0 =A02 =A0 =A0 =
=A0active sync =A0 /dev/sdd
> > =A0 =A0 =A0 =A03 =A0 =A0 =A0 8 =A0 =A0 =A0 16 =A0 =A0 =A0 =A03 =A0 =A0 =
=A0active sync =A0 /dev/sdb
> > which as you can see if using 0.90, i am looking at replacing all the 2=
tb drives with 3tb versions, would i need to update the metadata version? i=
f so how can i go about this?

With a really recent kernel (3.1) and recent mdadm (also not released yet),
0.90 can go up to 4TB (it has 32 bits to count kilobytes with).

Alternately you need to convert to 1.0 metadata.

Currently the only way to do this is to 'create' the array again.
Be sure to specified the same chunk size, the right metadata, the name level
and number of disks, and the correct disks in the correct order.
An use "--assume-clean". Then check your data is still consistent.
With --assume-clean and a read-only mount, no data will actually be changed,
only metadata.

NeilBrown


--Sig_/M/oojN5uUq4dwas2ZCTkt.M
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIVAwUBTpUTSznsnt1WYoG5AQLlTQ//SEjQGSH26Qpq86BG+m86d4q4QO6w ez9h
lLlT7jwifHFbmWNht412UApU/dS6Tv+ALC5uPUc+uV2GJOWaSHLJjBLP6dvR 3uG3
noxKbjT6W8W/KkgDkvm3HJXt/QGXflYfubSoIdSNs37msYwpaRDK2ssuP1Jv JPJA
RNTwCBDFPmKEYmkhrrYTkKzJ1YrAzf3zWr1jV/C4iHIsbo5DZdyxCpAGT5Ho KeP1
my84vleZZNBGQY03xxqsEzpAKGSQ+jTNZmBFvqN+c8k3ihfiRGsvx46uL/GL u5RN
ppSA6r/gkSq6Z2o9SwiKA5qqCSZYLGhBR6E/gUlWCEhfBxU+NooYB/Ec2QWC yaE/
dIsdyviUjj2GEEK6V7OvngOQbUY94dVSqrUgDOGnbOCqZFVb8xO0qm2oJ9L+ 3aZk
q2uc1w9UTSdkn2uFuWq8wXy4TPnIXFSoD+mhIecPmzfowXyXVxWNPV9KW3L0 xdYw
eYnUuuDkY51AIJTDpGSWkKcuJDwrMvMSJkv0W0WcYGSKtSWAFhpY68zMrn9s xQmH
xoKM4eN57VRMEh9U5PZAf1usz24zKQXDbtF/Qct0B2Iji9BIz6mOG5CA2Hqx 3uKQ
MzEwhN5oh8m8XfM4Ly4JpZmPIkmiBHxWy9j9gWHW0lE7jsO8cHeeyaT5s21v Bx0h
IL/gXA92hsc=
=6Vsj
-----END PGP SIGNATURE-----

--Sig_/M/oojN5uUq4dwas2ZCTkt.M--
--
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

Re: Raid5 to another raid level??

am 12.10.2011 11:25:16 von Michael Busby

Thanks, can i just double check the command with you

mdadm --create /dev/md0 --chunk=3D512 --metadata=3D1.0 --assume-clean
--level=3D5 --raid-devices=3D4 /dev/sde /dev/sdc /dev/sdd /dev/sdb


On 12 October 2011 05:10, NeilBrown wrote:
> On Mon, 10 Oct 2011 22:47:58 +0100 Michael Busby il.com>
> wrote:
>
>> I have a quick question i remember reading somewhere about not using
>> metadata version 0.9 with drives larger than 2tb,
>> > at the moment i have the following
>> >
>> > root@BlueBolt:~# cat /proc/mdstat
>> > Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid=
5] [raid4] [raid10]
>> > md0 : active raid5 sdd[2] sde[0] sdb[3] sdc[1]
>> > =A0 =A0 =A0 5860543488 blocks level 5, 512k chunk, algorithm 2 [4/=
4] [UUUU]
>> > =A0 =A0 =A0 bitmap: 2/15 pages [8KB], 65536KB chunk
>> > unused devices:
>> > root@BlueBolt:~# mdadm --detail /dev/md0
>> > /dev/md0:
>> > =A0 =A0 =A0 =A0 Version : 0.90
>> > =A0 Creation Time : Mon Jul =A04 15:08:38 2011
>> > =A0 =A0 =A0Raid Level : raid5
>> > =A0 =A0 =A0Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
>> > =A0 Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
>> > =A0 =A0Raid Devices : 4
>> > =A0 Total Devices : 4
>> > Preferred Minor : 0
>> > =A0 =A0 Persistence : Superblock is persistent
>> > =A0 Intent Bitmap : Internal
>> > =A0 =A0 Update Time : Mon Oct 10 22:44:11 2011
>> > =A0 =A0 =A0 =A0 =A0 State : active
>> > =A0Active Devices : 4
>> > Working Devices : 4
>> > =A0Failed Devices : 0
>> > =A0 Spare Devices : 0
>> > =A0 =A0 =A0 =A0 =A0Layout : left-symmetric
>> > =A0 =A0 =A0Chunk Size : 512K
>> > =A0 =A0 =A0 =A0 =A0 =A0UUID : ddab6c38:dee3ead0:95ba4558:1c9a49ed =
(local to host BlueBolt)
>> > =A0 =A0 =A0 =A0 =A0Events : 0.2836102
>> > =A0 =A0 Number =A0 Major =A0 Minor =A0 RaidDevice State
>> > =A0 =A0 =A0 =A00 =A0 =A0 =A0 8 =A0 =A0 =A0 64 =A0 =A0 =A0 =A00 =A0=
=A0 =A0active sync =A0 /dev/sde
>> > =A0 =A0 =A0 =A01 =A0 =A0 =A0 8 =A0 =A0 =A0 32 =A0 =A0 =A0 =A01 =A0=
=A0 =A0active sync =A0 /dev/sdc
>> > =A0 =A0 =A0 =A02 =A0 =A0 =A0 8 =A0 =A0 =A0 48 =A0 =A0 =A0 =A02 =A0=
=A0 =A0active sync =A0 /dev/sdd
>> > =A0 =A0 =A0 =A03 =A0 =A0 =A0 8 =A0 =A0 =A0 16 =A0 =A0 =A0 =A03 =A0=
=A0 =A0active sync =A0 /dev/sdb
>> > which as you can see if using 0.90, i am looking at replacing all =
the 2tb drives with 3tb versions, would i need to update the metadata v=
ersion? if so how can i go about this?
>
> With a really recent kernel (3.1) and recent mdadm (also not released=
yet),
> 0.90 can go up to 4TB (it has 32 bits to count kilobytes with).
>
> Alternately you need to convert to 1.0 metadata.
>
> Currently the only way to do this is to 'create' the array again.
> Be sure to specified the same chunk size, the right metadata, the nam=
e level
> and number of disks, and the correct disks in the correct order.
> An use "--assume-clean". =A0Then check your data is still consistent.
> With --assume-clean and a read-only mount, no data will actually be c=
hanged,
> only metadata.
>
> NeilBrown
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Raid5 to another raid level??

am 12.10.2011 12:14:41 von NeilBrown

--Sig_/5Xz1dBeovhcWUExWTOsdgkK
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Wed, 12 Oct 2011 10:25:16 +0100 Michael Busby
wrote:

> Thanks, can i just double check the command with you
>=20
> mdadm --create /dev/md0 --chunk=3D512 --metadata=3D1.0 --assume-clean
> --level=3D5 --raid-devices=3D4 /dev/sde /dev/sdc /dev/sdd /dev/sdb
>=20

Correct. Of course you have to
mdadm --stop /dev/md0
first, but you knew that.

NeilBrown


>=20
> On 12 October 2011 05:10, NeilBrown wrote:
> > On Mon, 10 Oct 2011 22:47:58 +0100 Michael Busby ..com>
> > wrote:
> >
> >> I have a quick question i remember reading somewhere about not using
> >> metadata version 0.9 with drives larger than 2tb,
> >> > at the moment i have the following
> >> >
> >> > root@BlueBolt:~# cat /proc/mdstat
> >> > Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]=
[raid4] [raid10]
> >> > md0 : active raid5 sdd[2] sde[0] sdb[3] sdc[1]
> >> > =A0 =A0 =A0 5860543488 blocks level 5, 512k chunk, algorithm 2 [4/4]=
[UUUU]
> >> > =A0 =A0 =A0 bitmap: 2/15 pages [8KB], 65536KB chunk
> >> > unused devices:
> >> > root@BlueBolt:~# mdadm --detail /dev/md0
> >> > /dev/md0:
> >> > =A0 =A0 =A0 =A0 Version : 0.90
> >> > =A0 Creation Time : Mon Jul =A04 15:08:38 2011
> >> > =A0 =A0 =A0Raid Level : raid5
> >> > =A0 =A0 =A0Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
> >> > =A0 Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
> >> > =A0 =A0Raid Devices : 4
> >> > =A0 Total Devices : 4
> >> > Preferred Minor : 0
> >> > =A0 =A0 Persistence : Superblock is persistent
> >> > =A0 Intent Bitmap : Internal
> >> > =A0 =A0 Update Time : Mon Oct 10 22:44:11 2011
> >> > =A0 =A0 =A0 =A0 =A0 State : active
> >> > =A0Active Devices : 4
> >> > Working Devices : 4
> >> > =A0Failed Devices : 0
> >> > =A0 Spare Devices : 0
> >> > =A0 =A0 =A0 =A0 =A0Layout : left-symmetric
> >> > =A0 =A0 =A0Chunk Size : 512K
> >> > =A0 =A0 =A0 =A0 =A0 =A0UUID : ddab6c38:dee3ead0:95ba4558:1c9a49ed (l=
ocal to host BlueBolt)
> >> > =A0 =A0 =A0 =A0 =A0Events : 0.2836102
> >> > =A0 =A0 Number =A0 Major =A0 Minor =A0 RaidDevice State
> >> > =A0 =A0 =A0 =A00 =A0 =A0 =A0 8 =A0 =A0 =A0 64 =A0 =A0 =A0 =A00 =A0 =
=A0 =A0active sync =A0 /dev/sde
> >> > =A0 =A0 =A0 =A01 =A0 =A0 =A0 8 =A0 =A0 =A0 32 =A0 =A0 =A0 =A01 =A0 =
=A0 =A0active sync =A0 /dev/sdc
> >> > =A0 =A0 =A0 =A02 =A0 =A0 =A0 8 =A0 =A0 =A0 48 =A0 =A0 =A0 =A02 =A0 =
=A0 =A0active sync =A0 /dev/sdd
> >> > =A0 =A0 =A0 =A03 =A0 =A0 =A0 8 =A0 =A0 =A0 16 =A0 =A0 =A0 =A03 =A0 =
=A0 =A0active sync =A0 /dev/sdb
> >> > which as you can see if using 0.90, i am looking at replacing all th=
e 2tb drives with 3tb versions, would i need to update the metadata version=
? if so how can i go about this?
> >
> > With a really recent kernel (3.1) and recent mdadm (also not released y=
et),
> > 0.90 can go up to 4TB (it has 32 bits to count kilobytes with).
> >
> > Alternately you need to convert to 1.0 metadata.
> >
> > Currently the only way to do this is to 'create' the array again.
> > Be sure to specified the same chunk size, the right metadata, the name =
level
> > and number of disks, and the correct disks in the correct order.
> > An use "--assume-clean". =A0Then check your data is still consistent.
> > With --assume-clean and a read-only mount, no data will actually be cha=
nged,
> > only metadata.
> >
> > NeilBrown
> >
> >


--Sig_/5Xz1dBeovhcWUExWTOsdgkK
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)

iQIVAwUBTpVonDnsnt1WYoG5AQIgcxAArj7iBqSIdAE0zSSzLphwvPuUD650 FIhP
B93+LhQaZ51KTNoGZauTwLdkiKTfRoGAFTzEMjlumgycyCHsqQkRqtBpcUOA cCnH
Jngomuzyo9nlTxiudvjaFecH6POSG/0fzVs6PfnMEQoO7ygPBIiZmIo9twFu EZ5G
H0OEpR/aqfLUt2yFqMKmI7PvWoIUCjOT1XtOtdcw3VaFVMGpO2Vx29rlJ4KM gcug
RuPLJ1c9mu2L48yllmSmp8wQLLSfd+hD5se81rDVnOdd9rxg3+2NIkFusORc HG/i
uI7xJugcmN6DZi+qQWFOD9nNCGIuKDDRwQeWlRhehH+qWYm9cAVY+tT0JBRH CJiX
Zi3mup77eFXdusKf0ivp0LvtDfCYfg6sgpl70tlsgNKT8BHNjMx0cSvDuTOw qmLY
ddst6C4OajGr6kmJw94xOyZquZ3xfRPIEjXpRYk0tTsw+Cac57u5Go0ppHKN zGvS
1eKeQA0q4PX696XkCcauG3rTaZh4Uah6Fn8AjkJ9+IJDPWCaBn+IrHQ1LzgO OYTO
EFCm8TwiAz9k9kTVmWdYpVdwOMg7+IGXe0ndUTgLyxtVs14SCchsr/UwyPfB iJLe
f5oK0CK8Etf8/80y3gi9lCZH3g0WsQOfFlQ0oxkolMYPEGo73ebl+2KiUnX1 TXcl
+atyaQPD9ak=
=T+OF
-----END PGP SIGNATURE-----

--Sig_/5Xz1dBeovhcWUExWTOsdgkK--
--
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

Re: Raid5 to another raid level??

am 12.10.2011 18:01:27 von Michael Busby

Thanks that worked fine, i did have to shrink the partition down first
though, but that's no biggie

On 12 October 2011 11:14, NeilBrown wrote:
> On Wed, 12 Oct 2011 10:25:16 +0100 Michael Busby il.com>
> wrote:
>
>> Thanks, can i just double check the command with you
>>
>> mdadm --create /dev/md0 --chunk=3D512 --metadata=3D1.0 --assume-clea=
n
>> --level=3D5 --raid-devices=3D4 /dev/sde /dev/sdc /dev/sdd /dev/sdb
>>
>
> Correct. =A0Of course you have to
> =A0 mdadm --stop /dev/md0
> first, but you knew that.
>
> NeilBrown
>
>
>>
>> On 12 October 2011 05:10, NeilBrown wrote:
>> > On Mon, 10 Oct 2011 22:47:58 +0100 Michael Busby gmail.com>
>> > wrote:
>> >
>> >> I have a quick question i remember reading somewhere about not us=
ing
>> >> metadata version 0.9 with drives larger than 2tb,
>> >> > at the moment i have the following
>> >> >
>> >> > root@BlueBolt:~# cat /proc/mdstat
>> >> > Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [r=
aid5] [raid4] [raid10]
>> >> > md0 : active raid5 sdd[2] sde[0] sdb[3] sdc[1]
>> >> > =A0 =A0 =A0 5860543488 blocks level 5, 512k chunk, algorithm 2 =
[4/4] [UUUU]
>> >> > =A0 =A0 =A0 bitmap: 2/15 pages [8KB], 65536KB chunk
>> >> > unused devices:
>> >> > root@BlueBolt:~# mdadm --detail /dev/md0
>> >> > /dev/md0:
>> >> > =A0 =A0 =A0 =A0 Version : 0.90
>> >> > =A0 Creation Time : Mon Jul =A04 15:08:38 2011
>> >> > =A0 =A0 =A0Raid Level : raid5
>> >> > =A0 =A0 =A0Array Size : 5860543488 (5589.05 GiB 6001.20 GB)
>> >> > =A0 Used Dev Size : 1953514496 (1863.02 GiB 2000.40 GB)
>> >> > =A0 =A0Raid Devices : 4
>> >> > =A0 Total Devices : 4
>> >> > Preferred Minor : 0
>> >> > =A0 =A0 Persistence : Superblock is persistent
>> >> > =A0 Intent Bitmap : Internal
>> >> > =A0 =A0 Update Time : Mon Oct 10 22:44:11 2011
>> >> > =A0 =A0 =A0 =A0 =A0 State : active
>> >> > =A0Active Devices : 4
>> >> > Working Devices : 4
>> >> > =A0Failed Devices : 0
>> >> > =A0 Spare Devices : 0
>> >> > =A0 =A0 =A0 =A0 =A0Layout : left-symmetric
>> >> > =A0 =A0 =A0Chunk Size : 512K
>> >> > =A0 =A0 =A0 =A0 =A0 =A0UUID : ddab6c38:dee3ead0:95ba4558:1c9a49=
ed (local to host BlueBolt)
>> >> > =A0 =A0 =A0 =A0 =A0Events : 0.2836102
>> >> > =A0 =A0 Number =A0 Major =A0 Minor =A0 RaidDevice State
>> >> > =A0 =A0 =A0 =A00 =A0 =A0 =A0 8 =A0 =A0 =A0 64 =A0 =A0 =A0 =A00 =
=A0 =A0 =A0active sync =A0 /dev/sde
>> >> > =A0 =A0 =A0 =A01 =A0 =A0 =A0 8 =A0 =A0 =A0 32 =A0 =A0 =A0 =A01 =
=A0 =A0 =A0active sync =A0 /dev/sdc
>> >> > =A0 =A0 =A0 =A02 =A0 =A0 =A0 8 =A0 =A0 =A0 48 =A0 =A0 =A0 =A02 =
=A0 =A0 =A0active sync =A0 /dev/sdd
>> >> > =A0 =A0 =A0 =A03 =A0 =A0 =A0 8 =A0 =A0 =A0 16 =A0 =A0 =A0 =A03 =
=A0 =A0 =A0active sync =A0 /dev/sdb
>> >> > which as you can see if using 0.90, i am looking at replacing a=
ll the 2tb drives with 3tb versions, would i need to update the metadat=
a version? if so how can i go about this?
>> >
>> > With a really recent kernel (3.1) and recent mdadm (also not relea=
sed yet),
>> > 0.90 can go up to 4TB (it has 32 bits to count kilobytes with).
>> >
>> > Alternately you need to convert to 1.0 metadata.
>> >
>> > Currently the only way to do this is to 'create' the array again.
>> > Be sure to specified the same chunk size, the right metadata, the =
name level
>> > and number of disks, and the correct disks in the correct order.
>> > An use "--assume-clean". =A0Then check your data is still consiste=
nt.
>> > With --assume-clean and a read-only mount, no data will actually b=
e changed,
>> > only metadata.
>> >
>> > NeilBrown
>> >
>> >
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html