Amanda-Users

amlabel: writing label: Device or resource busy

2006-08-02 05:17:04
Subject: amlabel: writing label: Device or resource busy
From: Sven Rudolph <Sven_Rudolph AT drewag DOT de>
To: amanda-users AT amanda DOT org
Date: Wed, 02 Aug 2006 11:11:14 +0200
(This is on Debian GNU/Linux, kernel 2.6.16.20)

With amanda 2.5.0p2 I cannot label new tapes:

  backup:~$ /usr/sbin/amlabel WeeklySet1 Set1-4-12 slot 12
  changer: got exit: 0 str: 12 /dev/overland-sdlt600-tape
  labeling tape in slot 12 (/dev/overland-sdlt600-tape):
  rewinding, reading label, not an amanda tape (Read 0 bytes)
  rewinding, writing label Set1-4-12
  amlabel: writing label: Device or resource busy
  amlabel: writing label: Device or resource busy
  amlabel: pid 22206 finish time Wed Aug  2 10:54:28 2006

It didn't work with 2.5.0 either, but is OK with 2.4.5:

  backup:~$ /usr/sbin/amlabel WeeklySet1 Set1-4-12 slot 12
  labeling tape in slot 12 (/dev/overland-sdlt600-tape):
  rewinding, reading label, not an amanda tape
  rewinding, writing label Set1-4-12, checking label, done.

Relevant part of strace:

write(2, "changer: got exit: 0 str: 12 /de"..., 56changer: got exit: 0 str: 12 
/dev/overland-sdlt600-tape
) = 56
fstat64(1, {st_mode=S_IFREG|0644, st_size=88182, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb7eee000
write(1, "labeling tape in slot 12 (/dev/o"..., 64labeling tape in slot 12 
(/dev/overland-sdlt600-tape):
rewinding) = 64
open("/dev/overland-sdlt600-tape", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, MGSL_IOCGPARAMS or MTIOCTOP or SNDCTL_MIDI_MPUMODE, 0xbff05644) = 0
close(3)                                = 0
write(1, ", reading label", 15, reading label)         = 15
open("/dev/overland-sdlt600-tape", O_RDONLY|O_LARGEFILE) = 3
mmap2(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb7c50000
ioctl(3, MGSL_IOCGPARAMS or MTIOCTOP or SNDCTL_MIDI_MPUMODE, 0xbff044d4) = 0
read(3, "", 262144)                     = 0
munmap(0xb7c50000, 266240)              = 0
close(3)                                = 0
write(1, ", not an amanda tape (Read 0 byt"..., 45, not an amanda tape (Read 0 
bytes)
rewinding) = 45
open("/dev/overland-sdlt600-tape", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, MGSL_IOCGPARAMS or MTIOCTOP or SNDCTL_MIDI_MPUMODE, 0xbff05644) = 0
close(3)                                = 0
write(1, ", writing label Set1-4-12", 25, writing label Set1-4-12) = 25
open("/dev/overland-sdlt600-tape", O_RDWR|O_LARGEFILE) = 3
ioctl(3, MGSL_IOCGPARAMS or MTIOCTOP or SNDCTL_MIDI_MPUMODE, 0xbff044f4) = 0
write(3, "AMANDA: TAPESTART DATE X TAPE Se"..., 32768) = -1 EBUSY (Device or 
resource busy)
close(3)                                = 0
write(2, "amlabel: writing label: Device o"..., 48amlabel: writing label: 
Device or resource busy
) = 48
write(2, "amlabel: writing label: Device o"..., 48amlabel: writing label: 
Device or resource busy
) = 48
time([1154508266])                      = 1154508266
getpid()                                = 21480
write(2, "amlabel: pid 21480 finish time W"..., 56amlabel: pid 21480 finish 
time Wed Aug  2 10:44:26 2006
) = 56
close(2)                                = 0
write(1, "\n", 1
)                       = 1
munmap(0xb7eee000, 4096)                = 0
exit_group(1)                           = ?

Does anyone have an idea what could cause EBUSY or what changed in
this area in amanda 2.5.0 ?

        Sven


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