SuSE GmbH

SuSE Support Database

Title: CD changers

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

CD changers

Aim:

You plan to use a CD changer on your Linux system.

How to proceed:

You have to separate SCSI and ATAPI changes.

SCSI

Normally a LUN (Logical Unit Numnber) is assigned to each CD. LUNs are a device identification scheme for SCSI IDs.

Lets assume we use a 5 CD changer which has been assigned SCSI-ID 5. The first CD would be 5:0.

Well, first you have to configure the LUN support in the kernel sources. This can be done either with the kernel driver itself (e.g. while configuring a kernel) or via a LILO parameter.

This parameter is max_scsi_luns. It accepts values from 1 (default) up to 8. In our example this should be enough:

max_scsi_luns=5
This parameter is assigned as LILO boot promt or (permanently) in the append line of /etc/lilo.conf.

Now the kernel should recognize the different sub CDs. But how to access them?

The classical way via the CD-ROM device files /dev/scdX As the predefined /dev/scd0 and /dev/scd1 are not enough we need to create more:

for i in 2 3 4; do mknod /dev/scd$i b 11 $i; done
Now you may try (just a test):
mount /dev/scd3 /mnt
to mount the 4th CD to /mnt. (don't forget to unmount it!). Now you should enter these new file systems into /etc/fstab and assing mountpoints for them. Entries in /etc/fstab:
/dev/scd0   /cdrom/0  iso9660  ro,noauto   0  0
/dev/scd1   /cdrom/1  iso9660  ro,noauto   0  0
/dev/scd2   /cdrom/2  iso9660  ro,noauto   0  0
/dev/scd3   /cdrom/3  iso9660  ro,noauto   0  0
/dev/scd4   /cdrom/4  iso9660  ro,noauto   0  0
Assign the mountpoints:
mkdir /cdrom
for i in 0 1 2 3 4; do mkdir /cdrom/$i; done
So now start and try to mount /cdrom/3. The changer should now start to spin and to mount the filesystem on the 4th CD. All of the CDs may be mounted separately. Here you do not need to change the CDs while changing them. Well, accessing the changer from lots of different programs may damage your cd changer.

ATAPI

It is not that simple with ATAPI changes. There is only one device file (e.g. /dev/hdc). You need to switch the CDs manually with a little tool. You need to unmount the CD, change it and remount it afterwards.

This tiny tool is called cdload. Go and get the package which may be obtained from our FTP site under ftp://ftp.suse.com/pub/SuSE-Linux/suse_update/special/cdload.tgz . Unpack it and install cdload to /usr/bin and invoke it as follows:

cdload /dev/hdc 3
This should load the 4th CD.

It is not that comfortable as with SCSI changes.

----------

Keywords: CHANGER, SCSI, ATAPI, CD-WECHSLER, WECHSLER, CDROM, MOUNTEN, WECHSELN

----------

Categories: Hardware , SCSI , IDE , CD-ROM

----------

Mainpage o Searchform o History o Versions o Categories o Contents
Deutsch

----------

SDB-maddin_cdchanger, Copyright SuSE GmbH, Nuremberg, Germany - Version: 13. Jan 1998
SuSE GmbH - Last generated: 22. Dec 1999 14:30:21 by grimmer with sdb_gen 1.00.0