Thread (2 messages) 2 messages, 2 authors, 2015-12-21

Re: Seeking advice to convert RAID5 to RAID10 adding a drive in the process

From: NeilBrown <hidden>
Date: 2015-12-21 01:44:01

On Mon, Dec 14 2015, Micheal Blue wrote:
I have a 3 disk RAID5 currently that uses LUKS. I would like to add a new disk and covert the array to RAID10 but cannot find any walk-through of this process. I am grateful for any input from the list be it links or a personal summary.


Below is a graphic of how my current 3 drive array is setup:
 ---------------------------------------
[          ext4 file system             ]
 ---------------------------------------
[          LUKS cryptdevice             ]
 ---------------------------------------
[               /dev/dm0                ]
 ---------------------------------------
[ /dev/sdb1 ] [ /dev/sdc1 ] [ /dev/sdd1 ]
 ---------------------------------------

I assume that is /dev/md0, not /dev/dm0 ....

You would need to convert to RAID0 first.
Something like
  mdadm --grow /dev/md0 --level=0 --raid-disks=2
  # wait for that to complete
  mdadm --grow /dev/md0 --level=10 --raid-disks=4 --add /dev/sdd1 /dev/sde1


You should experiment first by creating some largish file (100Meg),
using losetup to make block devices /dev/loop0, /dev/loop1
... /dev/loop3

then create a raid 5 of some of those devices, creaet a LUKS and ext4 on
that, and then perform the reshape and make sure it all works as you
expect.

I just tested and it seemed to work on the kernel and mdadm that I have.

Of course, if you can create a backup - at least of the most important
files - that is always a good idea.

NeilBrown

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help