Thanks for the Respose.
On Mon, Jan 31, 2011 at 3:37 PM, Richard W.M. Jones <rjones(a)redhat.com>wrote:
On Mon, Jan 31, 2011 at 01:48:04PM +0530, vipul borikar wrote:
> Hello,
> I am running xen with libvirt. I have an image(Fedora12) with
xen
> para virt and run with the help of libvirt.
> So i wanted to increase the size of this image from 1GB to 2 GB.
>
>
> I am using virt-resize command for this.
>
> When i do : virt-list-partitions it displays 2 partitions 1]
/dev/sda1
> and 2] /dev/sda2
>
> I want to resize this to 2 gb
>
> So i do like this: virt-resize --expand /dev/sda1 Fedora12
Fedora12-1
This looks fine, but what is 'Fedora12-1'? It's presumably a raw disk
file. What is its size? What command did you use to create the file?
I created Fedora12-1 using this command
dd if=/dev/zero of=Fedora12-1 bs=1024k count=2000
it is 2gb disk.
Also please show the full messages that virt-resize printed when you
ran the command.
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
*********************************************************************
> Actually from outside its sda1 partition but sincce it is para
virt it
show
> xvda1 after VM boot up which still shows old size.
This doesn't matter.
Also make sure you're booting with the new image file, not the old one ...
Yes i am sure i am booting with new Image file.
One more thing i am able to boot the new image but not able to mount it.
Rich.
Thanks
Vipul