Problemi ad aggiungere dischi ad un RAID software mirror
Inviato: sabato 5 febbraio 2011, 18:32
Ciao a tutti
ho un problema con la gestione di un mirror software
Scenario che ho trovato configurato e dal quale sono partito:
2 dischi da un TB
/dev/sda1 -> boot
/dev/sda2 -> swap
/dev/sda3 -> root
/dev/sdb3 -> backup
(le altre partizioni non esistevano...)
gli step che ho seguito sono questi:
- cambio del tipo di filesystem delle partizioni sda in FD (raid software)
- copia tabella delle partizioni su sdb
- creazione device /dev/md0 e /dev/md1 su /dev/sdb1 e /dev/sdb3
- formattazione degli md
- copia di tutti i dati da sda a md
- modifica di fstab per fare il boot da md1
- installazione grub su entrambi gli hd
- reboot del server su md
ora sembra tutto funzionante su md1 (anche se ancora presente /dev/sda1 ho eliminato la partizione di boot md0 che mi creava problemi e ho integrato tutto in md1)
ma se provo ad aggiungere il disco sda3 mi da errore
ho provato a resettare i superblock senza successo
perche' non riesco ad aggiungere il disco originale? cosa mi sfugge?
a disposizione per chiarimenti (io non so piu' dove sbattere la testa)
ciao
Paolo
ho un problema con la gestione di un mirror software
Scenario che ho trovato configurato e dal quale sono partito:
2 dischi da un TB
/dev/sda1 -> boot
/dev/sda2 -> swap
/dev/sda3 -> root
/dev/sdb3 -> backup
(le altre partizioni non esistevano...)
gli step che ho seguito sono questi:
- cambio del tipo di filesystem delle partizioni sda in FD (raid software)
- copia tabella delle partizioni su sdb
- creazione device /dev/md0 e /dev/md1 su /dev/sdb1 e /dev/sdb3
- formattazione degli md
- copia di tutti i dati da sda a md
- modifica di fstab per fare il boot da md1
- installazione grub su entrambi gli hd
- reboot del server su md
ora sembra tutto funzionante su md1 (anche se ancora presente /dev/sda1 ho eliminato la partizione di boot md0 che mi creava problemi e ho integrato tutto in md1)
Codice: Seleziona tutto
root@server:~# fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0007ac71
Device Boot Start End Blocks Id System
/dev/sda1 * 1 12 96358+ fd Linux raid autodetect
/dev/sda2 13 134 979965 82 Linux swap / Solaris
/dev/sda3 135 121601 975683677+ fd Linux raid autodetect
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 12 96358+ fd Linux raid autodetect
/dev/sdb2 13 134 979965 82 Linux swap / Solaris
/dev/sdb3 135 121601 975683677+ fd Linux raid autodetect
Disk /dev/md1: 999.0 GB, 999099990016 bytes
2 heads, 4 sectors/track, 243920896 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md1 doesn't contain a valid partition table
Codice: Seleziona tutto
root@server:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sdb3[1]
975683584 blocks [2/1] [_U]
unused devices: <none>Codice: Seleziona tutto
root@server:~# mdadm --detail /dev/md1
/dev/md1:
Version : 00.90.03
Creation Time : Sat Feb 5 11:53:07 2011
Raid Level : raid1
Array Size : 975683584 (930.48 GiB 999.10 GB)
Used Dev Size : 975683584 (930.48 GiB 999.10 GB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Sat Feb 5 16:57:35 2011
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
UUID : 92c15c42:11eca75c:eeaa09ac:40010efe
Events : 0.16
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 19 1 active sync /dev/sdb3
ma se provo ad aggiungere il disco sda3 mi da errore
Codice: Seleziona tutto
root@server:~# mdadm /dev/md1 --add /dev/sda3
mdadm: Cannot open /dev/sda3: Device or resource busyCodice: Seleziona tutto
root@server:~# mdadm --zero-superblock /dev/sda3
mdadm: Couldn't open /dev/sda3 for write - not zeroing
a disposizione per chiarimenti (io non so piu' dove sbattere la testa)
ciao
Paolo