Einfache Raid1 Wiederherstellung

FreeBSD, Gentoo, openSUSE, CentOS, Ubuntu, Debian
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

Hallo,

dumme Fragen - aber ich hab' mich wohl verzettelt und komm' nicht weiter. Folgende Situation: Bei einem Hetzner Rootie mit 2 HDs, welche im Software Raid1 laufen, hat sich eine HD verabschiedet.

Früherer Zustand vor HD Tausch:

Code: Select all

root@rescue /home # cat /proc/mdstat
Personalities : [raid1] 
md2 : active raid1 sda3[0] sdb3[1]
     730202368 blocks [2/2] [UU]
     [>....................]  resync =  4.9% (35799744/730202368) finish=110.0min
speed=105184K/sec

md1 : active raid1 sda2[0] sdb2[1]
     264960 blocks [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
     2102464 blocks [2/2] [UU]

unused devices: <none>
Nun war eine HD (sda) defekt und wurde ausgetauscht. Der Server konnte normal gebootet werden und läuft gut:

Code: Select all

cat /proc/mdstat
Personalities : [raid1] [raid0] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sdb1[1]
      2102464 blocks [2/1] [_U]
      
md1 : active raid1 sdb2[1]
      264960 blocks [2/1] [_U]
      
md2 : active raid1 sdb3[1]
      730202368 blocks [2/1] [_U]
      
unused devices: <none>
Es gibt auf der Maschine völlig standardisiert:

Code: Select all

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md2             724427316 182735704 505181496  27% /
/dev/md1                256586     82112    161226  34% /boot

Ich hab dann ein "mdadm /dev/md0 -a /dev/sda" gemacht. Leider ist das Hetzner Wiki hier nicht so 100% genau bzw. ich weiss nicht ob ich richtig adaptiert habe.

->

Code: Select all

cat /proc/mdstat
Personalities : [raid1] [raid0] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sda[0] sdb1[1]
      2102464 blocks [2/2] [UU]
      
md1 : active raid1 sdb2[1]
      264960 blocks [2/1] [_U]
      
md2 : active raid1 sdb3[1]
      730202368 blocks [2/1] [_U]
      
unused devices: <none>

Das isses ja (noch) nicht - was brauchts alles noch, damit der Raid wieder voll funktionsfähig ist? Der selbe Befehl wie oben nur noch mit md1 & md2 auf sda???

Vielen Dank für kurze Antwort :)



NACHTRAG: *Vermutlich* obsolet, da ich nach einer kurzen gedanklichen Pause, einem re-read des Wiki's und eines "mentalen" Neuanfangs es nun vermutlich hinbekommen habe. es synct gerade...

Code: Select all

cat /proc/mdstat
Personalities : [raid1] 
md2 : active raid1 sda3[2] sdb3[1]
      730202368 blocks [2/1] [_U]
      [>....................]  recovery =  0.3% (2354176/730202368) finish=108.2min speed=112103K/sec
      
md1 : active raid1 sda2[0] sdb2[1]
      264960 blocks [2/2] [UU]
      
md0 : active raid1 sda1[0] sdb1[1]
      2102464 blocks [2/2] [UU]
      
unused devices: <none>
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

OK, das mit dem RAID ist erledigt. Aber nach Einbindung der neuen Disc & Raid Sync hängt der Rechner beim booten. Vermutlich ein GRUB Problem....

CentOS. Meldung in der LaraCon:

Code: Select all

boot:
Booting from local disk....
PXE-M0F: Exiting PXE ROM.
GRUB _
Das war's.. weiter gehts nicht, da hängt er.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Einfache Raid1 Wiederherstellung

Post by Joe User »

Grub neu installieren, Config prüfen und danach neu in den MBR schreiben.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

