Thanks for the welcome!
I ran the sync command and issued a "shutdown -h now", but the partitions disappeared still. So I have to mount the qcow2 image on the host and recreate the partitions:
Code:
root@bottle-o:/zpool0# qemu-nbd --connect=/dev/nbd0 /zpool0/Zimbra-disk1.qcow2
root@bottle-o:/zpool0# fdisk /dev/nbd0
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x8c5a5586.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Eventually add all the partitions back and end up with:
Code:
Command (m for help): p
Disk /dev/nbd0: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders, total 12582912 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
Disk identifier: 0xad968f19
Device Boot Start End Blocks Id System
/dev/nbd0p1 63 257039 128488+ 83 Linux
/dev/nbd0p2 257040 12578894 6160927+ 5 Extended
/dev/nbd0p5 257103 11582864 5662881 83 Linux
/dev/nbd0p6 11582928 12578894 497983+ 83 Linux swap / Solaris
I then use a rescue cd and get grub back on the disk, and the guest then boots ok. I decided to check what the partitions look like inside the guest, and get this:
Code:
root@coffeeshop:~# fdisk -l /dev/vda
Disk /dev/vda: 6442 MB, 6442450944 bytes
16 heads, 63 sectors/track, 12483 cylinders, total 12582912 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
Disk identifier: 0x00000000
Disk /dev/vda doesn't contain a valid partition table
Bookmarks