helm
21.04.05, 15:29
Hallo,
Ich versuche jetzt schon seit längerem ein bereits installiertes Suse Linux 9.1 auf Softwareraid 1 zu migrieren. Ich habe dazu im Internet recheriert und habe mich größtenteils an folgendes HOWTO ab Punkt 7.6 gehalten:
http://howtos.linux.com/howtos/Software-RAID-HOWTO-7.shtml
Hier meine Vorgehensweise:
Zum Anfang habe ich nur eine 40 GB Platte als hda angeschlossen und installiere Linux drauf. Linux unterteilt die Platte automatisch in 2 Partitionen: hda1 mit 1008 MB als swap und hda2 mit 37,7GB als /.
Am Ende der Installation lasse ich das Softwareupdate laufen und installiere alle verfügbaren Patche. Dann fahre ich das System runter und hänge eine baugleiche 40 GB Platte am 2 Controller als hdc ein. Dann starte ich Linux von der CD als rescue. Dann erstelle ich mit fdisk die exakt gleichen Partitionen auf hdc wie bei hda und formatiere sie mit mke2fs. Dann erstelle ich die folgende /etc/raidtab file:
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/hda2
raid-disk 0
device /dev/hdc2
raid-disk 1
Danach erstelle ich das Raid mit folgendem Befehl:
mkraid --really-force /dev/md0
Anhand der /proc/mdstat sehe ich dann das er die Platten synchronisiert hat:
cat /proc/mdstat
Personalities: [raid1]
md0: active raid1 hdc2[] hda2[0]
39113856 blocks [2/2] [UU]
unused devices: <none>
Nach erfolgreicher Synchronisation, mounte ich /dev/md0 als root und erstelle folgende /etc/lilo.conf:
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
lba32
default=linux
image=/boot/vmlinuz
label=linux
read-only
root=/dev/md0
Danach lasse ich lilo laufen: /sbin/lilo -v
Reading boot sector from /dev/hda
Using Menu secondary loader
Calling map_insert_data
Mapping message file /boot/message
Calling map_insert_file
Boot image: /boot/vmlinuz vmlinuz-2.6.5.7.151-default
Added linux *
/boot/boot.0300 exist - mo backup copy made
Writing boot sector
Danach anstatt hda2 als / folgenden Eintrag in die /etc/fstab
/dev/md0 / ext3 defaults 1 1
Dann mit fdisk die Partitionstypen zu fd - Linux auto raid ändern.
Beide Festplatte sehen jetzt so aus:
fdisk -lu /dev/hda
Disk /dev/hda:41,1GB, 41110142976 bytes
16 heads, 63 sectors/track, 79656 cylinders, total 80293248 sectors
Units=sectors of 1 * 512=512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 63 2065391 1032664+ 82 Linux Swap
/dev/hda2 * 2065392 80293247 39113928 fd linux raid autodetect
Dann boote ich neu und lade das rescuesystem nochmal, weil ich nicht weiß wie ich / wieder unmounten kann, da das system immer sagt das / busy ist.
bei e2fsck -f /dev/md0 kommt folgender Fehler:
e2fsck 1.34 (25-Jul-2003)
Couldn't find ext2 superblock, trying backup blocks
e2fsck: Bad magic number in superblock while trying to open /dev/md0
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem, the superblock is corrupt and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
resize2fs bringt folgende Fehlermeldung:
resize2fs /dev/md0
resize2fs 1.34 (25-Jul-2003)
resize2fs: Bad magic number in super-block while trying to open /dev/md0. Couldn't find valid filesystem superblock
Am Anfang habe ich vergessen die hdc partitionen zu formatiern bevor ich mkraid ausgeführt habe, und als ich das zum ersten mal die hdc partitionen formatiert habe ging e2fsck und resize2fs auch, aber gebootet hat das system trotzdem nicht und ich habe es auch nicht noch einmal nachvollziehen können, d.h. auch wenn ich jetzt die hdc Partitionen bei einen neuen Testaufbau formatiere geht e2fsck und resize2fs nicht.
Irgendwie erstellt mkraid kein filesystem auf md0, denn fdisk -lu /dev/md0 bringt folgende Fehlermeldung:
Disk /dev/md0: 40,0GB 40052588544 bytes
2 heads, 4 sectors/track, 9778464 Cylinders, total 78227712 sectors
Units=sectors of 1 * 512=512 bytes
Disk /dev/md0 doesn't contain a valid partitiontable
aber mounten kann ich /dev/md0 und darunter sind auch die üblichen Verzeichnisse
Und beim booten bringt er folgendes:
md: Autodetecting RAID Arrays
md: autorun ...
md: considering hdc2 ...
md: adding hdc2 ...
md: adding hda2 ...
md:created md0
md: bind <hda2>
md: bind <hdc2>
md: running: <hdc2><hda2>
md: personality 3 isd not loaded!
md: do_md_run() returned -22
md: md0 stopped
md: unbind <hdc2>
md: export_rdev(hdc2)
md: unbind <hda2>
md: export_rdev(hda2)
EXT2-FS: unable to read superblock
Minix-fs: unable to read superblock
isofs-fill-super: bread failed, dev=Md0, iso_blknum 16, block=32
Kernel Panic: VFS: unable to mount root filesystem on md0
Aber irgendwie muß das gehen, da ich mal versucht habe bereits bei der Installation ein Raid zu definieren als root zu mounten und darauf zu installieren und das hat einwandfrei funktioniert und er bootet auch vom raid. Aber selbst nachdem ich mir von dieser Installation die lilo.conf und fstab Konfigurationen aufgeschrieben und auf meinen Testaufbau eingesetzt habe kommt immer der Fehler: personality 3 is not loaded!
Kann mir bitte jemand weiterhelfen, ich komme an diesem Punkt einfach nicht weiter.
Ich versuche jetzt schon seit längerem ein bereits installiertes Suse Linux 9.1 auf Softwareraid 1 zu migrieren. Ich habe dazu im Internet recheriert und habe mich größtenteils an folgendes HOWTO ab Punkt 7.6 gehalten:
http://howtos.linux.com/howtos/Software-RAID-HOWTO-7.shtml
Hier meine Vorgehensweise:
Zum Anfang habe ich nur eine 40 GB Platte als hda angeschlossen und installiere Linux drauf. Linux unterteilt die Platte automatisch in 2 Partitionen: hda1 mit 1008 MB als swap und hda2 mit 37,7GB als /.
Am Ende der Installation lasse ich das Softwareupdate laufen und installiere alle verfügbaren Patche. Dann fahre ich das System runter und hänge eine baugleiche 40 GB Platte am 2 Controller als hdc ein. Dann starte ich Linux von der CD als rescue. Dann erstelle ich mit fdisk die exakt gleichen Partitionen auf hdc wie bei hda und formatiere sie mit mke2fs. Dann erstelle ich die folgende /etc/raidtab file:
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
persistent-superblock 1
chunk-size 4
device /dev/hda2
raid-disk 0
device /dev/hdc2
raid-disk 1
Danach erstelle ich das Raid mit folgendem Befehl:
mkraid --really-force /dev/md0
Anhand der /proc/mdstat sehe ich dann das er die Platten synchronisiert hat:
cat /proc/mdstat
Personalities: [raid1]
md0: active raid1 hdc2[] hda2[0]
39113856 blocks [2/2] [UU]
unused devices: <none>
Nach erfolgreicher Synchronisation, mounte ich /dev/md0 als root und erstelle folgende /etc/lilo.conf:
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
lba32
default=linux
image=/boot/vmlinuz
label=linux
read-only
root=/dev/md0
Danach lasse ich lilo laufen: /sbin/lilo -v
Reading boot sector from /dev/hda
Using Menu secondary loader
Calling map_insert_data
Mapping message file /boot/message
Calling map_insert_file
Boot image: /boot/vmlinuz vmlinuz-2.6.5.7.151-default
Added linux *
/boot/boot.0300 exist - mo backup copy made
Writing boot sector
Danach anstatt hda2 als / folgenden Eintrag in die /etc/fstab
/dev/md0 / ext3 defaults 1 1
Dann mit fdisk die Partitionstypen zu fd - Linux auto raid ändern.
Beide Festplatte sehen jetzt so aus:
fdisk -lu /dev/hda
Disk /dev/hda:41,1GB, 41110142976 bytes
16 heads, 63 sectors/track, 79656 cylinders, total 80293248 sectors
Units=sectors of 1 * 512=512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 63 2065391 1032664+ 82 Linux Swap
/dev/hda2 * 2065392 80293247 39113928 fd linux raid autodetect
Dann boote ich neu und lade das rescuesystem nochmal, weil ich nicht weiß wie ich / wieder unmounten kann, da das system immer sagt das / busy ist.
bei e2fsck -f /dev/md0 kommt folgender Fehler:
e2fsck 1.34 (25-Jul-2003)
Couldn't find ext2 superblock, trying backup blocks
e2fsck: Bad magic number in superblock while trying to open /dev/md0
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem, the superblock is corrupt and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
resize2fs bringt folgende Fehlermeldung:
resize2fs /dev/md0
resize2fs 1.34 (25-Jul-2003)
resize2fs: Bad magic number in super-block while trying to open /dev/md0. Couldn't find valid filesystem superblock
Am Anfang habe ich vergessen die hdc partitionen zu formatiern bevor ich mkraid ausgeführt habe, und als ich das zum ersten mal die hdc partitionen formatiert habe ging e2fsck und resize2fs auch, aber gebootet hat das system trotzdem nicht und ich habe es auch nicht noch einmal nachvollziehen können, d.h. auch wenn ich jetzt die hdc Partitionen bei einen neuen Testaufbau formatiere geht e2fsck und resize2fs nicht.
Irgendwie erstellt mkraid kein filesystem auf md0, denn fdisk -lu /dev/md0 bringt folgende Fehlermeldung:
Disk /dev/md0: 40,0GB 40052588544 bytes
2 heads, 4 sectors/track, 9778464 Cylinders, total 78227712 sectors
Units=sectors of 1 * 512=512 bytes
Disk /dev/md0 doesn't contain a valid partitiontable
aber mounten kann ich /dev/md0 und darunter sind auch die üblichen Verzeichnisse
Und beim booten bringt er folgendes:
md: Autodetecting RAID Arrays
md: autorun ...
md: considering hdc2 ...
md: adding hdc2 ...
md: adding hda2 ...
md:created md0
md: bind <hda2>
md: bind <hdc2>
md: running: <hdc2><hda2>
md: personality 3 isd not loaded!
md: do_md_run() returned -22
md: md0 stopped
md: unbind <hdc2>
md: export_rdev(hdc2)
md: unbind <hda2>
md: export_rdev(hda2)
EXT2-FS: unable to read superblock
Minix-fs: unable to read superblock
isofs-fill-super: bread failed, dev=Md0, iso_blknum 16, block=32
Kernel Panic: VFS: unable to mount root filesystem on md0
Aber irgendwie muß das gehen, da ich mal versucht habe bereits bei der Installation ein Raid zu definieren als root zu mounten und darauf zu installieren und das hat einwandfrei funktioniert und er bootet auch vom raid. Aber selbst nachdem ich mir von dieser Installation die lilo.conf und fstab Konfigurationen aufgeschrieben und auf meinen Testaufbau eingesetzt habe kommt immer der Fehler: personality 3 is not loaded!
Kann mir bitte jemand weiterhelfen, ich komme an diesem Punkt einfach nicht weiter.