diskutil verify disk disagrees with gpt and gdisk
diskutil verify disk disagrees with gpt and gdisk
- Subject: diskutil verify disk disagrees with gpt and gdisk
- From: Chris Murphy <email@hidden>
- Date: Wed, 02 Oct 2013 13:55:54 -0600
OS X 10.8.5, 2 out of 3 user space tools claim the GPT is corrupt: gdisk 0.8.7 and gpt. This is the gpt output.
ming:~ chris$ sudo gpt -r -vv show disk0
Password:
gpt show: disk0: mediasize=256060514304; sectorsize=512; blocks=500118192
gpt show: disk0: PMBR at sector 0
gpt show: disk0: Bad CRC in GPT table at sector 2
gpt show: disk0: Sec GPT at sector 500118191
start size index contents
0 1 PMBR
1 500118158
500118159 32 Sec GPT table
500118191 1 Sec GPT header
diskutil verifydisk reports no problems:
ming:~ chris$ diskutil verifydisk /dev/disk0
Started partition map verification on disk0
Checking prerequisites
Checking the partition list
[…]
The volume 80925599-CABA-4E1B-9AA4-9280E2C5E648 appears to be OK
The partition map appears to be OK
Finished partition map verification on disk0
Which is correct?
If I reboot linux and run the same version of gdisk on the same internal disk, it reports the GPT is OK. GNU parted also reports the GPT is OK (or at least, it doesn't say the primary table checksum mismatches the checksum in the header). If I use dd to copy the first 4 LBA's of the drive from within linux and again from OS X, the two binaries are identical.
Seems there's a bug here but I'm not sure where it is, and it's not reproducible on a vintage MacbookPro 4,1 with the same versions of everything as the 8,2. The 4,1 also has an HDD. The 8,2 has a Samsung 830 series SSD, TRIM is not forced to be enabled. Kinda weird.
Weirder, if I have gdisk write out a new GPT, the problem is fixed for both gdisk and GPT, and diskutil reports the same results. It persists after a reboots. But at some inexplicable time, the problem resurfaces (it's not like I'm checking GPT checksums every day).
Chris Murphy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden