Raid: Platte tauschen: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Die Seite wurde neu angelegt: „'''Q:''' Eine Festplatte des Software-Raids auf der Scotty/Godzilla/FW2/FW4 ist defekt, wie tausche ich diese? '''A:''' * Festplatte ersetzen, wichtig ist dass ...“ |
Reini (Diskussion | Beiträge) K Schützte „Raid: Platte tauschen“ [edit=autoconfirmed:move=autoconfirmed] |
(kein Unterschied)
| |
Aktuelle Version vom 23. August 2009, 13:03 Uhr
Q: Eine Festplatte des Software-Raids auf der Scotty/Godzilla/FW2/FW4 ist defekt, wie tausche ich diese?
A:
- Festplatte ersetzen, wichtig ist dass die Ersatzplatte die selbe Plattengeometrie (CHS) aufweist
- Partitionieren mit fdisk (angenommen die Platte sdb ist die zu ersetzende):
- Partitionen der bestehenden Platte drucken:
$ fdisk -l /dev/sda Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0009201e Device Boot Start End Blocks Id System /dev/sda1 * 1 8 64228+ fd Linux raid autodetect /dev/sda2 9 130 979965 fd Linux raid autodetect /dev/sda3 131 9729 77103967+ fd Linux raid autodetect
- sdb Partitionieren:
$ fdisk /dev/sdb
Wir benötigen hier folgende Commands:
Command action a toggle a bootable flag n add a new partition t change a partition's system id w write table to disk and exit
also in diesem Fall drei Mal:
Command (m for help): n
p (für Primary Partition)
1 (bzw. 2, 3, etc.)
Werte für Start/Ende, etc. analog zu sda
Command (m for help): t
1 (bzw. 2, 3, etc.)
fd
Danach das Bootable Flag setzen (ist auf sda bei sda1, also auf der 1. Prim. Partition)
Command (m for help): a
1
Partitionstabelle vergleichen:
Command (m for help): p
Wenn die Werte für Partitionen genauso aussehen wie auf sda, dann Änderungen festschreiben:
Command (m for help): w
- sdb in den Raidverband einfügen:
$ cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda3[0]
77103872 blocks [2/1] [U_]
md1 : active raid1 sda2[0]
979840 blocks [2/1] [U_]
md0 : active raid1 sda1[0]
64128 blocks [2/1] [U_]
$ mdadm /dev/md0 -a /dev/sdb1 $ mdadm /dev/md1 -a /dev/sdb2 $ mdadm /dev/md2 -a /dev/sdb3
=> Festplatten werden synchronisiert, das kann dauern .........
Danach existiert das Raid wieder:
$ cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda3[0] sdb3[1]
77103872 blocks [2/2] [UU]
md1 : active raid1 sda2[0] sdb2[1]
979840 blocks [2/2] [UU]
md0 : active raid1 sda1[0] sdb1[1]
64128 blocks [2/2] [UU]
- Grub auf sdb installieren:
$ grub grub> device (hd0) /dev/sdb grub> root (hd0,0) grub> setup (hd0) grub> quit
Grub ist der Bootloader, und verantwortlich dafür dass Linux von der im Bios als Boot Device festgelegten Platte booten kann.