Managing Lookback Devices
From Zanecorpwiki
Contents |
General Overview
Loopback devices are used for virtual filesystems.
Loopbacks and XEN
XEN ends up using lots of loop devices--in our setup, two for each domain, I believe though I'm not sure how to tell. Each disk uses one, and since we mount the iso image in each domain+the domains virtual HD, there's two. By default Linux supports 8 loop back devices, but it's easy to increase (though you've got to shut down all the domains).
Increasing Loopbacks
This isn't hard and doesn't require a reboot, but you do have to shut down anything using a loopback--which means all your XEN domains.
First, check /etc/modprobe.d/loop.conf and make sure it's empty (or non-existent). if it isn't adjust as necessary.
echo 'options loop max_loop=255' > /etc/modprobe.d/loop.local rmmod loop modprobe loop dmesg | grep loop # to double check
On SuSE 10.2, at least, loading the module will create the nodes. The Internet seems to think that this isn't always the case, so it's a good idea to check that the loop back devices do indeed get created, and if they are missing, create them with:
for i in `seq 8 255`; do mknod -m0660 /dev/loop$i b 7 8; done
Investigate and Control
Use 'losetup'.