Jain.... habe ich versucht. Grub neu installiert - aber dann hatte ich nur die GRUB Console, mehr nicht. Bei der ganzen Raid Aktion hat's irgendwie das /boot geleert, komplett. Kein /grub mehr drinnen und keine Kernel. Das habe ich aus einem Backup wiederhergestellt - und dann lief es. Jetzt checke ich gerade ein wenig... *seufz*. Wenn man das nicht so oft macht, dann schaudert's einem immer ein wenig.... :)

Danke!
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung - GRUB Problem

Post by Weltraumratte »

Ähm.... naja, zwar OT noch related zu diesem Raid-Vorfall:

Beim booten zeigt mir Grub ja eine Auswahl an Kernel:

http://imageshack.us/photo/my-images/703/grubkernel.png


Nun sieht meine /boot/grub/menu.lst aber (ganz) anders aus - da steht z.b. ein aktuellerer OpenVZ Kernel drinnen, einige andere sind deaktiviert. Wenn ich die menu.lst bearbeite, so hat das keinerlei Auswirkung auf das Grub-Menü?!

Öhm... mein Kenntnisstand war/ist, das die Auswahl über genau diese Datei gesteuert wird?! ...und ich auch die Default Config hier setze - Oder?! Zefix..
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Einfache Raid1 Wiederherstellung

Post by Joe User »

Zeige mal den Inhalt von /boot/grub mittels:

Code: Select all

ls -alh /boot/grub
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

Code: Select all

[root@dev grub]# ls -la
total 250
drwxr-xr-x 2 root root   1024 Jun  9 13:10 .
drwxr-xr-x 4 root root   5120 Jun  8 23:00 ..
-rw-r--r-- 1 root root     30 Sep 10  2010 device.map
-rw-r--r-- 1 root root     63 May 17  2010 device.map.backup
-rw-r--r-- 1 root root   7584 Sep 10  2010 e2fs_stage1_5
-rw-r--r-- 1 root root   7456 Sep 10  2010 fat_stage1_5
-rw-r--r-- 1 root root   6720 Sep 10  2010 ffs_stage1_5
-rw------- 1 root root   1305 Jun  9 13:10 grub.conf
-rw-r--r-- 1 root root   6720 Sep 10  2010 iso9660_stage1_5
-rw-r--r-- 1 root root   8224 Sep 10  2010 jfs_stage1_5
lrwxrwxrwx 1 root root     11 Sep 10  2010 menu.lst -> ./grub.conf
-rw-r--r-- 1 root root   6880 Sep 10  2010 minix_stage1_5
-rw-r--r-- 1 root root   9248 Sep 10  2010 reiserfs_stage1_5
-rw-r--r-- 1 root root  55808 Mar 16  2009 splash.xpm.gz
-rw-r--r-- 1 root root    512 Sep 10  2010 stage1
-rw-r--r-- 1 root root 104988 Sep 10  2010 stage2
-rw-r--r-- 1 root root   7072 Sep 10  2010 ufs2_stage1_5
-rw-r--r-- 1 root root   6272 Sep 10  2010 vstafs_stage1_5
-rw-r--r-- 1 root root   8872 Sep 10  2010 xfs_stage1_5
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Einfache Raid1 Wiederherstellung

Post by Joe User »

Code: Select all

cat /boot/grub/device.map /boot/grub/grub.conf
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

Code: Select all

(hd0)	/dev/sda
(hd1)	/dev/sdb
#
# Hetzner Online AG - installimage
# GRUB bootloader configuration file
#

timeout 5
default 0

title OpenVZ (2.6.18-238.12.1.el5.028stab091.1)
root (hd0,1)
kernel /vmlinuz-2.6.18-238.12.1.el5.028stab091.1 ro root=/dev/md2 vga=0x317 selinux=0
initrd /initrd-2.6.18-238.12.1.el5.028stab091.1.img

title OpenVZ (2.6.18-238.9.1.el5.028stab089.1)
root (hd0,1)
kernel /vmlinuz-2.6.18-238.9.1.el5.028stab089.1 ro root=/dev/md2 vga=0x317 selinux=0
initrd /initrd-2.6.18-238.9.1.el5.028stab089.1.img

