Amanda-Users

amrecover not working with write-protected tapes

2009-10-23 11:01:45
Subject: amrecover not working with write-protected tapes
From: Ian Crorie <idc AT macs.hw.ac DOT uk>
To: amanda-users AT amanda DOT org
Date: Fri, 23 Oct 2009 14:37:25 +0100

Problem: amanda (amrecover) refuses to read write-protected tapes.   When
the write-protect tab is opened, everything works fine.   The problem
seems to be that amanda is trying to open the tape device in read-write
mode, and when it is write-protected this fails.  All other amanda
operations seem to be working as expected.   Appended are copies of the
amidxtaped.debug and chg-glue.debug log files.


History: recently moved from using amanda with an LTO-2 Overland library
(where amrecover worked fine) to a new HP LTO-4 drive in an Overland
Arcvault 12.   I'm using the chg-zd-mtx script and the linux stinit
program to set up alternative tape devices.   I use /dev/nst0a to
get uncompressed and 64k blocksize for the LT0-4 drive (this is a new
thing at this site and therefore a possible candidate for the problem).
My stinit.def file is also appended.

I've not been able to find this in mailing list archives.   Thanks in
advance for any help.



---------- stinit.def file ----------
# /etc/stinit.def
# Definitions file for stinit program, run soon after boot
#   from /etc/init.d/stinit
# Have cobbled this together from stinit man page plus clues
#   on the net                          - idc 24/8/2009
#

manufacturer=HP model = "Ultrium 4-SCSI" {
# /dev/nst0  - default bs (32k) and compression on
mode1 blocksize=0 compression=1
# /dev/nst0l - default bs (32k) and compression off
mode2 blocksize=0 compression=0
# /dev/nst0m - suggested best bs (64k) and compression on
mode3 blocksize=64k compression=1
# /dev/nst0a - suggested best bs (64k) and compression off
mode4 blocksize=64k compression=0
}


