Bug 497568 - RFE: livecd-tools should make images that default max_loop=14 or higher
RFE: livecd-tools should make images that default max_loop=14 or higher
Product: Fedora
Classification: Fedora
Component: livecd-tools (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-04-24 14:54 EDT by Paul W. Frields
Modified: 2009-04-27 17:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-04-24 19:41:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Paul W. Frields 2009-04-24 14:54:25 EDT
The livecd-tools build images that don't change the default behavior of the "loop" block device module.  However, since the environment itself consumes /dev/loop0 through /dev/loop5, it only leaves two loop devices available for use.  Adding 'max_loop=14' or higher would be a friendlier way and would provide the principle of "least surprise" for the user/admin.

Keep in mind that of course the loop module can't be removed/reinserted since it's in use by the environment! :-)

Comment 1 Jeremy Katz 2009-04-24 19:41:05 EDT
Once upon a time, we did.  Then we changed the kernel default.  Now we don't do anything special because
a) loop is built-in, not modular
b) the kernel automatically starts to allocate more loop devices for you as you need them
Comment 2 Paul W. Frields 2009-04-25 12:42:13 EDT
I understand (a), sorry I missed that important point.  But as for (b), are you sure?  I just tried this in a Rawhide VM guest, and I stop getting loop devices (using 'losetup -f <file>') after the eight pre-created devices /dev/loop{0..7} are exhausted.

I'd be tempted to reopen this if you find this isn't another PEBCAK problem.
Comment 3 Paul W. Frields 2009-04-25 12:43:51 EDT
Erratum: I guess it wouldn't be reopening as much as opening a new bug to the kernel if autocreation of /dev/loop* is not happening as expected.
Comment 4 Jeremy Katz 2009-04-27 11:39:53 EDT
Upstream support for dynamic loop allocation is commit http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a47653fc2643cf61bcabba8c9ff5c45517c089ba

And from the try I did on Friday with lots of losetup -f
[katzj@erebor ~]$ sudo losetup -a
/dev/loop0: [fd03]:892295 (/var/tmp/imgcreate-2u4B_K/tmp-T4locA/ext3fs.img)
/dev/loop1: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop2: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop3: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop4: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop5: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop6: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop7: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop8: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop80: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop81: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop82: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
/dev/loop83: [fd01]:42401853 (/home/live/live/rawhide-20090423/rawhide-i686-20090423.0.iso)
Comment 5 Paul W. Frields 2009-04-27 17:20:42 EDT
Ah, according to that commit, you still have to mknod manually, but the new device will be supported on demand.  Too bad the all-in-one process broke things, it would have been nice to be a little more automatic.  Thanks for the info though!

Note You need to log in before you can comment on or make changes to this bug.