I have a KVM guest requiring more space on one of it's partitions. This partition is actually an LVM volume on the host. So I first unmounted the partition in the guest, switched to the host and resized my Logical Volume with lvextend:
lvextend -L +100G /dev/vg/lv01
I then checked the file system:
e2fsck -f /dev/vg/lv01 ... /dev/vg/lv01: 244/6553600 files (4.1% non-contiguous), 21374526/26214400 blocks
and extended it:
before a final check:
e2fsck -f /dev/vg/lv01 ... /dev/vg/lv01: 244/13107200 files (4.1% non-contiguous), 21785726/52428800 blocks
Notice the increase in block count? All looks good! I can mount the file system on the host and read it's contents and parted shows the new size on the single ext4 partition:
parted /dev/vg/lv01 GNU Parted 2.3 Using /dev/dm-3 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Model: Linux device-mapper (linear) (dm) Disk /dev/dm-3: 215GB Sector size (logical/physical): 512B/512B Partition Table: loop Number Start End Size File system Flags 1 0.00B 215GB 215GB ext4
All done. Unfortunately the device can not be mounted in my KVM guest. I tried to remount the virtual device on the host:
mount /dev/vdb mount: wrong fs type, bad option, bad superblock on /dev/vdb, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
and parted in the guest reports:
parted /dev/vdb GNU Parted 2.3 Using /dev/vdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Error: /dev/vdb: unrecognised disk label
What am I missing? I have tried a reboot of the guest with no better results, presumably there is one more step on the guest I need to do before the volume is readable . . .
Ubuntu 12.04 LTS is the OS in both host and guest. Any help greatly appreciated.