This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Installare mdadm:

apt-get install initramfs-tools mdadm

Se non si vuole riavviare bisogna caricare questi moduli kernel:

modprobe md
modprobe linear
modprobe multipath
modprobe raid0
modprobe raid1
modprobe raid5
modprobe raid6
modprobe raid10

Copiare le partizioni dal disco origine al nuovo disco ad esempio:

sfdisk -d /dev/sda | sfdisk /dev/sdb

Dopo aver controllato che entrambi i dischi hanno lo stesso layout bisogna cambiare il tipo di partizione sul disco nuovo mettendole a linux raid autodetect:

fdisk /dev/sdb

Command (m for help): <-- t
Partition number (1-4): <-- 1
Hex code (type L to list codes): <-- fd

eseguire questi comandi per tutte le partizioni del disco nuovo (cambiando numero di partizione ovviamente!!)

Se devo eliminare precedenti installazioni RAID dal disco:

mdadm --zero-superblock /dev/sdb1 
per tutte le partizioni su sdb

Creiamo quindi gli array RAID uno per ogni partizione:

mdadm --create /dev/md0 --level=1 --raid-disks=2 missing /dev/sdb1

Creiamo il filesystem sul RAID ad esempio un ext3 ed una swap:

mkfs.ext3 /dev/md0
mkswap /dev/md1

Ricreiamo la configurazione del RAID:

cp /etc/mdadm/mdadm.conf /etc/mdadm/mdadm.conf_orig
mdadm --examine --scan >> /etc/mdadm/mdadm.conf

Montiamo gli array con:

mkdir /mnt/md0
mkdir /mnt/md2

mount /dev/md0 /mnt/md0
mount /dev/md2 /mnt/md2

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 14-Apr-2010 14:30 by MaiantiAlberto.