Thanks for the Respose.<br><br><div class="gmail_quote">On Mon, Jan 31, 2011 at 3:37 PM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Mon, Jan 31, 2011 at 01:48:04PM +0530, vipul borikar wrote:<br>
> Hello,<br>
>           I am running xen with libvirt. I have an image(Fedora12) with xen<br>
> para virt and run with the help of libvirt.<br>
> So i wanted to increase the size of this image from 1GB to 2 GB.<br>
><br>
><br>
> I am using virt-resize command for this.<br>
><br>
> When  i do :  virt-list-partitions   it displays 2 partitions   1] /dev/sda1<br>
> and 2] /dev/sda2<br>
><br>
> I want to resize this to 2 gb<br>
><br>
> So i do like this:      virt-resize --expand /dev/sda1 Fedora12 Fedora12-1<br>
<br>
</div>This looks fine, but what is 'Fedora12-1'?  It's presumably a raw disk<br>
file.  What is its size?  What command did you use to create the file?<br></blockquote><div><br>I created Fedora12-1 using this command<br><br>dd if=/dev/zero of=Fedora12-1 bs=1024k count=2000<br><br>it is 2gb disk. <br>
 <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Also please show the full messages that virt-resize printed when you<br>
ran the command.<br></blockquote><div><br>Debug messages show like this:<br>***********************************************<br>Fedora12 size 1048576000 bytes<br>Fedora12-1 size 2097152000 bytes<br>copying boot loader ...<br>
add_drive_ro "Fedora12"<br>add_drive "Fedora12-1"<br>launch<br>Warning: No DNS servers found<br>Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory<br>
blockdev_getss "/dev/sdb"<br>part_list "/dev/sda"<br>part_get_bootable "/dev/sda" 1<br>part_get_mbr_id "/dev/sda" 1<br>part_get_bootable "/dev/sda" 2<br>part_get_mbr_id "/dev/sda" 2<br>
pvs_full<br>vfs_type "/dev/sda1"<br>mount_ro "/dev/sda1" "/"<br>statvfs "/"<br>umount_all<br>vfs_type "/dev/sda2"<br>mount_ro "/dev/sda2" "/"<br>umount_all<br>
partitions found: /dev/sda1, /dev/sda2<br>/dev/sda1:<br>        bootable = 1<br>        fssize = 928866304<br>        mbr_id = 131<br>        name = /dev/sda1<br>        part_end = 943750655<br>        part_num = 1<br>        part_size = 943718400<br>
        part_start = 32256<br>        type = ext3<br>/dev/sda2:<br>        bootable = 0<br>        fssize = undef<br>        mbr_id = 130<br>        name = /dev/sda2<br>        part_end = 996179455<br>        part_num = 2<br>
        part_size = 52428800<br>        part_start = 943750656<br>        type = swap<br>surplus before --expand or --shrink: 1098776576 (1.0G)<br>Summary of changes:<br>/dev/sda1: partition will be resized from 900.0M to 1.9G<br>
/dev/sda2: partition will be left alone<br>part_get_parttype "/dev/sdb"<br>partition table type: msdos<br>list_partitions<br>part_del "/dev/sdb" 2<br>part_del "/dev/sdb" 1<br>starting to partition from 64<br>
part_add "/dev/sdb" "primary" 64 3989311<br>part_set_bootable "/dev/sdb" 1 true<br>part_set_mbr_id "/dev/sdb" 1 131<br>part_add "/dev/sdb" "primary" 3989312 4091711<br>
part_set_mbr_id "/dev/sdb" 2 130<br>copy_size "/dev/sda1" "/dev/sdb1" 943718400<br>copy_size "/dev/sda2" "/dev/sdb2" 52428800<br>umount_all<br>sync<br>kill_subprocess<br>*********************************************************************<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
> Actually from outside its sda1 partition but sincce it is para virt it show<br>
> xvda1  after VM boot up which still shows old size.<br>
<br>
</div>This doesn't matter.<br>
<br>
Also make sure you're booting with the new image file, not the old one ...<br></blockquote><div><br>Yes i am sure i am booting with new Image file.  <br><br>One more thing i am able to boot the new image but not able to mount it. <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Rich.<br></blockquote><div><br><br>Thanks<br>Vipul <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/%7Erjones" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming blog: <a href="http://rwmj.wordpress.com" target="_blank">http://rwmj.wordpress.com</a><br>
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)<br>
<a href="http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora" target="_blank">http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora</a><br>
</font></blockquote></div><br>