title CentOS (2.6.18-194.32.1.el5)
root (hd0,1)
kernel /vmlinuz-2.6.18-194.32.1.el5 ro root=/dev/md2 vga=0x317
initrd /initrd-2.6.18-194.32.1.el5.img

title CentOS (2.6.18-194.26.1.el5.028stab079.2)
root (hd0,1)
kernel /vmlinuz-2.6.18-194.26.1.el5.028stab079.2 ro root=/dev/md2 vga=0x317
initrd /initrd-2.6.18-194.26.1.el5.028stab079.2.img

title CentOS (2.6.18-194.11.4.el5)
root (hd0,1)
kernel /vmlinuz-2.6.18-194.11.4.el5 ro root=/dev/md2 vga=0x317
initrd /initrd-2.6.18-194.11.4.el5.img

title CentOS (2.6.18-194.11.3.el5)
root (hd0,1)
kernel /vmlinuz-2.6.18-194.11.3.el5 ro root=/dev/md2 vga=0x317
initrd /initrd-2.6.18-194.11.3.el5.img

title CentOS Linux (2.6.18-194.11.1.el5)
root (hd0,1)
kernel /boot/vmlinuz-2.6.18-194.11.1.el5 ro root=/dev/md2 vga=0x317
initrd /boot/initrd-2.6.18-194.11.1.el5.img
Das ist halt aber nicht das, was im Screenshot angezeigt wird...
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Einfache Raid1 Wiederherstellung

Post by Joe User »

Theoretisch sollte Folgendes helfen können:

Code: Select all

grub --no-floppy


root (hd0,1)
setup (hd0)
quit
Eventuelle Fehlermeldungen bitte posten.

BTW: Ist /boot überhaupt auf hd0,1 (/dev/sda2) oder doch auf hd0,0 (/dev/sda1)?

Code: Select all

mount -l
ls -alh /boot
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

Code: Select all

mount -l
/dev/md2 on / type ext3 (rw)
proc on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/md1 on /boot type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

Code: Select all

