ESXi: The primary GPT table states that the backup GPT is located beyond the end of disk

Neue HDD in ESXi eingebaut. Die Festplatte war „blank“, in Windows angezeigt als „nicht initialisiert“, keine Daten.

Via UI einen Datastore drauf erstellen scheitert einfach nur:

Also: erst mal den Namen der HDD rausfinden. Das funktioniert am schnellsten via UI:

Via SSH auf den Hypervisor, mal schauen was Phase bei der Platte ist:

[root@root-01:~] partedUtil "getptbl" /vmfs/devices/disks/t10.ATA_HGST_HUH7210_2THSBPND

Error: Function not implemented during read on /dev/disks/t10.ATA_HGST_HUH7210_2THSBPND
Error: The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Fix, by writing backup table at the end? This will also fix the last usable sector appropriately as per the new reduced size. diskPath (/dev/disks/t10.ATA_HGST_HUH7210_2THSBPND) diskSize (19532873728) AlternateLBA (97660174335) LastUsableLBA (97660174302)
Warning: The available space to /dev/disks/t10.ATA_HGST_HUH7210_2THSBPND appears to have shrunk. This may happen if the disk size has reduced. The space has been reduced by (78127300608 blocks). You can fix the GPT to correct the available space or continue with the current settings ? This will also move the backup table at the end if it is not at the end already. diskSize (19532873728) AlternateLBA (97660174335) LastUsableLBA (97660174302) NewLastUsableLBA (19532873694)
Error: Can't have a partition outside the disk!
Unable to read partition table for device /vmfs/devices/disks/t10.ATA_HGST_HUH7210_2THSBPND

Zusammenfassung des Essays von oben: Partitionstabelle ist kaputt. Dann überschreiben wir sie einfach, liegt ja sowieso nichts an relevanten Daten drauf:

[root@root-01:~] partedUtil mklabel /vmfs/devices/disks/t10.ATA_HGST_HUH7210_2THSBPND msdos

Der Befehl gibt nichts zurück – in der Linux-Welt was gutes.

Noch mal checken, ob das sauber lief:

[root@root-01:~] partedUtil "getptbl" /vmfs/devices/disks/t10.ATA_HGST_HUH7210_2THSBPND

msdos

Hat geklappt. Die Platte ist nun sauber initialisiert und kann in ESXi als Datastore genutzt werden.

Kategorie: vSphere

tino-ruge.de wird tino-kuptz.de

Im Laufe des Jahres 2024 wird dieser Blog umziehen. Alle Inhalte werden 1:1 weitergeleitet, nix geht verloren. Neue Domain, alter Autor, alter Inhalt.