VMware Cloud Community
ckoehler8708
Contributor
Contributor
Jump to solution

corrupt partition

My 286MB locker-Parition on my System sd-card is corrupt.

How can I format this Partition?

I tried to repair the filesystem with

dosfsck -a -w /dev/disks/mpx.vmhba32:0:T0:l0:8

but it Fails (could not auto-correct)

Interactive mode (dosfsck -r) crashes.

other partitions on my sd-card (bootbank, altbootbank) are still working.

Christian

1 Solution

Accepted Solutions
welder314
Enthusiast
Enthusiast
Jump to solution

Hi Christian, I know this post is quite old, but I though I would answer in case anyone happens to search. There's no need to mess with the partitions, you can simply reformat the partition:

vmkfstools -C vfat -S vfatPrt1 /dev/disks/mpx.vmhba32:C0:T0:L0:8

You will end up with a new disk ID of course.

Then recreate the symlink to store if you need:

rm store

ln -s /vmfs/volumes/[new disk ID] store

No reboot required.

View solution in original post

13 Replies
Marmotte94
Enthusiast
Enthusiast
Jump to solution

Hi Christian,

Did you try this KB ? VMware Knowledge Base

Thank you,

Regards,

Olivier.

Please, visit my blog http://www.purplescreen.eu/
Reply
0 Kudos
ckoehler8708
Contributor
Contributor
Jump to solution

Hi Olivier.

Thank you for your quick answer.

No, i did not try that kb.

I think, VOMA will only work with vmfs-partitions.

My parition is a vfat.

df -h

vfat   249.7M  156.7M     93.0M 63% /vmfs/volumes/60c4f6e3-f21bd513-c9a6-885fdf021ddb

vfat   249.7M  156.7M     93.0M 63% /vmfs/volumes/a2260ce7-eefc7e44-c1ae-885a5a99387c

vfat   285.8M  205.9M     79.9M 72% /vmfs/volumes/57d17f4b-8b732350-b28f-a0369fb89a00

on that disk, there are 6 partitions - number 8 is the problematic one:

gpt

968 255 63 15564800

1 64 8191 C12A7328F81F11D2BA4B00A0C93EC93B systemPartition 128

5 8224 520191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0

6 520224 1032191 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0

7 1032224 1257471 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0

8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0

9 1843200 7086079 9D27538040AD11DBBF97000C2911D1B8 vmkDiagnostic 0

I followed the instructions in kb-arcticle 2033564 VMware Knowledge Base .

That article handles a very similar thing, except that I have a Problem with the /store -Partion not with then /altbootbank.

Unfortunately, the dosfck could not repair it.

Regards.

Christian

Reply
0 Kudos
Marmotte94
Enthusiast
Enthusiast
Jump to solution

Hi,

Yes, sorry... Smiley Wink

I think you can solve your problem whit this post : Corrupted vfat in esxi 6.0

Thank you,

Regards,

Olivier

Please, visit my blog http://www.purplescreen.eu/
Reply
0 Kudos
Marmotte94
Enthusiast
Enthusiast
Jump to solution

First, I think, you can try to fix your partition with partedUtil tool.

Thank you,

Olivier

Please, visit my blog http://www.purplescreen.eu/
Reply
0 Kudos
ckoehler8708
Contributor
Contributor
Jump to solution

thany you olivier.

i know that really nice article on tirrell.ca.

Jeremy Tirrell ended up in recreating a complete new Partition table.

May be, there is a better way to delete only the corrupt Partition.

I don't know the exact Syntax for the partedUtil.

In a testsystem, I've tried to erase the partion with

partedUtil mklabel /dev/disks/mpx.vmhba1:C0:T0:L0:8 gpt

unfortunately, after that command,

df -h

is no longer working (error cannot ope volume).

Christian

Reply
0 Kudos
Marmotte94
Enthusiast
Enthusiast
Jump to solution

Show help file to help yourself.

[root@esxi:~] partedUtil --help

Usage:

Get Partitions : get <diskName>

Set Partitions : set <diskName> ["partNum startSector endSector type attr"]*

Delete Partition : delete <diskName> <partNum>

Resize Partition : resize <diskName> <partNum> <start> <end>

Get Partitions : getptbl <diskName>

Set Partitions : setptbl <diskName> <label> ["partNum startSector endSector type/guid attr"]*

Fix Partition Table : fix <diskName>

Create New Label (all existing data will be lost): mklabel <diskName> <label>

Show commonly used partition type guids : showGuids

Get usable first and last sectors : getUsableSectors <diskName>

Fix GPT Table interactively : fixGpt <diskName>

Please, visit my blog http://www.purplescreen.eu/
Reply
0 Kudos
Marmotte94
Enthusiast
Enthusiast
Jump to solution

Use Delete option.

You can see on this article how to delete a partition to the bottom.

Thank you,

Please, visit my blog http://www.purplescreen.eu/
Reply
0 Kudos
ckoehler8708
Contributor
Contributor
Jump to solution

sorry...

I know, how to delete the Partition:

partedUtil delete /dev/disks/mpx.vmhba32:C0:T0:L0 8

But I don't know how to recreate only the affected Partition

partedUtil setptbl "/dev/disks/mpx.vmhba32:C0:T0:L0" gpt "8 1257504 1843199 EBD0A0A2B9E5443387C068B6B72699C7 0"

this will create only one parition, the others will go away

Is there a way, to recreate (clear) only Partition 8 and leave the others untouched?

Thank you for your Patience.

Christian

Reply
0 Kudos
Marmotte94
Enthusiast
Enthusiast
Jump to solution

Hi,

I think you can recreate with this command line but in the post from Jeremy Tirrell, he had an error when he tried to recreate.

But this command is right.

Good luck

Thank you,

Olivier,

Please, visit my blog http://www.purplescreen.eu/
Reply
0 Kudos
ckoehler8708
Contributor
Contributor
Jump to solution

Hi again.

on my testsystem, i tried to do the same like Jeremy in his post.

deleted the Partition, disabled coredump, recreated all paritions and reenabled coredump.

But I did not end with an empty new volume. My 286MB volume is still filled, nothing has changed....

So I don't like to do this on my Produktion System.

I will think about a reinstall the hypervisor and restore the config-backup.

Christian.

Reply
0 Kudos
welder314
Enthusiast
Enthusiast
Jump to solution

Hi Christian, I know this post is quite old, but I though I would answer in case anyone happens to search. There's no need to mess with the partitions, you can simply reformat the partition:

vmkfstools -C vfat -S vfatPrt1 /dev/disks/mpx.vmhba32:C0:T0:L0:8

You will end up with a new disk ID of course.

Then recreate the symlink to store if you need:

rm store

ln -s /vmfs/volumes/[new disk ID] store

No reboot required.

Genka
Contributor
Contributor
Jump to solution

I logged in just to say thanks, your belated post got me out of an 11pm hole with a corrupted /store partition on a 6.5 ESXi host that had to be back up and running before morning.

I couldn't see anything in /store on another host in the same cluster that looked host-specific so I just scp'ed the contents across from one to the other before rebooting the host and all was right with the world.

Thanks again for making the effort to post it here, welder314

Reply
0 Kudos
DaDjuL
Contributor
Contributor
Jump to solution

This saved my life too, I could format the partition and copy the content from another host

How can this happen on 2 hosts in the same cluster two months after upgrade to 6.5

Reply
0 Kudos