partedUtil delete "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0" 2
F2 --> 選Troubleshooting Options -->
Enable ESXi Shell
Enable SSH
Modify ESXi Shell timeout -->30秒
Alt+F1 切換Console畫面輸入帳號密碼
ls /vmfs/devices/disks/
mpx.vmhba0:C0:T0:L0 <-- disk device
mpx.vmhba0:C0:T0:L0:1 <-- partition 1
mpx.vmhba0:C0:T0:L0:2 <-- partition 2
mpx.vmhba0:C0:T0:L0:3 <-- partition 3
mpx.vmhba0:C0:T0:L0:5 <-- partition 5
naa.60060160205010004265efd36125df11 <-- disk device
naa.60060160205010004265efd36125df11:1 <-- partition 1
show出格式
partedUtil getptbl "/vmfs/devices/disks/DeviceName"
gpt
13054 255 63 209715200
| | | |
| | | \----- quantity of sectors
| | \-------- quantity of sectors per track
| \------------ quantity of heads
\------------------ quantity of cylinders(13054是100GB)
1 2048 209712509 AA31E02A400F11DB9590000C2911D1B8vmfs 0
| | | | |
| | | | \--- attribute
| | | \------- type
| | \----------------- ending sector
| \------------------------- starting sector
\--------------------------- partition number
partedUtil showGuids
A: the volume was created as VMFS 3 and was later updated to VMFS 5
B: the volume was freshly formatted and partitioned as VMFS 5
A:
partedUtil setptbl "/vmfs/devices/disks/eui.3238373535393136" gpt "1 128 209712509 AA31E02A400F11DB9590000C2911D1B8 0"
B:
partedUtil setptbl "/vmfs/devices/disks/eui.3238373535393136" gpt "1 2048 209712509 AA31E02A400F11DB9590000C2911D1B8 0"
Using partedUtil to recover an esxi5 partition table (從IBM文章找到的有用Link)
Problem(Abstract)
Partition tables have at times been overwritten causing VMFS volumes
to become inaccessible. In esxi5 the partedUtil needs to be used to
recover/recreate the partitions.
Resolving the problem
Besides the difference in using the partedUtil instead of fdisk as in the past, the
biggest challenge is knowing what the end sector must be. fdisk was more helpful
in finding the ending sector. This procedure assumes the full LUN is being used for the partition.
The last sector of a VMFS volume must end on a cylinder boundary. The following
formula can be used to find that sector:
end sector = (C * H * S) -1
C = cylinders
H = Heads
S = Sectors/track
To get the cyclinder/heads/sectors information execute the following query:
# partedUtil get /vmfs/devices/disks/mpx.vmhba1:C0:T4:L0
93990 255 63 1509949440
Collect the info and using the formula:
Cylinders = 93990
Heads = 255
Sectors/track = 63
(93990 * 255 * 63) -1 = 1509949349
The VMFS GUID is AA31E02A400F11DB9590000C2911D1B8
The command to recreate would be the following....
partedUtil setptbl "/vmfs/devices/disks/mpx.vmhba1:C0:T4:L0" gpt "1 2048 1509949349 AA31E02A400F11DB9590000C2911D1B8 0"
To print the table:
partedUtil getptbl "/vmfs/devices/disks/mpx.vmhba1:C0:T4:L0"
The above information was derived from the following web link:
http://communities.vmware.com/message/1990824
======================================================
In addition, I found the following information at this link:
http://www.virtuallyghetto.com/2011/07/how-to-format-and-create-vmfs-volume.html
This information explains different offsets you may encounter. Along with this information
I also observed in the lab that VMFS3 filesystems created in esxi5 have an offset of "2048".
The reference disk used in the web link:
# partedUtil get /dev/disks/eui.3238373535393136
254803 255 63 4093411328
The two kinds of examples demonstrated in the link:
A: the volume was created as VMFS 3 and was later updated to VMFS 5
B: the volume was freshly formatted and partitioned as VMFS 5
The two command examples....
A:
partedUtil setptbl "/vmfs/devices/disks/eui.3238373535393136" gpt "1 128 4093410194 AA31E02A400F11DB9590000C2911D1B8 0"
B:
partedUtil setptbl "/vmfs/devices/disks/eui.3238373535393136" gpt "1 2048 4093410194 AA31E02A400F11DB9590000C2911D1B8 0"
======================================================
Some additional information links:
http://kb.vmware.com/kb/1036609 for partutil information....and GUID information
http://kb.vmware.com/kb/1009829 for some pre-5.0 information.....
留言列表