Xen Notes

Increasing the number of loop devices

If you run multiple Xen machines, at some point the default number of loop devices might become too small and cause such errors in /var/log/xen/xen-hotplug.log:

 xenstore-read: couldn't read path backend/vbd/23/2051/node

If you have Eucalyptus installed then the symptoms are that some of the newly created instances just terminate shortly after creation. In my case for example, I couldn't get over 2 running instances at one box at once

You can see how many loop devices you have currently by executing the following:

 # ls -l /dev/loop* |wc -l

8 would be the typical answer on Redhat/Fedora. To increase to e.g. 64:

  1. Add options loop max_loop=64 to the /etc/modprobe.conf (max value is 256)
  2. (in redhat 4/5 and clones) /sbin/rmmod loop ; /sbin/modprobe loop
  3. ls -l /dev/loop* |wc -l to check that the num bre of loop devices has increased

On Ubuntu 9.04 Jaunty: In theory (didn't work for me):

  1. vi /etc/modprobe.d/local.conf (create or modify)
  2. add options loop max_loop=64
  3. reboot

In practice:

 ~$ cat loop.sh
 for i in $(seq 8 255); do
        mknod -m0660 /dev/loop$i b 7 $i
        chown root.disk /dev/loop$i
 done

Talks and presentations

Cloud administration

Cloud usage

Reading

Blix theme adapted by David Gilbert, powered by PmWiki