Re: CDROM jukebox filesystem using autofs

Dan A. Dickey (ddickey@wamnet.com)
Thu, 30 Apr 1998 10:10:57 -0500


Aaron Passey wrote:

> I am writing a Linux filesystem / driver for a CDROM jukebox. This
> Jukebox has hundreds of disks and multiple drives. It controls the robot using
> a serial interface and has a SCSI interface to the CDROM drives. I have used
> autofs as a starting point for the driver. I'm doing all communications with
> the robot from the user-space daemon when mount requests come from the kernel.
> So far, I have made it move and mount disks on command and unmount and put away
> disks in an LRU fashion. For example, if I do an ls of /autofs/1, it'll get
> the disk out of slot 1 and put it in one of the drives, mount it and give me
> the ls.

Sounds interesting.

>
>
> There are several problems I am running into with this approach. First
> of all, what do I do if I have 4 drives, all mounted and busy, and I get a
> request for a fifth disk?

return EBUSY.

> I can't open a drive and swap disks since they are
> all mounted and I can't unmount any of them since they are busy. I really want
> to remove a disk from a drive, block all processes requesting data off of that
> disk, and put the other disk into the drive to complete the request for the
> fifth disk. This, of course, could make a disk swapping nightmare but at least
> it would work.

It seems like you'd have an awful lot of information to keep track of.First just
try not granting the request (EBUSY), and then add this feature
enhancement if you insist.
I think you may be shooting yourself in the foot doing this. In fact,
it reminds me of a tape driver I wrote once that allowed seeking....
I wanted to be able to mount a tape device as a filesystem. :) I
decided after writing it that that is not what tapes were meant for,
though it was an interesting exercise. Use Occam's (sp?) razor - simple is
better.
-Dan

----
Dan A. Dickey
ddickey@wamnet.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu