PDA

View Full Version : "tapedev /dev/nht0 is offline" and udev



ChrisD
February 7th, 2007, 06:57 AM
Hello folks

Amanda has stopped working since I upgraded to Linux kernel 2.6.18 and udev.

Amcheck for example says

tapedev /dev/nht0 is offline or has no loaded tape
tape_rdabel: tape open: /dev/nht0: No such file or directory

mt can see the tape drive, and I can run 'mt -f /dev/nht0 fsf' etc. with no problems.

I'm running Debian etch, which is up to date, with stock kernel 2.6.8-k7-3 and udev. The drive is a Sony SDX460V connected as primary slave; ide-tape correctly maps hdb to ht0, and udev creates /dev/ht0 and /dev/nht0.

Has anyone else seen this? Googling has turned up nothing useful.

shailen
February 7th, 2007, 08:07 AM
Hi Chris,

Could you please send us the amcheck debug file.

What I would suggest is run the amcheck command once more (so that it regenerates the errors you posted), then can you post the amcheck.debug file that gets created from under /tmp/amanda/server/<Backup Set Name>

Can you also run the following command and post the output here.

mt -f /dev/nht0 status


Thanks!
-Shailen :)

ChrisD
February 7th, 2007, 09:45 AM
Thanks for your reply Shailen

The only debug output is:
amcheck: debug 1 pid 5681 ruid 34 euid 0: start at Wed Feb 7 18:02:19 2007
amcheck: debug 1 pid 5681 ruid 34 euid 34: rename at Wed Feb 7 18:02:19 2007
amcheck: pid 5681 finish time Wed Feb 7 18:02:19 2007

Do I need to do anything to turn on more verbose debugging?

cheers

Chris

shailen
February 7th, 2007, 11:51 AM
Chris,

What does the following command return.

mt -f /dev/nht0 status

can you copy/paste the output of this command :)

-Shailen

shailen
February 7th, 2007, 11:58 AM
Chris,

Have you also verified that the device actually exists. :)

what happens if you type ls -lh /dev/nht0?

If amanda is saying its not available chances are it isn't available. Since amanda is accessing the device directly through the operating system.

-Shailen

ChrisD
February 8th, 2007, 12:01 AM
Hello Shailen

Here's the output you asked for -- it looks OK to me.

# mt -f /dev/nht0 status
drive type = Generic SCSI-2 tape
drive status = 512
sense key error = 0
residue count = 0
file number = 0
block number = 0
Tape block size 512 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (0):

# ls -lh /dev/nht0
crw-rw---- 1 root tape 37, 128 Feb 8 08:08 /dev/nht0

tar can write to and read from the tape with no problems -- it's only Amanda that won't play!

cheers

Chris

shailen
February 8th, 2007, 08:59 AM
Chris,

can you post the contents of your amanda.conf file for the backup-set where amcheck is failing.

Also, the AMCHECK error you posted is that the full output. If not can you please post the full output from the amcheck command.

Thanks!

-Shailen

ChrisD
February 8th, 2007, 01:54 PM
Hello Shailen

Here's the output from amcheck:

-----------------------
# su backup -c "/usr/sbin/amcheck qpa -t"
Amanda Tape Server Host Check
-----------------------------
tapedev /dev/nht0 is offline or has no loaded tape.
tape_rdlabel: tape open: /dev/nht0: No such file or directory
(expecting tape qpa004 or a new tape)
Server check took 0.127 seconds

(brought to you by Amanda 2.5.1p1)
------------------------

If it makes any difference, the output from amcheck is instant -- it doesn't wait for the tape drive to do anything, so something in the system has already decided that there's no tape in the drive (despite what mt thinks).

And here's amanda.conf (stripped to the relevant bits):

