Re: Converting RAID1 to RAID5

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

 



Hi,

>> I have a a few two-disk RAID1 partitions that I'd like to convert to
>> three-disk RAID5 partitions using fedora15 with ext4. I've read a few
>> docs online, but none that are authoritative or current. Some even say
>> to zero the superblock first, which doesn't sound safe at all.
...
>> Is the general process to first convert the RAID1 to a two-disk RAID5,
>> then --add the third disk?
>
> I strongly suggest that you create a couple of loop-back devices and
> experiment.
> ie.
>
>  for i in 0 1 2
>  do
>    dd if=/dev/zero of=/tmp/file$i bs=1M count=100
>    losetup /dev/loop$i /tmp/file$i
>  done
>
>  mdadm -C /dev/md0 -l1 -n2 -e 1.0 /dev/loop0 /dev/loop1
>  mkfs /dev/md0
>  mount /dev/md0 /mnt
>  cp -r /lib /mnt
>
>  then try some things. e.g.
>
>  mdadm /dev/md0 --add /dev/loop2
>  mdadm --grow /dev/md0 --level=5 --raid-devices=3
>
>  Try failing a device during the reshape.  Check if the data is still OK.
>  Try it as two separate steps and see if it makes a difference.
>
> Experimenting will give you a lot more confidence than any mount of
> authoritative statements about what it should do.

Yes, definitely. I have an understanding now of what needs to be done,
and am comfortable with mdadm, just not this procedure. I've followed
your steps and they worked successfully.

I just wasn't sure from my reading whether this was a supported
procedure, or whether there were still experimental steps required.

> There was once a tool called raidreconf which would reshape an array while it
> is offline.  That isn't supported anymore.

Yes, I came across that as well, but sounds like it's just not
necessary any longer because it's so well supported in mdadm itself,
correct?

Thanks,
Alex
--
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