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

[Xen-users] Expanding a virtual block device

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] Expanding a virtual block device
From: Vivien Bernet-Rollande <vivien.bernet-rollande@xxxxxxxxxxxxxxxxx>
Date: Thu, 28 Apr 2011 14:33:51 +0200
Delivery-date: Thu, 28 Apr 2011 05:35:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Lightning/1.0b2 Thunderbird/3.1.9
Hi list.

I'm running Xen 4.0.1 on Debian.

I'm trying to live resize a block device :

 - I have a arbitrary block device in my dom0 (/dev/mapper/vm-vol42).
- I start a PV domain with that device as a disk (disk = ['phy:/dev/mapper/vm-vol42,xvda,w']).
 - I resize vm-vol42 in the dom0 (adding size only)
 - the dom0 sees the device's new size.
 - the domU still has a disk of the old size.
- I want the domU to see the new disk with it's actual size, so it can resize partitions and filesystems on said disk.

From my research I have gathered :
- on XenServer or XCP, there is a "xe vdi-resize" command. But since I'm on debian, no "xe" for me, and I'm not even sure it works online. - Browsing in the XenApi code showed an interesting method, VBD_media_change. However, it seems to allow only for changing read-only CD images. However, Xxm does not look like it uses it. - I cannot pause the domU, remove the device, add it back and unpause the domain (the block-dettach operation hangs on a paused domain). I can do it quite fast without unpausing, but it's not fully transparent, and can't be done on the root device. - I cannot issue a scsi rescan in dom0 since the xvd devices don't go through the scsi subsystem (and I couldn't find anything relevant in /sys/devices/vbda nor /sys/classes/block/xvda (apart from a read only "size" file).

I know I could just use LVM in the domU, create and attach a new block device, and grow my vg and lv in the domU. However this means managing more volumes, and I'd rather manage a 50GB volume than 5 10GB volumes.

So, the end question : how can I notify Xen that the device's size has changed, so the VBD's size in the domU will also increase ?

--
Vivien Bernet-Rollande
Systems&  Networking Engineer
Alter Way Hosting


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] Expanding a virtual block device, Vivien Bernet-Rollande <=