Configuring your Writer Device
Prev | Chapter 5. Configuration | Next

## Configuring your Writer Device

### Device Types

In order to execute the store action, you need to know how to identify your writer device. Cedar Backup supports two kinds of device types: CD writers and DVD writers. DVD writers are always referenced through a filesystem device name (i.e. `/dev/dvd`). CD writers can be referenced either through a SCSI id, or through a filesystem device name. Which you use depends on your operating system and hardware.

### Devices identified by by device name

For all DVD writers, and for CD writers on certain platforms, you will configure your writer device using only a device name. If your writer device works this way, you should just specify <target_device> in configuration. You can either leave <target_scsi_id> blank or remove it completely. The writer device will be used both to write to the device and for filesystem operations — for instance, when the media needs to be mounted to run the consistency check.

### Devices identified by SCSI id

Cedar Backup can use devices identified by SCSI id only when configured to use the `cdwriter` device type.

In order to use a SCSI device with Cedar Backup, you must know both the SCSI id <target_scsi_id> and the device name <target_device>. The SCSI id will be used to write to media using cdrecord; and the device name will be used for other filesystem operations.

A true SCSI device will always have an address `scsibus,target,lun` (i.e. `1,6,2`). This should hold true on most UNIX-like systems including Linux and the various BSDs (although I do not have a BSD system to test with currently). The SCSI address represents the location of your writer device on the one or more SCSI buses that you have available on your system.

On some platforms, it is possible to reference non-SCSI writer devices (i.e. an IDE CD writer) using an emulated SCSI id. If you have configured your non-SCSI writer device to have an emulated SCSI id, provide the filesystem device path in <target_device> and the SCSI id in <target_scsi_id>, just like for a real SCSI device.

You should note that in some cases, an emulated SCSI id takes the same form as a normal SCSI id, while in other cases you might see a method name prepended to the normal SCSI id (i.e. “ATA:1,1,1”).

### Linux Notes

On a Linux system, IDE writer devices often have a emulated SCSI address, which allows SCSI-based software to access the device through an IDE-to-SCSI interface. Under these circumstances, the first IDE writer device typically has an address `0,0,0`. However, support for the IDE-to-SCSI interface has been deprecated and is not well-supported in newer kernels (kernel 2.6.x and later).

Newer Linux kernels can address ATA or ATAPI drives without SCSI emulation by prepending a “method” indicator to the emulated device address. For instance, `ATA:0,0,0` or `ATAPI:0,0,0` are typical values.

However, even this interface is deprecated as of late 2006, so with relatively new kernels you may be better off using the filesystem device path directly rather than relying on any SCSI emulation.

### Finding your Linux CD Writer

Here are some hints about how to find your Linux CD writer hardware. First, try to reference your device using the filesystem device path:

    cdrecord -prcap dev=/dev/cdrom

Running this command on my hardware gives output that looks like this (just the top few lines):

    Device type    : Removable CD-ROM
    Version        : 0
    Response Format: 2
    Capabilities   :
    Vendor_info    : 'LITE-ON '
    Identification : 'DVDRW SOHW-1673S'
    Revision       : 'JS02'
    Device seems to be: Generic mmc2 DVD-R/DVD-RW.

    Drive capabilities, per MMC-3 page 2A:

If this works, and the identifying information at the top of the output looks like your CD writer device, you've probably found a working configuration. Place the device path into <target_device> and leave <target_scsi_id> blank.

If this doesn't work, you should try to find an ATA or ATAPI device:

    cdrecord -scanbus dev=ATA
    cdrecord -scanbus dev=ATAPI

On my development system, I get a result that looks something like this for ATA:

    scsibus1:
            1,0,0   100) 'LITE-ON ' 'DVDRW SOHW-1673S' 'JS02' Removable CD-ROM
            1,1,0   101) *
            1,2,0   102) *
            1,3,0   103) *
            1,4,0   104) *
            1,5,0   105) *
            1,6,0   106) *
            1,7,0   107) *

Again, if you get a result that you recognize, you have again probably found a working configuraton. Place the associated device path (in my case, `/dev/cdrom`) into <target_device> and put the emulated SCSI id (in this case, `ATA:1,0,0`) into <target_scsi_id>.

Any further discussion of how to configure your CD writer hardware is outside the scope of this document. If you have tried the hints above and still can't get things working, you may want to reference the Linux CDROM HOWTO (http://www.tldp.org/HOWTO/CDROM-HOWTO) or the ATA RAID HOWTO (http://www.tldp.org/HOWTO/ATA-RAID-HOWTO/index.html) for more information.

### Mac OS X Notes

On a Mac OS X (darwin) system, things get strange. Apple has abandoned traditional SCSI device identifiers in favor of a system-wide resource id. So, on a Mac, your writer device will have a name something like `IOCompactDiscServices` (for a CD writer) or `IODVDServices` (for a DVD writer). If you have multiple drives, the second drive probably has a number appended, i.e. `IODVDServices/2` for the second DVD writer. You can try to figure out what the name of your device is by grepping through the output of the command ioreg -l.[24]

Unfortunately, even if you can figure out what device to use, I can't really support the store action on this platform. In OS X, the “automount” function of the Finder interferes significantly with Cedar Backup's ability to mount and unmount media and write to the CD or DVD hardware. The Cedar Backup writer and image functionality does work on this platform, but the effort required to fight the operating system about who owns the media and the device makes it nearly impossible to execute the store action successfully.

If you are interested in some of my notes about what works and what doesn't on this platform, check out the documentation in the `doc/osx` directory in the source distribution.

[24] Thanks to the file README.macosX in the cdrtools-2.01+01a01 source tree for this information

Prev | Up | Next
Setting up a Master Peer Node | Home | Optimized Blanking Stategy