当我安装 qcow2 时,例如qemu-nbd --connect=/dev/nbd0 /path/image.qcow2
,fdisk /dev/nbd0 -l
列出了在 上不可见的分区/dev/
。当我mount /dev/nbd0 /path
它只安装应该是第一个分区的时候。并partx -a /dev/nbd0
给出partx: /dev/nbd0: failed to read partition table
如何管理分区,单独操作它们?
通缉输出fdisk
:
Disk /dev/nbd0: 154.28 GiB, 165654993920 bytes, 323544910 sectors
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: 0x6c727443
Device Boot Start End Sectors Size Id Type
/dev/nbd0p1 1970237472 3672215697 1701978226 811.6G 75 PC/IX
/dev/nbd0p2 1929382413 3883035520 1953653108 931.6G 72 unknown
/dev/nbd0p3 0 0 0 0B 0 Empty
/dev/nbd0p4 27394442 27394879 438 219K 0 Empty
Partition table entries are not in disk order.