[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] Image Not Expanding



On Mon, Jan 31, 2011 at 05:30:07PM +0530, vipul borikar wrote:
> 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 .

Oh right, I see.  Are you using an ancient version of virt-resize
(ie. 1.2.<something>)?

For these very old versions of virt-resize you do need to manually
expand the filesystem inside the VM.  Just do:

  resize2fs /dev/xvda1

In more recent versions of virt-resize, virt-resize itself does this
automatically.

> 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

Not sure what you're trying to do, but try using guestfish:

  guestfish --ro -i Fedora12-1

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]