Ask Your Question
1

How can I resolve "loop mount error" with LXC on Havana

asked 2014-01-09 11:58:49 -0500

mulligan gravatar image

updated 2014-01-10 14:34:01 -0500

smaffulli gravatar image

While bringing up a CentOS VM on LXC I receive the following in the Nova Compute log:

INFO nova.virt.disk.mount.loop [req-9330fa3f-2382-4830-80c8-49ca13b3175a da96a07549e3438f9cfff823eeacba3a ab6c5a4d00cc4566a219258eb3d12d70] Loop mount error: Could not attach image to loopback: losetup: /dev/cinder-volumes/instance-00000034_disk: warning: file smaller than 512 bytes, the loop device maybe be useless or invisible for system tools.
INFO nova.virt.disk.mount.loop [req-9330fa3f-2382-4830-80c8-49ca13b3175a da96a07549e3438f9cfff823eeacba3a ab6c5a4d00cc4566a219258eb3d12d70] Loop mount error: Could not attach image to loopback: Unexpected error while runningNFO nova.virt.disk.mount.loop [req-9330fa3f-2382-4830-80c8-49ca13b3175a da96a07549e3438f9cfff823eeacba3a ab6c5a4d00cc4566a219258eb3d12d70] Loop mount error: Could not attach image to loopback: losetup: /dev/cinder-volumes/instance-00000034_disk: warning: file smaller than 512 bytes, the loop device maybe be useless or invisible for system tools.

INFO nova.virt.disk.mount.loop [req-9330fa3f-2382-4830-80c8-49ca13b3175a da96a07549e3438f9cfff823eeacba3a ab6c5a4d00cc4566a219258eb3d12d70] Loop mount error: Could not attach image to loopback: Unexpected error while running command.
Command: sudo nova-rootwrap /etc/nova/rootwrap.conf losetup --find --show /dev/cinder-volumes/instance-00000034_disk
Exit code: 255
Stdout: ''
Stderr: 'losetup: could not find any free loop device\n'
WARNING nova.virt.disk.mount.api [req-9330fa3f-2382-4830-80c8-49ca13b3175a da96a07549e3438f9cfff823eeacba3a ab6c5a4d00cc4566a219258eb3d12d70] Device allocation failed after repeated retries. command.
    Command: sudo nova-rootwrap /etc/nova/rootwrap.conf losetup --find --show /dev/cinder-volumes/instance-00000034_disk
    Exit code: 255
    Stdout: ''
    Stderr: 'losetup: could not find any free loop device\n'
    WARNING nova.virt.disk.mount.api [req-9330fa3f-2382-4830-80c8-49ca13b3175a da96a07549e3438f9cfff823eeacba3a ab6c5a4d00cc4566a219258eb3d12d70] Device allocation failed after repeated retries.
edit retag flag offensive close delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-01-11 18:11:11 -0500

gfa gravatar image

> Stderr: 'losetup: could not find any free loop device\n'

either you don't have the loop module loaded or all the loop devices are in used,

lsmod |grep loop to check if is loaded, losetup -a to check if loop devices are in use

edit flag offensive delete publish link more
0

answered 2014-02-06 23:50:12 -0500

Li Ma gravatar image

Your loop devices are all in use.

  1. You can release a certain loop device (/dev/loop7) for future use, but you also need to make sure the right one is released.
  2. losetup -d /dev/loop7

  3. It is possible to increase the number of available loop devices. Free all loop devices and dynamically reload the module with the right parameter:

  4. rmmod loop
  5. modprobe loop max_loop=255 This will be restored after reboot.

  6. Permanent Change: Add a line with the following to /etc/modprobe.conf (for some linux distribution the file should be /etc/modprobe.d/modprobe.conf), then reboot your system to activate the new value.

  7. options loop max_loop=255
edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

Asked: 2014-01-09 11:58:49 -0500

Seen: 275 times

Last updated: Feb 06