Transformer+un+raid+1+en+raid+5

De GeRgOsNet.

Voici comment transformer un raid 1 soft en raid 5 soft :

  • On stop le raid 1 :
mdadm --stop /dev/md0
  • On passe à la creation d'un raid 5 :
mdadm --create /dev/md0 --level=5 -n 2 /dev/sdb /dev/sdc
mdadm: /dev/hda1 appears to contain an ext2fs file system
size=1946592K  mtime=Sat Apr 14 07:18:32 2007
mdadm: /dev/hda1 appears to be part of a raid array:
level=1 devices=2 ctime=Sat Sep 17 16:17:45 2005
mdadm: /dev/hdb1 appears to contain an ext2fs file system
size=1946592K  mtime=Sat Apr 17 07:18:32 2007
mdadm: /dev/hdb1 appears to be part of a raid array:
level=1 devices=2 ctime=Sat Sep 17 16:17:45 2005
Continue creating array? y
mdadm: array /dev/md0 started.
  • On ajoute le 3eme disque :
mdadm --add /dev/md0 /dev/sdd
mdadm --grow /dev/md0 --raid-disks=3 --backup-file=/mnt/tmp/raid1-5.backup.file
mdadm: Need to backup 128K of critical section ..
mdadm: ... critical section passed.
  • On redimensionne la partition :
e2fsck -f /dev/md0
resize2fs -p /dev/md0
Outils personnels