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
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