How to determine tape drive and tape changer device names in Linux

Amanda needs "tapedev" and "changerdev" names to use any Tape Library for backups. This article tells you how to determine them.

This article is for Amanda Enterprise (AE) v. 2.6


Amanda needs "tapedev" and "changerdev" names to use any Tape Library for backups. These values are added to the amanda.conf configuration file as a part of the overall Amanda configuration.

How to determine the "changerdev" name for amanda.conf:


1. In order to see all the attached scsi devices on a Linux system view the "/proc/scsi/scsi" file:

Attached devices:
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: DEC Model: TL800 (C) DEC Rev: 0422
Type: Medium Changer ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 05 Lun: 00
Vendor: QUANTUM Model: DLT7000 Rev: 245F
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: QUANTUM Model: DLT7000 Rev: 245F
Type: Sequential-Access ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST3200826AS Rev: 3.04
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 01 Lun: 00
Vendor: ATA Model: ST3200826AS Rev: 3.04
Type: Direct-Access ANSI SCSI revision: 05

2. The scsi device names get assigned in the order they are in the /proc/scsi/scsi" file:

Vendor: DEC Model: TL800 Device Name: /dev/sg0
Vendor: QUANTUM Model: DLT7000 Device Name: /dev/sg1
Vendor: QUANTUM Model: DLT7000 Device Name: /dev/sg2
Vendor: ATA Model: ST3200826AS Device Name: /dev/sg3
Vendor: ATA Model: ST3200826AS Device Name: /dev/sg4

3. This tape library has one changer device and two tape drive devices. The first is the changer device and the next two are tape drives:

Vendor: DEC Model: TL800 Device Name: /dev/sg0 (changer)
Vendor: QUANTUM Model: DLT7000 Device Name: /dev/sg1 (tape drive 0)
Vendor: QUANTUM Model: DLT7000 Device Name: /dev/sg2 (tape drive 1)

4. The last two devices in the file are hard disks: 

Vendor: ATA Model: ST3200826AS Device Name: /dev/sg3
Vendor: ATA Model: ST3200826AS Device Name: /dev/sg4

5. What changer device to define in the amanda.conf:

changerdev "/dev/sg0"

How to determine the "tapedev" name for amanda.conf:


1. The tape drive device names get assigned in the order they are present in the /proc/scsi/scsi" file as well, but they have different device names and they start at "/dev/nst0" and
go up from there depending on how many drives the changer has:

Vendor: QUANTUM Model: DLT7000 Device Name: /dev/nst0
Vendor: QUANTUM Model: DLT7000 Device Name: /dev/nst0

2. What tape device to define in the amanda.conf?

You can define either tape drive depending on which one you want to use for this amanda configuration. You can only use one tape device per Amanda configuration:

tapedev "/dev/nst0" or tapedev "/dev/nst1"