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/
Home Products Support Community News


Re: [Xen-users] How to increase loop device ?

To: Claudiu Curcă <alexstrasza2@xxxxxxxxx>
Subject: Re: [Xen-users] How to increase loop device ?
From: yassine ayachi <ayachi.yassine@xxxxxxxxx>
Date: Mon, 11 Apr 2011 16:45:36 +0100
Cc: rudi@xxxxxxxxxxx, xen-users@xxxxxxxxxxxxxxxxxxx, "Fajar A. Nugraha" <list@xxxxxxxxx>
Delivery-date: Mon, 11 Apr 2011 08:47:21 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type; bh=9TlXQRNEC8EwJAHOlzNqmlgOSg5jDrCAU86TQ1IITWo=; b=wbI5CN+IkCLzjacihtEiSda1OO9P0WpLZBcmbp1OTe89cxeNl0HW2sJGWZ0OTmYswv mTIO4qwRvz8uZ3iiwRkt5Y33Nopi15kQ+Y0WW5pOqHFmM5jEduYkAX4ntFJQKGDbQDpZ m1eFc+543qeKc4s9Wz2bTTQAP5spycW5uHlqU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=iPh1/GvjY5XAJYDkkIzWY+cDMhQrErXZsXzogFXPINnpumg5c/0Ul30gjDOZPJOltK FZ5vbQ/wf0YU67qv5bPZmsrAh1t43lQbL71asfL8HJEUzpA8Kslv48NIJKPQFiayzXOW lOVyLCY9Cth9vqN4Unmqis5GPNLsooZcYjfow=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BANLkTikRaUw+AhhHAOAMAOA6i+sK-DkyNg@xxxxxxxxxxxxxx>
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: <BANLkTi=80XpEw3MSS94o1Zh7vmrjT_5jKQ@xxxxxxxxxxxxxx> <BANLkTik28KYJiUGVw4tuFhaOP-isf4YDTw@xxxxxxxxxxxxxx> <sig.1082845643.BANLkTi=06Zj7JcSkE4FzK6ZrSHMO=tcp+A@xxxxxxxxxxxxxx> <BANLkTikRaUw+AhhHAOAMAOA6i+sK-DkyNg@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi Claudiu,

Thank you very much, your solution is safe and worked for me just fine,

I just noticed that the best way to shutdown a domU is to do "xm shutdown" instead of "xm destroy" for the loop devices to be properly unmounted and reused,

thanks to those who responded,

2011/4/11 Claudiu Curcă <alexstrasza2@xxxxxxxxx>
On Mon, Apr 11, 2011 at 12:43 PM, Rudi Ahlers <Rudi@xxxxxxxxxxx> wrote:
> On Mon, Apr 11, 2011 at 11:37 AM, Fajar A. Nugraha <list@xxxxxxxxx> wrote:
>> On Mon, Apr 11, 2011 at 4:29 PM, yassine ayachi
>> <ayachi.yassine@xxxxxxxxx> wrote:
>>> you could pass it as an option to your kernel at boot time, if you use grub,
>>> add  "max_loop=64" at the end of your kernel line, then reboot the server
>>> and look how much devices are declared in /dev/loop*
>> IIRC it should be loop.max_loop=64 when on kernel line
>>> As you can see it requires to reboot the server which is not possible since
>>> it is a production server :
>>> Can someone please give me a proposal to increase loop devices without
>>> rebooting the server ?
>> Not possible.
>> ... alhtough depending on the version of Xen you use, you can try
>> using "tap:aio:/" instead of "file:/" on your domU config file.
>> --
>> Fajar
>> _______________________________________________
> Is it not maybe possible to change this value with ksplice, and thus
> not have to reboot?
You could manually create the loop devices. They have major number 7

mknod -m660 /dev/loopX b 7 X && chown root:disk /dev/loopX

Replace X with the numbers that continue your existing loop devices.

For example, if you have /dev/loop0 through /dev/loop7, you could
create /dev/loop8 and so forth by issuing

mknod -m660 /dev/loop8 b 7 8 && chown root:disk /dev/loop8
mknod -m660 /dev/loop9 b 7 9 && chown root:disk /dev/loop9

You might want to script the creation if you plan to create many
additional loop devices via a for loop.

Yassine AYACHI
Ingénieur réseaux et systèmes

Xen-users mailing list
<Prev in Thread] Current Thread [Next in Thread>