Mailing List Archive

max_loop device problem
Hi all,

Hope you are all doing well...

I had a problem on creating 9th domain in my system.

I am using Cent-OS 3.4 and xen-2.0.6.. Obviously it's a loop back
device mount issue. I have my grub.conf entry as follows

title Xen-2.6
root (hd0,0)
kernel /xen.gz dom0_mem=65536
module /vmlinuz-2.6.11.10-xen0 root=/dev/hda6 ro console=tty0 max_loop=256

ls -l /dev/loop*

brw-rw---- 1 root disk 7, 0 Sep 9 2004 /dev/loop0
brw-rw---- 1 root disk 7, 1 Sep 9 2004 /dev/loop1
brw-rw---- 1 root disk 7, 10 Sep 9 2004 /dev/loop10
brw-rw---- 1 root disk 7, 11 Sep 9 2004 /dev/loop11
brw-rw---- 1 root disk 7, 12 Sep 9 2004 /dev/loop12
brw-rw---- 1 root disk 7, 13 Sep 9 2004 /dev/loop13
brw-rw---- 1 root disk 7, 14 Sep 9 2004 /dev/loop14
brw-rw---- 1 root disk 7, 15 Sep 9 2004 /dev/loop15
brw-rw---- 1 root disk 7, 2 Sep 9 2004 /dev/loop2
brw-rw---- 1 root disk 7, 3 Sep 9 2004 /dev/loop3
brw-rw---- 1 root disk 7, 4 Sep 9 2004 /dev/loop4
brw-rw---- 1 root disk 7, 5 Sep 9 2004 /dev/loop5
brw-rw---- 1 root disk 7, 6 Sep 9 2004 /dev/loop6
brw-rw---- 1 root disk 7, 7 Sep 9 2004 /dev/loop7
brw-rw---- 1 root disk 7, 8 Sep 9 2004 /dev/loop8
brw-r--r-- 1 root root 7, 9 Jun 25 21:00 /dev/loop9

I created a sparse filesystem and tried to mount that on loop back device

[root@guava looptest]# mount -o loop root_fs loop1/
mount: could not find any free loop device

[root@guava looptest]# mount -o loop=/dev/loop9 root_fs loop1/
ioctl: LOOP_SET_FD: Device or resource busy

Can anybody help me to sort out this issue.... We have another system
with cent-OS 3.5 with only 3 domains. I tested that server by creating
10 filesystems and mounting them on loop back devices and found no
problem on mounting more that 8. I also tested that with a fedora-core3
machine and found no problem. So in this situation what is likely to be
haunting this machine... I need a quick a reply since we are using xen
in a production environment...

Thanks once again
Sadique

_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users
Re: max_loop device problem [ In reply to ]
> title Xen-2.6
> root (hd0,0)
> kernel /xen.gz dom0_mem=65536
> module /vmlinuz-2.6.11.10-xen0 root=/dev/hda6 ro console=tty0
> max_loop=256

That looks OK but I guess 256 might be too high. IIRC, the loop driver
handles a maximum of 100 devices, or so. Try reducing it to something like
32, 64, etc and see if that helps.

You have compiled loop support statically into the kernel, right? If it's in
a module, you'll need to pass it as a module parameter instead.

> brw-r--r-- 1 root root 7, 9 Jun 25 21:00 /dev/loop9

Why does this one have different permissions to the other ones? (not that it
should matter, but all the same...)

> I created a sparse filesystem and tried to mount that on loop back device
>
> [root@guava looptest]# mount -o loop root_fs loop1/
> mount: could not find any free loop device

Weird.

> [root@guava looptest]# mount -o loop=/dev/loop9 root_fs loop1/
> ioctl: LOOP_SET_FD: Device or resource busy

Sanity check: Have you tried loop10, etc...? Do they all give this error?

> haunting this machine... I need a quick a reply since we are using xen
> in a production environment...

If the above don't help, can you rebuild the kernel and statically configure a
higher number of loop devs (say, 32), then reboot dom0?

Cheers,
Mark

_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
http://lists.xensource.com/xen-users