VMFS Partitionstabelle unter ESX 3.x wiederherstellen

Sollten nach einem Neustart eines ESX Servers nicht alle Partitionen gefunden werden, so kann es eventuell an einer defekten Partitionstabelle liegen. Dies passiert wenn z.B. VCB installiert wird und vorher kein

diskpart
automount disable
automount scrub

durchgeführt wurde (bei bestehender SAN Verbindung zum VMFS.)

Prüfung der SAN Devices

Verbinden Sie sich mit der ESX Server Konsole (auch SSH ist möglich) und vergewissern Sie sich root Rechte zu besitzen. Mit dem Befehl

esxcfg-vmhbadevs

werden alle HBAs gelistet und entsprechende Mountpoints angezeit. Die Ausgabe entspricht ungefähr dem

vmhba0:0:0     /dev/cciss/c0d0
vmhba1:0:1     /dev/sda
vmhba1:0:2     /dev/sdb
vmhba1:0:3     /dev/sdc
vmhba1:0:4     /dev/sdd
vmhba1:0:5     /dev/sde
vmhba1:1:0     /dev/sdf

Anzeige der Partitionen

Mit dem Befehl

fdisk -lu

lassen sich die Partitionen anzeigen. In meinem Beispiel sollte die Ausgabe so aussehen

Disk /dev/sda: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders, total 2147483648 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1           128 2147483647 1073741760   fb  Unknown

Disk /dev/sdb: 1053.0 GB, 1053027532800 bytes
255 heads, 63 sectors/track, 128023 cylinders, total 2056694400 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1           128 2056689494 1028344683+  fb  Unknown

Disk /dev/sdc: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders, total 2147483648 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdc1           128 2147483647 1073741760   fb  Unknown

Disk /dev/sdd: 1053.0 GB, 1053027532800 bytes
255 heads, 63 sectors/track, 128023 cylinders, total 2056694400 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdd1           128 2056689494 1028344683+  fb  Unknown

Disk /dev/sde: 143.5 GB, 143502671872 bytes
255 heads, 63 sectors/track, 17446 cylinders, total 280278656 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sde1           128 280269989 140134931   fb  Unknown

Disk /dev/sdf: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders, total 2147483648 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdf1          128 2147483647 1073741760   fb  Unknown

Für eine einfache Form lässt sich auch der Befehl

fdisk -lu /dev/sda

verwenden. Die Ausgabe würde dann entsprechend gekürzt.

Disk /dev/sda: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders, total 2147483648 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1           128 2147483647 1073741760   fb  Unknown

Wichtig ist die letzte Zeile

/dev/sda1           128 2147483647 1073741760   fb  Unknown

Diese besagt, dass die Partition existiert (/dev/sda1) und vom Typ VMFS ist (Id - fb). Der Eintrag Unknown ist normal und kann ignoriert werden. Wenn die Ausgabe dem obigen entspricht, liegt kein Problem mit dem Dateisystem vor.

Fehler der Partitionstabelle

Sollte die Bildschirmausgabe nicht dem obigen entsprechen, kann das auf einen VMFS Partitionsfehler deuten. Die Ausgabe könnte dann ungefähr so aussehen

Disk /dev/sda: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders, total 2147483648 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk /dev/sda doesn't contain a valid partition table

oder so

Disk /dev/sda: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders, total 2147483648 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot    Start       End    Blocks   Id  System

Außerdem können im /var/log/kernel.log eine oder mehrere dieser Einträge erscheinen.

 
cpu0)WARNING: SCSI: 6011: SCSI IO to non-existent partition 1, np 5 
cpu0)WARNING: SCSI: 5935: returns 0xbad0011 for vmhba0:0:68
cpu0:1031)LVM: 2294: Could not open device , vol [45e3ef74-706b3012-b730-000423cd, 45e3ef74-706b3012-b730-000423cd17ea, 1]: No such partition on target
cpu0:1031)FSS: 343: Failed with status 0xbad0012 for f530 28 1 45e3ef75 b000548 400d1b0 ea17cd23 0 0 0 0 0 0 0
cpu1:1039)WARNING: Vol3: 607: Couldn't read volume header from 4816d0dd-804c9a8c-2c76-001e0beb5f56: Address temporarily unmapped

Reparatur Partitionstabelle

WICHTIG: Die folgenden Schritte können bei fehlerhafter oder unangebrachter Anwendung zum totalen Datenverlust führen. Also am Besten niemals benutzten ohne den VMware Support vorher kontaktiert zu haben.

Defekte Partitionstabelle auswählen

fdisk /dev/sda

Hier wird angenommen, die Partition sda muss repariert werden.

Command action
e extended
p primary partition (1-4)

p - Wir wollen eine primäre Partition anlegen.

Partition Number (1-4):

1 - Auswahl der Partitionsnummer; In den meisten Fällen die 1.

Navigation
Werkzeuge