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] Resize domU block device?

To: "Ralf Müller" <ralf@xxxxxxxx>
Subject: Re: [Xen-users] Resize domU block device?
From: "Todd Deshane" <deshantm@xxxxxxxxx>
Date: Tue, 20 Nov 2007 14:05:23 -0500
Cc: Errol Neal <eneal@xxxxxxxxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 20 Nov 2007 11:06:15 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=6QQBakQmPu5ibWJAcpJYAnSacPl4NC+TpSuO4K3Rif4=; b=ojhHneWOzAGERMWsP4wit/aKEZopspkGDp+CVxKxd2DcniFF6+9hvbt6xUy+TTancYxBYS+eR13PGQInuROfzx8rbJDDdMlITRfNMTRPaY9nwi6pHTT0WXVGfFLvqunNqCC1DUwQ4DvOkHI1XiffED7l4WX9woNTNWoaF9UG2AE=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=YAOskStIGCFn0EvQYHSLXVb3S7bhOdOp2MwL/TxEO1mAfjWdA66tK2aphUqR7DsTqMAffUuVgpP52gkZcxNpjkjSmRTLHchRlRwgKBDRdDNDAtyG/rWhTos5/7T11+QG2kryAx95aXL2DEnd3x90HqbybDNfEZGlb89krTqzTyk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <D976D165-7C42-4F34-90B5-4101F7D342BD@xxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4CE02D8F-499B-4030-89E2-10F9B945C112@xxxxxxxx> <20071119115440.e2fxp4ja8g44sss4@xxxxxxxxxxxxxxxxxxxxxxxx> <D976D165-7C42-4F34-90B5-4101F7D342BD@xxxxxxxx>
Reply-to: deshantm@xxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx


On Nov 19, 2007 12:42 PM, Ralf Müller <ralf@xxxxxxxx> wrote:

Am 19.11.2007 um 17:54 schrieb Errol Neal:

> Quoting Ralf Müller <ralf@xxxxxxxx>:
>
>> Is there a way for a domU to discover size changes of block
>> devices modified by dom0?

> The domU will be aware of the additional space.

Ok - I did it again :)

dom0 > rpm -q xen
xen-3.1.0_15042-51
dom0 > lvdisplay /dev/data0/test-xx
  --- Logical volume ---
  LV Name                /dev/data0/test-xx
  VG Name                data0
  LV UUID                U8e3ZH-xMFZ-TwUf-qpi1-r5Ee-y07c-PtskZe
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.00 GB
  Current LE             256
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:47

give it to test domU:
disk=[ 'phy:/dev/data0/test-hda,xvda,w',
    'phy:/dev/data0/test-swap,xvdb2,w',
    'phy:/dev/data0/test-xx,xvdc1,w',
]

test > mkfs.xfs /dev/xvdc1
test > mount /dev/xvdc1 /mnt/
test > df /mnt/
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/xvdc1             1038336       288   1038048   1% /mnt

dom0 > lvresize -L+1G /dev/data0/test-xx
  Extending logical volume test-xx to 2.00 GB
  Logical volume test-xx successfully resized

test > xfs_growfs /mnt/
meta-data=""             isize=256    agcount=8, agsize=32768
blks
         =                       sectsz=512   attr=0
data     =                       bsize=4096   blocks=262144, imaxpct=25
         =                       sunit=0      swidth=0 blks,
unwritten=1
naming   =version 2              bsize=4096
log      =internal               bsize=4096   blocks=2560, version=1
         =                       sectsz=512   sunit=0 blks, lazy-
count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0
test > df /mnt/
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/xvdc1             1038336       288   1038048   1% /mnt

The filesystem is still 1GB. What am I doing wrong?

I am not sure if the feature is available in the version of Xen you are using or not, but the fact that it has been done, see the thread below, means that there is hope, you may just need to upgrade the version and/or apply patches.

 http://forums.xensource.com/message.jspa?messageID=8404

Also online resizing is also available in ext3, at least that is true for growing of partitions.

I hope to look into these type of issues soon and I will report more if I find out more.

If you reply back and have questions or comments for me, make sure I am in the CC, as I don't always have time to follow the list completely.

Best Regards,
Todd



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

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