虚拟磁盘大小信息似乎不正确,但无法执行任何分区操作

虚拟磁盘大小信息似乎不正确,但无法执行任何分区操作

我有一个.vmdk文件需要从中提取数据。我将该.vmdk文件添加为虚拟机的辅助硬盘 ( /dev/sdb),并尝试挂载它,但没有成功。

# mount /dev/sdb ./target

mount: /home/suhdonghwi/Documents/target: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error.

我运行fdisk后输出为:

# fdisk -l /dev/sdb

GPT PMBR size mismatch (524287999 != 260503551) will be corrected by write.
Disk /dev/sdb: 124.22 GiB, 133377818624 bytes, 260503552 sectors
Disk model: VMware Virtual S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1           1 260503551 260503551 124.2G ee GPT

看到后GPT PMBR size mismatch (524287999 != 260503551),我运行了gdisk验证:

# gdisk /dev/sdb

GPT fdisk (gdisk) version 1.0.5

Warning! Disk size is smaller than the main header indicates! Loading
secondary header from the last sector of the disk! You should use 'v' to
verify disk integrity, and perhaps options on the experts' menu to repair
the disk.
Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!
Main header: OK
Backup header: ERROR
Main partition table: OK
Backup partition table: ERROR
Command (? for help): v

Caution: The CRC for the backup partition table is invalid. This table may
be corrupt. This program will automatically create a new backup partition
table when you save your partitions.

Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.

Problem: Disk is too small to hold all the data!
(Disk size is 260503552 sectors, needs to be 524288000 sectors.)
The 'e' option on the experts' menu may fix this problem.

Problem: GPT claims the disk is larger than it is! (Claimed last usable
sector is 524287966, but backup header is at
524287999 and disk size is 260503552 sectors.
The 'e' option on the experts' menu will probably fix this problem

Problem: partition 3 is too big for the disk.

Partition(s) in the protective MBR are too big for the disk! Creating a
fresh protective or hybrid MBR is recommended.

Identified 6 problems!

gdisk建议我进入专家模式并输入e修复问题的方法。但还是失败了:

Command (? for help): x

Expert command (? for help): e
Relocating backup data structures to the end of the disk

Expert command (? for help): w

Warning! Secondary partition table overlaps the last partition by
263782433 blocks!
You will need to delete this partition or resize it in another utility.

Problem: partition 3 is too big for the disk.
Aborting write operation!
Aborting write of new partition table.

说我必须在另一个实用程序中调整分区 3 的大小。因此我尝试使用parted它来执行此操作,但出现了以下错误:

(parted) p                                                                
Error: Invalid argument during seek for read on /dev/sdb
Retry/Ignore/Cancel? I                                                    
Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
OK/Cancel? O                                                              
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sdb: 133GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 

我认为这与不正确的大小信息有关。我有-flat.vmdk.vmdk文件。我还尝试重新创建.vmdk描述符文件,但没有成功。我没有解决方案,我该怎么办?

答案1

如果您需要从虚拟磁盘文件内部恢复一些数据,可以使用 7-Zip 打开 .vmdk 文件。然后使用复制选项。7-Zip 支持映像文件内的分区。

相关内容