Build a Virtual CD-ROM Jukebox
If our VCDJ has a lot of ISO 9660 images, it won't be possible to mount all of them statically. The next step is to configure the automounter. The automounter will mount an ISO 9660 image only when it is accessed. It will unmount it after a time of inactivity. We need this because there is a limit to how many filesystems can be mounted via the loopback device at one time. It's unlikely that all of the CD-ROMs will be in use simultaneously, so it's the automounter to our rescue. (See “Tux Knows It's Nice to Share, Part 4” by Marcel Gagné at /article/5298 for instructions to install and initially set up the automounter.)
First, edit /etc/auto.master, and append to it the following line:
/mnt/isosrv_auto /etc/auto.isosrv --timeout=60
Make sure the directory /mnt/isosrv_auto exists. Restart the automounter for this change to take effect.
Create the file /etc/auto.isosrv, and append to it the following line:
image1 -fstype=iso9660,ro,loop :/mnt/images/image1.iso
Create a similar line for every ISO 9660 CD-ROM image that is to be automounted.
If you mount on your VCDJ, you should see a line like this:
automount(pid782) on /mnt/isosrv_auto type autofs (rw,fd=5,pgrp=782,minproto=2,maxproto=3)
(The various numeric values will likely be different on your system.)
The automounter does not have to be restarted when changes are made to /etc/auto.isosrv. So far we've told the automounter that when some process tries to access a file or directory somewhere in /mnt/isosrv_auto/image1/, it will mount image1.iso. After a period of time of no access to the directory, the image will be unmounted.
There's one last problem. List the contents of /mnt/isosrv_auto/
ls /mnt/isosrv_auto/
If nothing has accessed the contents of the CD-ROM image recently, this directory will appear to be empty.
If you explicitly list the contents of the CD-ROM,
ls /mnt/isosrv_auto/image1/
you will see the contents. Now go back and list the contents of /mnt/isosrv_auto/ again, and you will see image1. Eventually, the automounter will unmount the image, and once again the directory will be empty.
This is a problem because it means the users will have to know the names of all the CD-ROMs that they want to access. Directory browsing won't work, which is clearly not acceptable.
The solution is to create another directory called /mnt/isosrv/. Enter that directory and perform the following commands:
mkdir image1 cd image1 ln -s ../../isosrv_auto/image1 disc
Repeat this for every ISO 9660 CD-ROM image.
Listing the contents of /mnt/isosrv/ will show all the available images, regardless of whether the automounter has mounted them.
See “Tux Knows It's Nice to Share, Part 5” by Marcel Gagné (/article/5297) for instructions on installation and initial setup of Samba. Be sure that you have authentication set up to protect the CD-ROM contents properly, according to their licensing agreements. (Not a problem if everything is open source!)
Recall that one goal is to provide access to the ISO 9660 images and their contents simultaneously via Samba. To do this, edit /etc/smb.conf (or maybe /etc/samba/smb.conf), and append the following lines:
[isoimages]
comment = ISO9660 CD ROM images
path = /mnt/images/
[cdroms]
comment = Contents of CD ROMs
path = /mnt/isosrv/
Restart Samba. Now go to a Windows client (or any other computer that can be an SMB client) and browse your VCDJ. You should see two new shares: isoimages and cdroms. In the isoimages share are all the ISO 9660 images, and in the cdroms share are the contents of the images. Browse the contents of the directory image1 in the cdroms share. If you mount on your VCDJ, you should see a line like this:
/mnt/images/image1.iso on /mnt/isosrv_auto/image1
type iso9660 (ro,loop=/dev/loop0)
Figure 1 shows a diagram of the order of things when a network client accesses data in the cdroms share. Note that if the client accessed an ISO 9660 image directly, the Samba process would directly read from /mnt/images/, bypassing all symlinks and the automounter.
As you add more ISO 9660 images, you'll come to appreciate the value of a VCDJ. You're only limited by available disk space, and the cost and degree of effort to add more capacity is much less than trying to add more physical CD-ROM drives. Now you can make all your CD-ROMs available across your enterprise, whether in your office or in your home, and you'll never have to worry about people not returning borrowed CD-ROM disks.

Jeremy Impson (jeremy.impson@lmco.com) is a senior associate research scientist at Lockheed Martin Systems Integration in Owego, New York. There he's a member of The Center for Mobile Communications and Nomadic Computing, where he uses open-source software to develop mobile computing systems.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Introduction to MapReduce with Hadoop on Linux
- RSS Feeds
- user namespaces
1 hour 50 min ago - yea
2 hours 16 min ago - One advantage with VMs
4 hours 45 min ago - about info
5 hours 18 min ago - info
5 hours 19 min ago - info
5 hours 20 min ago - info
5 hours 22 min ago - info
5 hours 23 min ago - abut info
5 hours 25 min ago - info
5 hours 26 min ago
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?





Comments
I >love< resurrecting old
I >love< resurrecting old threads....
Beware of possible corruptions.
Long directory chains and long file names work ok with various commercial cds because the operating systems support those formats; when creating a server using ISO9660 formatted images, the ISO9660 format may want you to rename directories and/or files. When you rename a file from a Windows compatible CD, you did so for ISO9660 compatibility. Now the problem arises where program installers will fail to find files because their inf files state /some/specific/location/and/specific.fil, but for ISO9660 had you rename the structure, so the path and file are not exactly where the inf file goes to get it, and your installation will crash. Older installers might not allow user debugging, so beware how you rename structures when ISO9660 creation demands you to rename things.
Been there. Suffered that.
Re: Build a Virtual CD-ROM Jukebox
Is that passible as a booting device under vmware?
Re: Build a Virtual CD-ROM Jukebox
I followed the outlines of the article and now have an automounting CD-ROM server for our church sunday school department. It works well. Now we can avoid kids destroying cdroms. A couple of things not mentioned:
1. Using the "unhide" option in the mount command caused problems with some CD titles. Removing it elminated the problem.
2. Apparently there is an 8-mount limit with RedHat 9. Any attempt to mount an additional volume causes one of the others to umount. I could not find where to change the automount quota under RH 9. I have already increased the number of loop devices from 15 to 21.
Re: Build a Virtual CD-ROM Jukebox
Follow up:
I found the problem. After adding the following to /etc/modules.conf:
options loop max_loop=64
Everything is automounting just fine.
Dan
Re: Build a Virtual CD-ROM Jukebox
This process is remarkably similar to the CD Server HOWTO at the LDP (tldp.org) which has existed for years..
Re: Build a Virtual CD-ROM Jukebox
Yeah but I *found* this one.