More loop devices

More loop devices

I have this very special server at work : a sunfire x4200 8 core 8GB RAM
To use the full given power, I tried to install xen on ubuntu, but it were freezing all the time. It seems to be a “TAP” problem, but I couldn’t fix it.
So I tried a Debian 5.0.3 dom0, and the problem is slightly different : now the domU won’t find its drives if I use “tap:aio”.
Ok, go back to the old “file:” driver.
This one is using loop devices to enable the drives, and only 8 default loop devices are enabled on debian (/dev/loop0 to /dev/loop7). As I want 7 domU, and at least 2 drives for each one (root and swap), I need more than 8 of these.
Here’s how to add more loop devices :

On Debian and ubuntu loop is a module, and you can specify the number of loop devices you want in /etc/modules. Replace :
[cc lang=”bash”]loop[/cc]
[cc lang=”bash”]loop max_loop=64[/cc]
(64 for example)

Then you have to disable the module :
[cc lang=”bash”]rmmod loop[/cc]
and re-enable it :
[cc lang=”bash”]modprobe loop[/cc]

But the new devices won’t append automatically for sure, so if you don’t see them in /dev/loop*, you can make them appear this way :
Edit /sbin/MAKEDEV and change :
[cc lang=”bash”] loop)
for part in 0 1 2 3 4 5 6 7
makedev loop$part b 7 $part $disk


[cc lang=”bash”] loop)
for part in `seq 0 63`
makedev loop$part b 7 $part $disk

And execute
[cc lang=”bash”]$ MAKEDEV loop[/cc]

For me this step didn’t work either, so I had to create it really by hand :
[cc lang=”bash”]for i in $(seq 0 63); do
mknod -m0660 /dev/loop$i b 7 $i
chown root.disk /dev/loop$i

Comments are closed.
adipiscing at id, dapibus non elit.