I hate it when this happens:
[root@kraken /usr/home/dan]# /usr/local/sbin/mtx-changer /dev/pass10 list mtx: Request Sense: Long Report=yes mtx: Request Sense: Valid Residual=no mtx: Request Sense: Error Code=0 (Unknown?!) mtx: Request Sense: Sense Key=No Sense mtx: Request Sense: FileMark=no mtx: Request Sense: EOM=no mtx: Request Sense: ILI=no mtx: Request Sense: Additional Sense Code = 00 mtx: Request Sense: Additional Sense Qualifier = 00 mtx: Request Sense: BPV=no mtx: Request Sense: Error in CDB=no mtx: Request Sense: SKSV=no INQUIRY command Failed [root@kraken /usr/home/dan]#
All tape jobs failed overnight. I suspect this may have something to do with not power cycling the tape library when the server was powered down.
The problem is: /dev/pass10 is no longer a tape library. It moved to /dev/pass11. I hate it when that happens.
# /usr/local/sbin/mtx-changer /dev/pass11 list mtx: Request Sense: Long Report=yes mtx: Request Sense: Valid Residual=no mtx: Request Sense: Error Code=70 (Current) mtx: Request Sense: Sense Key=Unit Attention mtx: Request Sense: FileMark=no mtx: Request Sense: EOM=no mtx: Request Sense: ILI=no mtx: Request Sense: Additional Sense Code = 28 mtx: Request Sense: Additional Sense Qualifier = 00 mtx: Request Sense: BPV=no mtx: Request Sense: Error in CDB=no mtx: Request Sense: SKSV=no Mode sense (0x1A) for Page 0x1D failed 1: 2:ETU047 3:ETU057 4:ETU058 5:ETU056 6:ETU045 7:ETU075 8:ETU076 9:ETU077 10:ETU078
This happened because I added a new HDD to the system.
I then had to adjust /etc/devfs.conf:
# so bacula can access the autochanger via the operator group #perm ch0 0660 perm pass10 0660 perm pass11 0660
NOTE: you need a return on that last line. It’s a bit like cron in that regard.
Before I restarted devfs:
# ls -l /dev/pass* crw------- 1 root operator 0, 87 Apr 5 19:50 /dev/pass0 crw------- 1 root operator 0, 88 Apr 5 19:50 /dev/pass1 crw-rw---- 1 root operator 0, 97 Apr 5 19:50 /dev/pass10 crw------- 1 root operator 0, 98 Apr 5 19:50 /dev/pass11 crw------- 1 root operator 0, 99 Apr 5 19:50 /dev/pass12 crw------- 1 root operator 0, 89 Apr 5 19:50 /dev/pass2 crw------- 1 root operator 0, 90 Apr 5 19:50 /dev/pass3 crw------- 1 root operator 0, 91 Apr 5 19:50 /dev/pass4 crw------- 1 root operator 0, 92 Apr 5 19:50 /dev/pass5 crw------- 1 root operator 0, 93 Apr 5 19:50 /dev/pass6 crw------- 1 root operator 0, 94 Apr 5 19:50 /dev/pass7 crw------- 1 root operator 0, 95 Apr 5 19:50 /dev/pass8 crw------- 1 root operator 0, 96 Apr 5 19:50 /dev/pass9
After restarting:
[root@kraken /usr/home/dan]# /etc/rc.d/devfs restart [root@kraken /usr/home/dan]# ls -l /dev/pass* crw------- 1 root operator 0, 87 Apr 5 19:50 /dev/pass0 crw------- 1 root operator 0, 88 Apr 5 19:50 /dev/pass1 crw-rw---- 1 root operator 0, 97 Apr 5 19:50 /dev/pass10 crw-rw---- 1 root operator 0, 98 Apr 5 19:50 /dev/pass11 crw------- 1 root operator 0, 99 Apr 5 19:50 /dev/pass12 crw------- 1 root operator 0, 89 Apr 5 19:50 /dev/pass2 crw------- 1 root operator 0, 90 Apr 5 19:50 /dev/pass3 crw------- 1 root operator 0, 91 Apr 5 19:50 /dev/pass4 crw------- 1 root operator 0, 92 Apr 5 19:50 /dev/pass5 crw------- 1 root operator 0, 93 Apr 5 19:50 /dev/pass6 crw------- 1 root operator 0, 94 Apr 5 19:50 /dev/pass7 crw------- 1 root operator 0, 95 Apr 5 19:50 /dev/pass8 crw------- 1 root operator 0, 96 Apr 5 19:50 /dev/pass9 [root@kraken /usr/home/dan]#
I also had to modify sudoers, /usr/local/etc/bacula-sd.conf, and ~/bin/dlt-stats
Being able to define some kind of /dev/changer alias based on the device serial number or similar would be really useful.
I do recall looking into this, some time ago. But then abandoned it when other things became more important. There’s probably stuff in the FreeBSD mailing list archives from me…