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

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 in 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
  1. 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
  1. This tape library has 1 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)
  1. 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
  1. What changer device to define in the amanda.conf:
changerdev "/dev/sg0"

How to determine the the “tapedev” name for amanda.conf:

  1. The tape drive device names get assigned in the order they are 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
  1. What tape device to define in the amanda.conf? You can define either tape drive depending 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"