"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, answerguy@ssc.com
Starshine Technical Services, http://www.starshine.org/


(?) More than 8 loopfs Mounts?

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:
/usr/src/linux/drivers/block/loop.c
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).


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 36 January 1999


[ Answer Guy Index ] a b c 1 2 3 4 5 6 7 9 10 11 12
15 16 18 19 20 21 22 23 24 25 26 27 28
29 31 32 33 34 35 36 37 38 39 40 41 42 44
45 46 47 48 49 50 51 52 53 54 55 56 57 60 61 62 63 64 65 66
67 69 72 76 77 78 79 80 81 82 84 85 86 87 91 94 95 96 97 98


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]