Networker

Re: [Networker] Jukebox control port using persistent names

2012-11-03 06:50:05
Subject: Re: [Networker] Jukebox control port using persistent names
From: Yaron Zabary <yaron AT ARISTO.TAU.AC DOT IL>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Sat, 3 Nov 2012 12:37:29 +0200
On 10/26/2012 02:40 AM, Frank Swasey wrote:
Today at 2:47pm, Tim Mooney wrote:

Anyone on the list come up with udev rules that bind tape drives to
persistent but less onerous device names?

Yes, I use the following rule file (which I set up as
/etc/udev/rules.d/20-local.rules):

KERNEL=="nst[0-9]*", IMPORT{parent}=="ID_*"
KERNEL=="nst[0-9]*", SUBSYSTEM=="scsi_tape", ENV{ID_SERIAL}=="",
IMPORT{program}="scsi_id -u -g -x -s %p -d $tempnode"
KERNEL=="nst[0-9]*", SUBSYSTEM=="scsi_tape", ENV{ID_SERIAL}=="",
IMPORT{program}="scsi_id -u -g -x -a -s %p -d $tempnode"
KERNEL=="nst[0-9]*", SUBSYSTEM=="scsi_tape",
ENV{ID_SERIAL}=="3500507631241A79B", NAME="nst0",
SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst", SYMLINK+="tape0"
KERNEL=="nst[0-9]*", SUBSYSTEM=="scsi_tape",
ENV{ID_SERIAL}=="3500507631247C87A", NAME="nst1",
SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst", SYMLINK+="tape1"
KERNEL=="nst[0-9]*", SUBSYSTEM=="scsi_tape",
ENV{ID_SERIAL}=="3500507631247C81E", NAME="nst2",
SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst", SYMLINK+="tape2"
KERNEL=="nst[0-9]*", SUBSYSTEM=="scsi_tape", ENV{ID_SERIAL}=="?*",
SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"

Every time I replace a tape drive, I have to remember to edit this file
with the new WWN before I have RHEL rescan the scsi bus. But, it lets me
use the /dev/nst[0-2] paths in the jukebox config and KNOW that they
will be the correct ones.


Just a late side note. Some SAN switches and libraries (such as the Overland NEO8000) can set a port to a WWN which will not change if you replace the tape drive, which can eliminate the above problem.

-- Frank


--

-- Yaron.

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Networker] Jukebox control port using persistent names, Yaron Zabary <=