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

Re: [Xen-users] DomU partition resize problem



Jean Baptiste FAVRE wrote:
Hello everybody,
I'm playing with Xen and trying to extend DomU disk space.

My Configuration:
Dom0: all Xen machine are HVM. They're installed on LVM.
I've one VG (XEN) on Dom0 and created a LV (here, xps.101.disk) per DomU.

disk configuration in xen conf is as follow:
disk         = [
                'phy:/dev/XEN/xps.%d.disk,ioemu:hda,w' % (vmid)
               ]
Where vmid is a parameter given to xm create.
All work pretty well but resize2fs.

Increasing DomU disk size consists in lvextend. That has been done.
Rebooting DomU gives me additionnal free space on virtual disk.

Here's currently what I have:
From Dom0:
## lvdisplay /dev/XEN/xps.101.disk
#  --- Logical volume ---
#  LV Name                /dev/XEN/xps.101.disk
#  VG Name                XEN
#  LV UUID                CKJ6N0-Hf7r-eMiP-GLxb-MNqp-4fB2-ac3VsF
#  LV Write Access        read/write
#  LV Status              available
#  # open                 2
#  LV Size                10,00 GB
#  Current LE             2560
#  Segments               1
#  Allocation             inherit
#  Read ahead sectors     auto
#  - currently set to     256
#  Block device           254:0

From DomU
## fdisk -l /dev/hda
#
#Disk /dev/hda: 10.7 GB, 10737418240 bytes
#255 heads, 63 sectors/track, 1305 cylinders
#Units = cylinders of 16065 * 512 = 8225280 bytes
#
#   Device Boot      Start         End      Blocks   Id  System
#/dev/hda1   *           1         336     2698888+  83  Linux
#/dev/hda2             337        1174     6731235    5  Extended
#/dev/hda5 337 381 361431 82 Linux swap / #Solaris
#/dev/hda6             382        1174     6369741   83  Linux

So I can see additionnal space, but resize2fs /dev/hda6 7G failed:

## resize2fs /dev/hda6 7G
#resize2fs 1.40-WIP (14-Nov-2006)
#La partition (ou le périphérique) n'a seulement que 1592435 (4k) blocs.
#Vous avez demandé une nouvelle taille de 1835008 blocs.

In english, partition (or device) only have 1592435 (4k) blocks.
You requested new size of 1835008 blocks.


Any idea to get it working ?

From what I see, it looks like you are trying to resize the file system on /dev/hda6 to be 7GB but, from looking at the size of the partition from fdisk, the partition is only about 6GB. I might be wrong on my math but it is only 8225280 * (1174 - 382) bytes, or, 6514421760 bytes. What I would try to do is just do 'resize2fs /dev/hda6'. Leave off the size at the end. In that case, resize2fs will just expand the filesystem to use the full size of whatever partition it is on. There is one idea.

Mike

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.