From Philippe Thibault on Fri, 20 Nov 1998
I've setup an image easily enough and mounted it with the iso9660 file system and asigned it to one of my loop devices. It works fine. What I was wondering was, can I add more than the eight loops devices in my dev directory and how so. What I'm trying to do is share these CD images through SMB services to a group of Win 95 machines. Is what I'm trying to do feasable or possible.
Good question. You probably need to patch the kernel in addition to making the additional block device nodes. So my first stab is, look in:
There I find a #define around line 50 that looks like:
#define MAX_LOOP 8
.... (lucky guess, with filename completion to help).
So, the obvious first experiment is to bump that up, recompile, make some additional loop* nodes under the /dev/ directory and try to use them.
To make the additional nodes just use:
for i in 8 9 10 11 12 13 14 15; do mknod /dev/loop$i b 7 $i; done
I don't know if there are any interdependencies between the MAX_LOOP limit and any other kernel structures or variables. However, it's fairly unlikely (Ted T'so, the author of 'loop.c' hopefully would have commented on such a thing). It's easier to do the experiment than to fuss over the possibility.
In any event I doubt you'd want to push that value much beyond 16 or 32 (I don't know what the 'mount' maximums are --- and I don't feel like digging those up too). However, doing a test with that set to 60 or 100 is still a pretty low-risk and inexpensive affair (on a non-production server, or over a weekend when you're sure you have a good backup and plenty of time).
So, try that and let us know how it goes. (Ain't open source (tm) great!)
Of course you might find that a couple of SCSI controllers and about 15 or 30 SCSI CD-ROM drives (mostly in external SCSI cases) could be built for about what you'd be spending in the 16 Gig of diskspace that you're devoting to this. (Especially if you can find a cachet of old 2X CD drives for sale somewhere).