您正在寻找的术语是“RAID级别迁移”.
根据this,这是可能的.我还没有这样做,但程序看起来应该将新驱动器添加为现有阵列的hotspare,然后使用mdadm更新raid级别和raid设备的数量.
你需要一个最近的mdadm来做到这一点:mdadm-2.6.9(例如,centos 5.x)似乎不支持它,但是mdadm-3.1.4(例如ubuntu 11.10)确实:
Grow Grow (or shrink) an array, or otherwise reshape it in some way. Currently supported growth options including changing the active size of component devices and
changing the number of active devices in RAID levels 1/4/5/6, changing the RAID level between 1, 5, and 6, changing the chunk size and layout for RAID5 and
RAID5, as well as adding or removing a write-intent bitmap.
EG,首先将新的热备用设备/ dev / sdg添加到RAID5阵列:
$sudo mdadm --manage /dev/md/md0 --add /dev/sdg
然后转换为RAID6阵列并使其重建为干净状态. –raid-devices 4告诉您新阵列中总共有多少个驱动器.
$sudo mdadm --grow /dev/md/md0 --raid-devices 4 --level 6
我不知道这会有多快.根据我在硬件RAID控制器上进行raid级别迁移的经验,从头开始创建新阵列并将备份恢复到该阵列的速度更快.