---------- amidxtaped.debug ----------
1256300266.667132: amidxtaped: pid 9359 ruid 33 euid 33 version 2.6.1p1: start at Fri Oct 23 13:17:46 2009
1256300266.667220: amidxtaped: amidxtaped: version 2.6.1p1
1256300266.667262: amidxtaped: > SECURITY USER root
1256300266.667274: amidxtaped: check_security_buffer(buffer='SECURITY USER 
root')
1256300266.667299: amidxtaped: (sockaddr_in *)0xbff29a34 = { 2, 1023, 137.195.13.12 }
1256300266.670260: amidxtaped: > FEATURES=fffffeff9ffeffff07
1256300266.670435: amidxtaped: > CONFIG=Daily
1256300266.670548: amidxtaped: > LABEL=Daily305:162
1256300266.670564: amidxtaped: append_to_tapelist(tapelist=(nil), label='Daily305', file=-1, partnum=-1, isafile=0) 1256300266.670584: amidxtaped: append_to_tapelist(tapelist=0x95553c0, label='Daily305', file=162, partnum=-1, isafile=0)
1256300266.670599: amidxtaped: > FSF=162
1256300266.670610: amidxtaped: > HEADER
1256300266.670619: amidxtaped: > DEVICE=changer
1256300266.670632: amidxtaped: > HOST=^home-server-bak$
1256300266.670641: amidxtaped: > DISK=^/export/home/1$
1256300266.670650: amidxtaped: > DATESTAMP=20091022
1256300266.670659: amidxtaped: > END
1256300266.676837: amidxtaped: pid 9359 ruid 33 euid 33 version 2.6.1p1: rename at Fri Oct 23 13:17:46 2009
1256300266.676952: amidxtaped: Restoring from changer, checking labels
1256300266.676965: amidxtaped: Locking devices
1256300266.693154: amidxtaped: Client understands split dumpfiles
1256300266.693187: amidxtaped: stream_server opening socket with family 2 (requested family was 2)
1256300266.693217: amidxtaped: try_socksize: send buffer size is 65536
1256300266.693228: amidxtaped: try_socksize: receive buffer size is 65536
1256300266.696105: amidxtaped: bind_portrange2: Skip port 3961: Owned by 
proaxess.
1256300266.698814: amidxtaped: bind_portrange2: Skip port 3962: Owned by 
sbi-agent.
1256300266.701730: amidxtaped: bind_portrange2: Skip port 3963: Owned by thrp.
1256300266.704644: amidxtaped: bind_portrange2: Skip port 3964: Owned by 
sasggprs.
1256300266.707556: amidxtaped: bind_portrange2: Skip port 3965: Owned by ati-ip-to-ncpe.
1256300266.710471: amidxtaped: bind_portrange2: Skip port 3966: Owned by 
bflckmgr.
1256300266.713392: amidxtaped: bind_portrange2: Skip port 3967: Owned by ppsms.
1256300266.716303: amidxtaped: bind_portrange2: Skip port 3968: Owned by ianywhere-dbns.
1256300266.719214: amidxtaped: bind_portrange2: Skip port 3969: Owned by 
landmarks.
1256300266.722137: amidxtaped: bind_portrange2: Skip port 3970: Owned by cobraclient. 1256300266.725058: amidxtaped: bind_portrange2: Skip port 3971: Owned by cobraserver.
1256300266.727982: amidxtaped: bind_portrange2: Skip port 3972: Owned by iconp.
1256300266.730904: amidxtaped: bind_portrange2: Skip port 3973: Owned by 
progistics.
1256300266.733823: amidxtaped: bind_portrange2: Skip port 3974: Owned by 
citysearch.
1256300266.736749: amidxtaped: bind_portrange2: Skip port 3975: Owned by 
airshot.
1256300266.770270: amidxtaped: bind_portrange2: Try  port 3976: Available - 
Success
1256300266.770313: amidxtaped: stream_server: waiting for connection: 
0.0.0.0.3976
1256300266.770323: amidxtaped: Local port 3976 set aside for data
1256300266.829438: amidxtaped: stream_accept: connection from 137.195.13.12.517
1256300266.829451: amidxtaped: try_socksize: send buffer size is 65536
1256300266.829461: amidxtaped: try_socksize: receive buffer size is 65536
1256300266.829514: amidxtaped: check_security_buffer(buffer='SECURITY USER 
root')
1256300266.829527: amidxtaped: (sockaddr_in *)0xbff29a34 = { 2, 1023, 137.195.13.12 }
1256300266.831679: amidxtaped: Sending output to file descriptor 4
1256300266.835093: amidxtaped: changer: >> -info
1256300268.253893: amidxtaped: changer: << EXITSTATUS 0
1256300268.253933: amidxtaped: changer: << current 12 0 1
1256300268.253995: amidxtaped: changer: >> -slot current
1256300269.530607: amidxtaped: changer: << EXITSTATUS 0
1256300269.530642: amidxtaped: changer: << 2 tape:/dev/nst0a
1256300269.530677: amidxtaped: changer: >> -info
1256300269.530915: amidxtaped: changer: << EXITSTATUS 0
1256300269.530930: amidxtaped: changer: << current 12 0 1
1256300269.530974: amidxtaped: changer_query: changer return was 12 0 1
1256300269.530994: amidxtaped: changer_query: searchable = 1
1256300269.531004: amidxtaped: changer_find: looking for Daily305 changer is searchable = 1
1256300269.531016: amidxtaped: changer_search: Daily305
1256300269.531028: amidxtaped: changer: >> -search Daily305
1256301736.078237: amidxtaped: changer: << EXITSTATUS 1
1256301736.078276: amidxtaped: changer: << <error> Volume 'Daily305' not found
1256301736.078287: amidxtaped: changer: ERROR <error> Volume 'Daily305' not 
found
1256301736.078310: amidxtaped: changer: >> -slot current
1256301737.360095: amidxtaped: changer: << EXITSTATUS 0
1256301737.360132: amidxtaped: changer: << 1 tape:/dev/nst0a
amidxtaped: slot 1: time 20091020235001 label Daily304 (wrong tape)
1256301744.561183: amidxtaped: changer: >> -slot next
1256301890.556217: amidxtaped: changer: << EXITSTATUS 0
1256301890.556253: amidxtaped: changer: << 2 tape:/dev/nst0a
1256301890.558852: amidxtaped: Device /dev/nst0a error = 'Can't open tape device /dev/nst0a: Read-only file system' 1256301890.558947: amidxtaped: Device /dev/nst0a setting status flag(s): DEVICE_STATUS_DEVICE_ERROR
amidxtaped: slot 2: Error reading tape label:
amidxtaped: slot 2: Can't open tape device /dev/nst0a: Read-only file system
1256301890.559002: amidxtaped: changer: >> -slot next
1256302024.092478: amidxtaped: changer: << EXITSTATUS 0
1256302024.092518: amidxtaped: changer: << 3 tape:/dev/nst0a
amidxtaped: slot 3: time X              label Daily306 (wrong tape)
1256302032.137174: amidxtaped: changer: >> -slot next
1256302168.708868: amidxtaped: changer: << EXITSTATUS 0
1256302168.708906: amidxtaped: changer: << 1 tape:/dev/nst0a
amidxtaped: slot 1: time 20091020235001 label Daily304 (wrong tape)
1256302175.903167: amidxtaped: changer: >> -slot next
1256302300.450111: amidxtaped: changer: << EXITSTATUS 0
1256302300.450151: amidxtaped: changer: << 2 tape:/dev/nst0a
1256302300.452699: amidxtaped: Device /dev/nst0a error = 'Can't open tape device /dev/nst0a: Read-only file system' 1256302300.452720: amidxtaped: Device /dev/nst0a setting status flag(s): DEVICE_STATUS_DEVICE_ERROR
amidxtaped: slot 2: Error reading tape label:
amidxtaped: slot 2: Can't open tape device /dev/nst0a: Read-only file system
1256302300.452758: amidxtaped: changer: >> -slot next
1256302428.476492: amidxtaped: changer: << EXITSTATUS 0
1256302428.476528: amidxtaped: changer: << 3 tape:/dev/nst0a
amidxtaped: slot 3: time X              label Daily306 (wrong tape)
1256302436.482480: amidxtaped: changer: >> -slot next
1256302568.387251: amidxtaped: changer: << EXITSTATUS 0
1256302568.387290: amidxtaped: changer: << 1 tape:/dev/nst0a
amidxtaped: slot 1: time 20091020235001 label Daily304 (wrong tape)
1256302575.533170: amidxtaped: changer: >> -slot next
1256302701.021430: amidxtaped: changer: << EXITSTATUS 0
1256302701.021468: amidxtaped: changer: << 2 tape:/dev/nst0a
1256302701.023997: amidxtaped: Device /dev/nst0a error = 'Can't open tape device /dev/nst0a: Read-only file system' 1256302701.024018: amidxtaped: Device /dev/nst0a setting status flag(s): DEVICE_STATUS_DEVICE_ERROR
amidxtaped: slot 2: Error reading tape label:
amidxtaped: slot 2: Can't open tape device /dev/nst0a: Read-only file system
1256302701.024056: amidxtaped: changer: >> -slot next
1256302828.352467: amidxtaped: changer: << EXITSTATUS 0
1256302828.352507: amidxtaped: changer: << 3 tape:/dev/nst0a
amidxtaped: slot 3: time X              label Daily306 (wrong tape)
1256302836.387173: amidxtaped: changer: >> -slot next
1256302976.158971: amidxtaped: changer: << EXITSTATUS 0
1256302976.159010: amidxtaped: changer: << 1 tape:/dev/nst0a
amidxtaped: slot 1: time 20091020235001 label Daily304 (wrong tape)
1256302983.314361: amidxtaped: changer: >> -slot next
1256303108.895628: amidxtaped: changer: << EXITSTATUS 0
1256303108.895664: amidxtaped: changer: << 2 tape:/dev/nst0a
1256303108.898249: amidxtaped: Device /dev/nst0a error = 'Can't open tape device /dev/nst0a: Read-only file system' 1256303108.898270: amidxtaped: Device /dev/nst0a setting status flag(s): DEVICE_STATUS_DEVICE_ERROR
amidxtaped: slot 2: Error reading tape label:
amidxtaped: slot 2: Can't open tape device /dev/nst0a: Read-only file system
1256303108.898328: amidxtaped: changer: >> -slot next
1256303240.571204: amidxtaped: changer: << EXITSTATUS 0
1256303240.571242: amidxtaped: changer: << 3 tape:/dev/nst0a
amidxtaped: slot 3: time X              label Daily306 (wrong tape)
Volume labeled 'Daily305' not found.
Got bad response from amrecover: ERROR
1256303875.964651: amidxtaped: critical (fatal): Got bad response from amrecover: ERROR
amidxtaped: Got bad response from amrecover: ERROR
/usr/local/lib/amanda/libamanda-2.6.1p1.so[0xb55fcb]
/lib/libglib-2.0.so.0(g_logv+0x337)[0x516997]
/lib/libglib-2.0.so.0(g_log+0x29)[0x516b69]
/usr/local/lib/amanda/librestore-2.6.1p1.so(load_manual_tape+0x36e)[0xc7cfbe]
/usr/local/lib/amanda/librestore-2.6.1p1.so[0xc7d44b]
/usr/local/lib/amanda/librestore-2.6.1p1.so(search_tapes+0x285)[0xc80f25]
amidxtaped(main+0xd48)[0x804aae8]
/lib/libc.so.6(__libc_start_main+0xdc)[0x2b3e9c]
amidxtaped[0x80497a1]


---------- chg-glue.debug ----------
1256300266.914128: chg-glue: pid 9360 ruid 33 euid 33 version 2.6.1p1: start at Fri Oct 23 13:17:46 2009 1256300266.954606: chg-glue: pid 9360 ruid 33 euid 33 version 2.6.1p1: rename at Fri Oct 23 13:17:46 2009
1256300266.968479: chg-glue: got command '-info'
1256300268.254031: chg-glue: got command '-slot current'
1256300269.530767: chg-glue: got command '-info'
1256300269.531050: chg-glue: got command '-search Daily305'
1256300270.764943: chg-glue: Device /dev/nst0a error = 'Can't open tape device /dev/nst0a: Read-only file system' 1256300270.765040: chg-glue: Device /dev/nst0a setting status flag(s): DEVICE_STATUS_DEVICE_ERROR 1256300680.916371: chg-glue: Device /dev/nst0a error = 'Can't open tape device /dev/nst0a: Read-only file system' 1256300680.916411: chg-glue: Device /dev/nst0a setting status flag(s): DEVICE_STATUS_DEVICE_ERROR 1256301068.800479: chg-glue: Device /dev/nst0a error = 'Can't open tape device /dev/nst0a: Read-only file system' 1256301068.800524: chg-glue: Device /dev/nst0a setting status flag(s): DEVICE_STATUS_DEVICE_ERROR 1256301465.077706: chg-glue: Device /dev/nst0a error = 'Can't open tape device /dev/nst0a: Read-only file system' 1256301465.077748: chg-glue: Device /dev/nst0a setting status flag(s): DEVICE_STATUS_DEVICE_ERROR
1256301736.078354: chg-glue: got command '-slot current'
1256301744.561258: chg-glue: got command '-slot next'
1256301890.559046: chg-glue: got command '-slot next'
1256302032.137229: chg-glue: got command '-slot next'
1256302175.903223: chg-glue: got command '-slot next'
1256302300.452805: chg-glue: got command '-slot next'
1256302436.482554: chg-glue: got command '-slot next'
1256302575.533233: chg-glue: got command '-slot next'
1256302701.024100: chg-glue: got command '-slot next'
1256302836.387237: chg-glue: got command '-slot next'
1256302983.314433: chg-glue: got command '-slot next'
1256303108.898377: chg-glue: got command '-slot next'




--
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.


<Prev in Thread] Current Thread [Next in Thread>