WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] DomU partition resize problem

To: jean-baptiste.favre@xxxxxxxxxx
Subject: Re: [Xen-users] DomU partition resize problem
From: Mike Lovell <mike@xxxxxxxxxxxx>
Date: Tue, 11 Nov 2008 11:14:01 -0700
Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 11 Nov 2008 10:14:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4916EF61.5040502@xxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4916EF61.5040502@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (X11/20080925)
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

<Prev in Thread] Current Thread [Next in Thread>