On Mon, Jan 31, 2011 at 5:08 PM, Richard W.M. Jones
<rjones@redhat.com> wrote:
On Mon, Jan 31, 2011 at 05:04:04PM +0530, vipul borikar wrote:
> Debug messages show like this:
> ***********************************************
> Fedora12 size 1048576000 bytes
> Fedora12-1 size 2097152000 bytes
> copying boot loader ...
> add_drive_ro "Fedora12"
> add_drive "Fedora12-1"
> launch
> Warning: No DNS servers found
> Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such
> file or directory
> blockdev_getss "/dev/sdb"
> part_list "/dev/sda"
> part_get_bootable "/dev/sda" 1
> part_get_mbr_id "/dev/sda" 1
> part_get_bootable "/dev/sda" 2
> part_get_mbr_id "/dev/sda" 2
> pvs_full
> vfs_type "/dev/sda1"
> mount_ro "/dev/sda1" "/"
> statvfs "/"
> umount_all
> vfs_type "/dev/sda2"
> mount_ro "/dev/sda2" "/"
> umount_all
> partitions found: /dev/sda1, /dev/sda2
> /dev/sda1:
> bootable = 1
> fssize = 928866304
> mbr_id = 131
> name = /dev/sda1
> part_end = 943750655
> part_num = 1
> part_size = 943718400
> part_start = 32256
> type = ext3
> /dev/sda2:
> bootable = 0
> fssize = undef
> mbr_id = 130
> name = /dev/sda2
> part_end = 996179455
> part_num = 2
> part_size = 52428800
> part_start = 943750656
> type = swap
> surplus before --expand or --shrink: 1098776576 (1.0G)
> Summary of changes:
> /dev/sda1: partition will be resized from 900.0M to 1.9G
> /dev/sda2: partition will be left alone
> part_get_parttype "/dev/sdb"
> partition table type: msdos
> list_partitions
> part_del "/dev/sdb" 2
> part_del "/dev/sdb" 1
> starting to partition from 64
> part_add "/dev/sdb" "primary" 64 3989311
> part_set_bootable "/dev/sdb" 1 true
> part_set_mbr_id "/dev/sdb" 1 131
> part_add "/dev/sdb" "primary" 3989312 4091711
> part_set_mbr_id "/dev/sdb" 2 130
> copy_size "/dev/sda1" "/dev/sdb1" 943718400
> copy_size "/dev/sda2" "/dev/sdb2" 52428800
> umount_all
> sync
> kill_subprocess
> *********************************************************************
[...]
The debug output all looks fine.
What does the partition table look like from within the resized
guest? (ie. fdisk -l ...)
fdisk -l gives like this
[root@localhost ~]# fdisk -l
Disk /dev/xvda: 2097 MB, 2097152000 bytes
255 heads, 63 sectors/track, 254 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000dada5
Device Boot Start End Blocks Id System
/dev/xvda1 * 1 249 1994624 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/xvda2 249 255 51200 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 886M 684M 158M 82% /
tmpfs 263M 0 263M 0% /dev/shm
It looks like it has increased the disk size.
but df shows old size
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 886M 684M 158M 82% /
tmpfs 263M 0 263M 0% /dev/shm
Do we have to manually do something inside the VM .
> One more thing i am able to boot the new image but not able to mount it.
Did you see this problem?
http://libguestfs.org/virt-resize.1.html#guest_boot_stuck_at_grub
Rich.
Grub is having no problem at all it works fine only that i am not able to mount it:
mount -o loop,offset=32256 Fedora12-1 /mnt/disk1/
mount: you must specify the filesystem type