ls -alh /boot
total 71M
drwxr-xr-x  4 root root 5.0K Jun  8 23:00 .
drwxr-xr-x 25 root root 4.0K Jun  8 23:13 ..
lrwxrwxrwx  1 root root    1 Sep 10  2010 boot -> .
-rw-r--r--  1 root root  66K Aug 30  2010 config-2.6.18-194.11.3.el5
-rw-r--r--  1 root root  66K Sep 21  2010 config-2.6.18-194.11.4.el5
-rw-r--r--  1 root root  66K Dec 17 17:31 config-2.6.18-194.26.1.el5.028stab079.2
-rw-r--r--  1 root root  66K Jan  6 00:31 config-2.6.18-194.32.1.el5
-rw-r--r--  1 root root  67K Jun  1 11:23 config-2.6.18-238.12.1.el5.028stab091.1
-rw-r--r--  1 root root  67K Apr 14 12:08 config-2.6.18-238.9.1.el5.028stab089.1
drwxr-xr-x  2 root root 1.0K Jun  9 13:10 grub
-rw-------  1 root root 2.8M Sep 10  2010 initrd-2.6.18-194.11.3.el5.img
-rw-------  1 root root 2.8M Sep 25  2010 initrd-2.6.18-194.11.4.el5.img
-rw-------  1 root root 2.8M Feb  1 13:05 initrd-2.6.18-194.26.1.el5.028stab079.2.img
-rw-------  1 root root 2.8M Feb  1 13:05 initrd-2.6.18-194.32.1.el5.img
-rw-------  1 root root 2.8M Jun  8 23:00 initrd-2.6.18-238.12.1.el5.028stab091.1.img
-rw-------  1 root root 2.8M May  4 18:09 initrd-2.6.18-238.9.1.el5.028stab089.1.img
drwx------  2 root root  12K Sep 10  2010 lost+found
-rw-r--r--  1 root root  79K Mar 16  2009 message
-rw-r--r--  1 root root 111K Aug 30  2010 symvers-2.6.18-194.11.3.el5.gz
-rw-r--r--  1 root root 111K Sep 21  2010 symvers-2.6.18-194.11.4.el5.gz
-rw-r--r--  1 root root 117K Dec 17 17:31 symvers-2.6.18-194.26.1.el5.028stab079.2.gz
-rw-r--r--  1 root root 111K Jan  6 00:32 symvers-2.6.18-194.32.1.el5.gz
-rw-r--r--  1 root root 118K Jun  1 11:23 symvers-2.6.18-238.12.1.el5.028stab091.1.gz
-rw-r--r--  1 root root 118K Apr 14 12:09 symvers-2.6.18-238.9.1.el5.028stab089.1.gz
-rw-r--r--  1 root root 1.2M Aug 30  2010 System.map-2.6.18-194.11.3.el5
-rw-r--r--  1 root root 1.2M Sep 21  2010 System.map-2.6.18-194.11.4.el5
-rw-r--r--  1 root root 1.3M Dec 17 17:31 System.map-2.6.18-194.26.1.el5.028stab079.2
-rw-r--r--  1 root root 1.2M Jan  6 00:31 System.map-2.6.18-194.32.1.el5
-rw-r--r--  1 root root 1.3M Jun  1 11:23 System.map-2.6.18-238.12.1.el5.028stab091.1
-rw-r--r--  1 root root 1.3M Apr 14 12:08 System.map-2.6.18-238.9.1.el5.028stab089.1
-r--------  1 root root  12M Dec 17 17:31 vmlinux-2.6.18-194.26.1.el5.028stab079.2
-r--------  1 root root  12M Jun  1 11:23 vmlinux-2.6.18-238.12.1.el5.028stab091.1
-r--------  1 root root  12M Apr 14 12:08 vmlinux-2.6.18-238.9.1.el5.028stab089.1
-rw-r--r--  1 root root 1.9M Aug 30  2010 vmlinuz-2.6.18-194.11.3.el5
-rw-r--r--  1 root root  163 Aug 30  2010 .vmlinuz-2.6.18-194.11.3.el5.hmac
-rw-r--r--  1 root root 1.9M Sep 21  2010 vmlinuz-2.6.18-194.11.4.el5
-rw-r--r--  1 root root  163 Sep 21  2010 .vmlinuz-2.6.18-194.11.4.el5.hmac
-rw-r--r--  1 root root 1.9M Dec 17 17:31 vmlinuz-2.6.18-194.26.1.el5.028stab079.2
-rw-r--r--  1 root root 1.9M Jan  6 00:31 vmlinuz-2.6.18-194.32.1.el5
-rw-r--r--  1 root root  163 Jan  6 00:31 .vmlinuz-2.6.18-194.32.1.el5.hmac
-rw-r--r--  1 root root 2.0M Jun  1 11:23 vmlinuz-2.6.18-238.12.1.el5.028stab091.1
-rw-r--r--  1 root root 2.0M Apr 14 12:08 vmlinuz-2.6.18-238.9.1.el5.028stab089.1
Vielen Dank für Deine Ansätze - dabei wäre ich (so direkt) gescheitert, in *dem* Thema war ich so noch nicht drinnen... Merci!

OK für Deine theoretische Lösung? :)
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Einfache Raid1 Wiederherstellung

Post by Joe User »

Wenn /dev/md1 aus /dev/sda1 und /dev/sdb1 besteht, dann sollte sich grub so neu in die MBRs schreiben lassen (Bitte jede Zeile einzeln ausführen):

Code: Select all

grub --no-floppy

root (hd1,0)
setup (hd1)
quit


grub --no-floppy

root (hd0,0)
setup (hd0)
quit
Etwaige Fehlermeldungen bitte posten.

Danach einen Reboot testen und berichten.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

Gab' 'ne Menge Meldungen:

Code: Select all