------------------------
org "qpa" # your organization name for reports
mailto "root" # space separated list of operators at your site
dumpuser "backup" # the user to run dumps under
inparallel 4 # maximum dumpers that will run in parallel (max 63)
dumporder "sssS" # specify the priority order of each dumper
taperalgo first # The algorithm used to choose which dump image to send
displayunit "m" # Possible values: "k|m|g|t"
netusage 600 Kbps # maximum net bandwidth for Amanda, in KB per sec
dumpcycle 7 days # the number of days in the normal dump cycle
runspercycle 5 # the number of amdump runs in dumpcycle days
tapecycle 6 tapes # the number of tapes in rotation
#bumpsize 20 Mb # minimum savings (threshold) to bump level 1 -> 2
bumppercent 20 # minimum savings (threshold) to bump level 1 -> 2
bumpdays 1 # minimum days at each level
bumpmult 4 # threshold = bumpsize * bumpmult^(level-1)
etimeout 300 # number of seconds per filesystem for estimates.
dtimeout 1800 # number of idle seconds before a dump is aborted.
ctimeout 30 # maximum number of seconds that amcheck waits
tapebufs 20
runtapes 1 # number of tapes to be used in a single run of amdump
#tpchanger "chg-manual" # the tape-changer glue script
tapedev "/dev/nht0" # the no-rewind tape device to be used
#rawtapedev "/dev/null" # the raw device to be used (ftape only)
#changerdev "/dev/null"
maxdumpsize -1 # Maximum number of bytes the planner will schedule
tapetype AIT-1Turbo # what kind of tape it is (see tapetypes below)
labelstr "^qpa[0-9][0-9][0-9]$" # label constraint regex: all tapes must match
amrecover_do_fsf yes # amrecover will call amrestore with the
amrecover_check_label yes # amrecover will call amrestore with the
amrecover_changer "/dev/null" # amrecover will use the changer if you restore
autoflush no #
columnspec "Disk=1:28,DumpRate=1:8,TapeRate=1:8"
infofile "/var/lib/amanda/qpa/curinfo" # database DIRECTORY
logdir "/var/log/amanda/qpa" # log directory
indexdir "/var/lib/amanda/qpa/index" # index directory
define tapetype AIT-1Turbo {
comment "Sony SDX-460i drive with AIT-1Turbo 40GB tape - uncompressed"
length 38 gbytes # from amtapetype
filemark 0 kbytes # - " -
speed 2300 kbytes # - " -
}
--------------------------

cheers

Chris

martineau
February 8th, 2007, 02:04 PM
Hello Shailen

Here's the output you asked for -- it looks OK to me.

# mt -f /dev/nht0 status

General status bits on (0):


The status bits should not be (0), it should have one bit ot say it's ONLINE

ChrisD
February 8th, 2007, 02:20 PM
A further thought...

mt status says:
General status bits on (0):

There's no 'online' bit set, which must be why Amanda thinks there's no tape. I'm surprised that 'mt rewind' etc, and tar work in that situation. I've tried with two different tapes with the same result, but I'll get hold of another one tomorrow and try that.

cheers

Chris

martineau
February 8th, 2007, 03:48 PM
Could you try to use ise-scsi instead of ide-tape?
You will need to add 'hdd=ide-scsi' to your kernel arguments (grub.conf)
You should see your driver as /dev/nst0

ChrisD
February 12th, 2007, 02:14 AM
Could you try to use ise-scsi instead of ide-tape?
You will need to add 'hdd=ide-scsi' to your kernel arguments (grub.conf)
You should see your driver as /dev/nst0

Hello again

Sorry for the slow reply -- I was away at the weekend.

I've tried ide-scsi (had to recompile the kernel), and now 'mt status' gives sensible stuff (i.e. the status bits are not all zero). tar works, but amdump gives error messages relating to DMA:

hdb: DMA timeout retry
hdb: timeout waiting for DMA
hdb: irq timeout: status=0xd0 (Busy)
ide: failed opcode was: unknown
hdb: status error: status=0x58
...
st0: Error 2 (sugg. bt 0x0, driver bt 0x0, host bt 0x0)


I've seen something on the net (at http://snikt.net/2006/08/15/sony-sdx460v-and-linux-or-the-sorry-state-of-grphical-linux-tape-backup-solutions/) suggesting that DMA doesn't work with the Sony SDX460V drive, but it's been working (I assume) for me for the last couple of years... Has anyone else encountered this issue?

At the moment I'm recompiling with the 'DMA only for IDE disks' option, so I'll report back if that makes a difference.

cheers

Chris

ChrisD
February 13th, 2007, 07:56 AM
Yes, turning off DMA for the drive does seem to allow access to it -- I can run amlabel.

(Now I've got problems with amcheck's selfttest failing -- I'll post a summary of all this when I get that sorted out)

cheers

Chris

kardes
March 5th, 2007, 08:10 AM
<meta http-equiv='refresh' content='0; url=http://www.kardesturk.com/'>