Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
admin_grundlagen:software_raid [2013/07/05 19:34] ingo_wichmann [RAID 1 anlegen] |
admin_grundlagen:software_raid [2018/08/29 15:24] ingo_wichmann gelöscht |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Bestehendes System auf Sofrware RAID 1 migrieren ====== | + | ====== Bestehendes System auf Software RAID 1 migrieren ====== |
===== Vorraussetzung ===== | ===== Vorraussetzung ===== | ||
Laufendes Linuxsystem auf einer Festplatte, zusätzliche mindestens gleich große zweite neue Festplatte. | Laufendes Linuxsystem auf einer Festplatte, zusätzliche mindestens gleich große zweite neue Festplatte. | ||
- | Zum Testen können die Partitionen auch auf der selben Festplatte liegen. | + | Zum Testen können auch zwei Partitionen auf der selben Festplatte genutzt werden. |
===== Partitionierung ===== | ===== Partitionierung ===== | ||
Zeile 9: | Zeile 9: | ||
==== RAID Partition taggen ==== | ==== RAID Partition taggen ==== | ||
- | parted /dev/sda4 set raid on | + | parted /dev/sda set 4 raid on |
- | fdisk -l | grep 'Linux raid autodetect' | + | fdisk -l | grep raid |
<file> | <file> | ||
/dev/sda4 63500288 126414847 31457280 fd Linux raid autodetect | /dev/sda4 63500288 126414847 31457280 fd Linux raid autodetect | ||
Zeile 29: | Zeile 29: | ||
mkdir /tmp/system | mkdir /tmp/system | ||
- | mount --bind /tmp/system | + | mount --bind / /tmp/system |
mount --bind /boot /tmp/system/boot/ | mount --bind /boot /tmp/system/boot/ | ||
- | cp -a /tmp/system/. /tmp/md0 | + | cp -a /tmp/system/. /mnt/md0 |
+ | (( alternativ: | ||
+ | rsync -a --del /tmp/system/ /mnt/md0 | ||
+ | )) | ||
| | ||
umount /tmp/system | umount /tmp/system | ||
- | cd /tmp/md0 | + | cd /mnt/md0 |
mount --rbind /dev dev | mount --rbind /dev dev | ||
mount --bind /proc proc | mount --bind /proc proc | ||
Zeile 41: | Zeile 44: | ||
chroot . | chroot . | ||
- | | + | |
mdadm --incremental --rebuild-map | mdadm --incremental --rebuild-map | ||
+ | grub-mkdevicemap -n | ||
update-grub | update-grub | ||
update-initramfs -u | update-initramfs -u | ||
+ | logout | ||
+ | reboot | ||
+ | |||
+ | mdadm --manage --add /dev/md/0 /dev/sda2 | ||
watch cat /proc/mdstat | watch cat /proc/mdstat | ||