Mount more than 8 loopback devices

  • 3143620
  • 29-Nov-2006
  • 30-Apr-2012

Environment


Novell Open Enterprise Server (Linux based)
Novell SUSE Linux Enterprise Server 9 (SLES9)
Novell SUSE Linux Enterprise Server 10 (SLES10)
Novell SUSE Linux Enterprise Desktop 10 (SLED10)

Situation

/dev/loop8: No such device
Unable to mount more than 8 loopback devices
Mount more than 8 loopback devices

Resolution

There are three steps you need to take to use additional loop devices:

1. Configure the additional loop devices in the kernel
For SLES9:
Append "max_loop=[X]" (minus the quote marks) to the boot line, where [X] is the number of devices you want enabled. You can use up to 255, and remember is numbered starting with 0.
You will probably want to modify your boot loader configuration to append the max_loop parameter automatically.

For SLES10/SLED10
Create /etc/modprobe.d/loop and add the following line to the file:
options loop max_loop=[X]

2. Create the additional loop devices
Use the mknod command to create additional loop devices. For example, if you wanted to use an additional 12 devices, for a total of 20, then you could do the following:

for NODE in $(seq 8 19)
do
mknod -m 660 /dev/loop$NODE b 7 $NODE
done
chown root:disk /dev/loop*

3. Reboot to activate the additional loop devices

Additional Information

The kernel built by SUSE / Novell has loopback support built in. However, the default is to have 8 devices enabled, /dev/loop0 - /dev/loop7. If you want to use more than those 8 loop devices, you will need to use the max_loop kernel parameter in SLES9 or the module options parameter in SLES10:

Formerly known as TID# 10100867