[root@dev grub]# grub --no-floppy
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> root (hd1,0)
root (hd1,0)
 Filesystem type unknown, partition type 0xfd
grub> setup (hd1)
setup (hd1)

Error 17: Cannot mount selected partition
grub> quit
quit
und

Code: Select all

[root@dev grub]# grub --no-floppy
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> root (hd0,0)
root (hd0,0)
 Filesystem type unknown, partition type 0xfd
grub> setup (hd0)
setup (hd0)

Error 17: Cannot mount selected partition
grub> quit
quit
Hab' noch nicht neu gestartet :)
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Einfache Raid1 Wiederherstellung

Post by Joe User »

Grr, also Brechstange:

Code: Select all

mkdir /root/grub_bak
mv /boot/grub/*1_5 /root/grub_bak/
Und dann bitte nochmal wie im vorigen Post vorgehen und die Ausgaben posten.
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

Hmmm brachte leider nicht viel Erfolg:


Code: Select all

grub --no-floppy
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> root (hd1,0)
root (hd1,0)
 Filesystem type unknown, partition type 0xfd
grub> setup (hd1)
setup (hd1)

Error 17: Cannot mount selected partition
grub> quit
quit
und

Code: Select all

grub --no-floppy
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> root (hd0,0)
root (hd0,0)
 Filesystem type unknown, partition type 0xfd
grub> setup (hd0)
setup (hd0)

Error 17: Cannot mount selected partition
grub> quit
quit

Das Verschieben hat bewirkt:

Code: Select all

ls /root/grub_bak/ -la
total 100
drwxr-xr-x 2 root root 4096 Jun  9 18:57 .
drwxr-x--- 5 root root 4096 Jun  9 18:57 ..
-rw-r--r-- 1 root root 7584 Sep 10  2010 e2fs_stage1_5
-rw-r--r-- 1 root root 7456 Sep 10  2010 fat_stage1_5
-rw-r--r-- 1 root root 6720 Sep 10  2010 ffs_stage1_5
-rw-r--r-- 1 root root 6720 Sep 10  2010 iso9660_stage1_5
-rw-r--r-- 1 root root 8224 Sep 10  2010 jfs_stage1_5
-rw-r--r-- 1 root root 6880 Sep 10  2010 minix_stage1_5
-rw-r--r-- 1 root root 9248 Sep 10  2010 reiserfs_stage1_5
-rw-r--r-- 1 root root 7072 Sep 10  2010 ufs2_stage1_5
-rw-r--r-- 1 root root 6272 Sep 10  2010 vstafs_stage1_5
-rw-r--r-- 1 root root 8872 Sep 10  2010 xfs_stage1_5
und im /grub

Code: Select all

ls -la
total 171
drwxr-xr-x 2 root root   1024 Jun  9 18:57 .
drwxr-xr-x 4 root root   5120 Jun  8 23:00 ..
-rw-r--r-- 1 root root     30 Sep 10  2010 device.map
-rw-r--r-- 1 root root     63 May 17  2010 device.map.backup
-rw------- 1 root root   1305 Jun  9 13:10 grub.conf
lrwxrwxrwx 1 root root     11 Sep 10  2010 menu.lst -> ./grub.conf
-rw-r--r-- 1 root root  55808 Mar 16  2009 splash.xpm.gz
-rw-r--r-- 1 root root    512 Sep 10  2010 stage1
-rw-r--r-- 1 root root 104988 Sep 10  2010 stage2
Sorry :)
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Einfache Raid1 Wiederherstellung

Post by Joe User »

Ich hasse SoftwareRAID unter Linux, macht einem ständig unnötige Probleme...

Das haben wir uns noch nicht angesehen:

Code: Select all

cat /boot/grub/device.map.backup

fdisk -l
Mich stört diese Zeile:
Filesystem type unknown, partition type 0xfd
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

:)

Code: Select all

cat /boot/grub/device.map.backup
# this device map was generated by anaconda
(hd0)     /dev/sda

Code: Select all

fdisk -l

Disk /dev/sda: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         262     2102562   fd  Linux raid autodetect
/dev/sda2             263         295      265072+  fd  Linux raid autodetect
/dev/sda3             296       91201   730202445   fd  Linux raid autodetect

Disk /dev/sdb: 750.1 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         262     2102562   fd  Linux raid autodetect
/dev/sdb2             263         295      265072+  fd  Linux raid autodetect
/dev/sdb3             296       91201   730202445   fd  Linux raid autodetect

Disk /dev/md2: 747.7 GB, 747727224832 bytes
2 heads, 4 sectors/track, 182550592 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md1: 271 MB, 271319040 bytes
2 heads, 4 sectors/track, 66240 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md0: 2152 MB, 2152923136 bytes
2 heads, 4 sectors/track, 525616 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table
Öhm....
doesn't contain a valid partition table
?!
Last edited by Weltraumratte on 2011-06-10 10:31, edited 1 time in total.
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Einfache Raid1 Wiederherstellung

Post by Joe User »

Gut, dann sollte es so funktionieren:

Code: Select all

grub --no-floppy

root (hd1,1)
setup (hd1)
quit


grub --no-floppy

root (hd0,1)
setup (hd0)
quit
Ausgabe?
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

Code: Select all

grub --no-floppy
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> root (hd1,1)
root (hd1,1)
 Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd1)
setup (hd1)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... no
 Running "install /boot/grub/stage1 (hd1) /boot/grub/stage2 p /boot/grub/grub.conf "... succeeded
Done.
grub> quit
quit
und

Code: Select all

grub --no-floppy
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> root (hd0,1)
root (hd0,1)
 Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... no
 Running "install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/grub.conf "... succeeded
Done.
grub> quit
quit
Yay! Nach einem Reboot stimmt's nun auch und er hat den aktuellen OpenVZ Kernel am Start.... leider habe ich derzeit keine LaraCon dran, das ich das Grub-Menü nicht sehen konnte, aber ich gehe davon aus, das es stimmt...

Vielen herzlichen Dank, alleine wäre ich da nie drauf gekommen, das übersteigt sowohl mein RAID- als auch vor allem mein GRUB-Know How.... ^:)^ :ymapplause:

Raid habe ich nun durch den ersten Zwischenfall auf der Maschine nun etwas besser durchschaut.... ein wenig was gelernt :)
User avatar
Joe User
Project Manager
Project Manager
Posts: 11190
Joined: 2003-02-27 01:00
Location: Hamburg
 

Re: Einfache Raid1 Wiederherstellung

Post by Joe User »

Puh, bin ich froh, dass es endlich wieder läuft. Ist mir ja schon fast etwas peinlich, dass es so lange gedauert hat. Danke für Deine Geduld!
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Weltraumratte
Posts: 55
Joined: 2004-07-27 14:49
Location: Wild South Germany
 

Re: Einfache Raid1 Wiederherstellung

Post by Weltraumratte »

Joe User wrote:Puh, bin ich froh, dass es endlich wieder läuft. Ist mir ja schon fast etwas peinlich, dass es so lange gedauert hat. Danke für Deine Geduld!
Du wie gesagt, ich bin super happy das Du Dir da die Zeit und Mühe gemacht hast! Mir isses zwar immer lieber ich lerne dabei auch ein wenig für die Zukunft, aber ich hätt' mich in diesem Fall nicht so schnell durch Grub wühlen können und die Gefahr den Server durch Try'n'Error ganz zu erlegen, das wäre auch nicht so fein.

Zumindest weiss ich jetzt ein wenig mehr über Raid & Wiederherstellung auf den Hetzner-Mühlen, das nehm' ich mal so mit. Und wenn ich irgend wann mal wieder so ein Problem hab, dann hat's hier ein Referenz-Thread ;)

Vielen Dank noch mal und happy Pfingst-WE, haste Dir verdient! :-BD
Last edited by Weltraumratte on 2011-06-10 13:54, edited 1 time in total.