Raid5 to another raid level??
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, <[email protected]> wrote:
Quoted 6 lines · 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
Quoted 7 lines
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.
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 :)
Quoted 33 lines · 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, <[email protected]> wrote:
Quoted 6 lines · 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
Quoted 7 lines
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.
Quoted 11 lines · On Fri, 2 Sep 2011 01:54:49 +0100 Michael Busby <[email protected]>…
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/sdemissingnot 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
Quoted 7 lines
echo frozen >
/sys/block/md0/md/sync_action
mdadm/dev/md0--add/dev/sdb
mdadm --grow --force/dev/md0--raid-disks=4echo 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.
Quoted 4 lines
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
Quoted 45 lines
echo raid0 >
/sys/block/md0/md/levelthen resize the fs...job done :)
Quoted 24 lines · 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, <[email protected]> wrote:
Quoted 6 lines · 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
Quoted 7 lines
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???
Quoted 9 lines
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
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
Quoted 22 lines · NeilBrown
Quoted 11 lines · On Fri, 2 Sep 2011 01:54:49 +0100 Michael Busby <[email protected]>…
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/sdemissingnot 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
Quoted 7 lines
echo frozen >
/sys/block/md0/md/sync_action
mdadm/dev/md0--add/dev/sdb
mdadm --grow --force/dev/md0--raid-disks=4echo frozen >
/sys/block/md0/md/sync_action
mdadm/dev/md0--add/dev/sdc
mdadm --grow --force/dev/md0--raid-disks=5
Quoted 58 lines
You can do all this in one step - 3 to 5.
Quoted 4 lines
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=5NeilBrown
Quoted 45 lines
echo raid0 >
/sys/block/md0/md/levelthen resize the fs...job done :)
Quoted 24 lines · 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, <[email protected]> wrote:
Quoted 6 lines · 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
Quoted 7 lines
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???
Quoted 9 lines
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 [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby <[email protected]>…
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,butthis 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. 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
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)"
Quoted 21 lines · NeilBrown
Quoted 8 lines · On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby <[email protected]>…
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,butthis would require adding a missing disk to the raid4 at the same time, not sure how easy that would be todoYes, 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. 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.
Quoted 9 lines
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · On Fri, 2 Sep 2011 11:35:30 +0100 Michael Busby <[email protected]>…
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. You would need a reasonably recent kernel... 2.6.30 or later. I guess that isn't so recent any more.
NeilBrown
Quoted 25 lines · NeilBrown
Quoted 23 lines
Quoted 8 lines · On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby <[email protected]>…
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,butthis would require adding a missing disk to the raid4 at the same time, not sure how easy that would be todoYes, 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. 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.
Quoted 7 lines
Quoted 7 lines
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
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....
Quoted 7 lines · NeilBrown
Quoted 4 lines · On Fri, 2 Sep 2011 11:35:30 +0100 Michael Busby <[email protected]>…
Great, will test that in a bit
will mdadm 3.2.2 support converting raid4 to raid5
Quoted 44 lines
Quoted 3 lines
"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 recent kernel... 2.6.30 or later. I guess that isn't so recent any more.
NeilBrown
Quoted 32 lines · NeilBrown
Quoted 30 lines
Quoted 8 lines · On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby <[email protected]>…
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,butthis would require adding a missing disk to the raid4 at the same time, not sure how easy that would be todoYes, 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. 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · On Fri, 2 Sep 2011 14:11:57 +0100 Michael Busby <[email protected]>…
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....
(I vaguely recall already replying to this but find no evidence - apologies 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=4 --add /dev/sdf \
--backup-file=/root/md0-backup
This will:
- convert the array from RAID0 to RAID5 in a 'parity-last' layout, which 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 degraded RAID4 is sufficient and handled automatically.
NeilBrown
Quoted 47 lines · NeilBrown
Quoted 45 lines
Quoted 7 lines · On Fri, 2 Sep 2011 11:35:30 +0100 Michael Busby <[email protected]>…
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. You would need a reasonably recent kernel... 2.6.30 or later. I guess that isn't so recent any more.
NeilBrown
Quoted 28 lines · NeilBrown
Quoted 26 lines
Quoted 8 lines · On Fri, 2 Sep 2011 10:12:32 +0100 Michael Busby <[email protected]>…
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,butthis would require adding a missing disk to the raid4 at the same time, not sure how easy that would be todoYes, 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. 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.
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 4 lines
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html