Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#503044: xen-utils-common: should make the loopback device default to supporting more nodes

2 views
Skip to first unread message

Russell Coker

unread,
Oct 21, 2008, 11:20:11 PM10/21/08
to
Package: xen-utils-common
Version: 3.2.0-2
Severity: normal

When file: sources are used for Xen block devices the Xen system will
use a loopback device for each one. It's quite common for DomUs to be
configured with two block devices (one for storage and one for swap) and
not uncommon to have a block device for each filesystem (which makes it
easier to grow filesystems).

Therefore the default of 8 loopback devices will allow an absolute
maximum of 8 DomUs with file: block devices, 4 DomUs that have separate
block devices for swap and storage, and 2 or less if each DomU has more
devices.

It seems reasonable to create a file /etc/modprobe.d/xen that contains
the following line to alleviate this:
options loop max_loop=32

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Anders Kaseorg

unread,
Aug 23, 2009, 12:40:09 PM8/23/09
to
On Wed, 22 Oct 2008, Russell Coker wrote:
> It seems reasonable to create a file /etc/modprobe.d/xen that contains
> the following line to alleviate this:
> options loop max_loop=32

Since kernel 2.6.22, loop devices are allocated dynamically, so that you
can `mknod /dev/loopN b 7 N` for any N and start using it immediately.
The max_loop option causes more loop devices to be preallocated, but also
disables dynamic allocation.

So maybe this problem is better solved by teaching /etc/xen/scripts/block
to mknod a new loop device if it can’t find one free. Untested patch:

--- xen-common/tools/hotplug/Linux/block
+++ xen-common/tools/hotplug/Linux/block
@@ -329,6 +329,13 @@
fi
done

+ if [ "$loopdev" = '' ]
+ then
+ loopdev=$(seq -f '/dev/loop%.f' 0 1048575 | \
+ grep -Fxv -m1 -f <(echo /dev/loop* | tr ' ' '\n')) && \
+ mknod "$loopdev" b 7 "${loopdev#/dev/loop}"
+ fi
+
if [ "$loopdev" = '' ]
then
release_lock "block"

Anders

0 new messages