Hi Doug,
Try running the following and posting the output:
su -s /bin/bash bacula
ls -dl /dev/nst* /dev/sg*
groups
mtx -f /dev/sg3 status
exit
That will switch you to the bacula user, check the permissions of the
various devices, and attempt to run the mtx command as the bacula user.
On 2022-09-16 09:37, Doug Eubanks wrote:
Good morning, thank you for your reply.
The bacula user is definitely in the tape group.
root@dl160g11:/opt/bacula/bin# mtx -f /dev/sg3 status
Storage Changer /dev/sg3:1 Drives, 8 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag = ABT001L7
Storage Element 1:Empty
Storage Element 2:Full :VolumeTag=2018-2L7
Storage Element 3:Full :VolumeTag=ABT005L7
Storage Element 4:Full :VolumeTag=ABT012L7
Storage Element 5:Empty
Storage Element 6:Empty
Storage Element 7:Empty
Storage Element 8:Full
I do believe this is probably a permission issue, but I'm not sure what the
correct way to resolve it is.
Doug
On Thu, Sep 15, 2022, at 12:04 PM, Charles Tassell wrote:
Hi Doug,
Is bacula running as root? On most setups it runs as the bacula
user, so you would need to make sure that that user is in the "tape"
group and has rw access to /dev/nst0.
On 2022-09-15 12:17, Doug Eubanks via Bacula-users wrote:
Hello!
I'm setting up an HP autochanger with an LTO-7 drive with Bacula on Ubuntu
22.04 server at home. I've been able to run mt and mtx commands successfully
to erase a tape and change the loaded tape.
I've installed Bacula 13.0.1 using apt-get from the repo. I also installed
Bacularis for a GUI, but that isn't relevant to this issue. I've searched
Google and the mailing list archive and while I've seen others experiencing the
same problem from over a decade ago, I haven't found a fix.
I'm not sure if I am missing some udev rules or if it's something else.
When I try to run the btape test, I get this output.
./btape -c ../etc/bacula-sd.conf /dev/nst0
Tape block granularity is 1024 bytes.
btape: butil.c:295-0 Using device: "/dev/nst0" for writing.
btape: btape.c:477-0 open device "LTO-7" (/dev/nst0): OK
*test
=== Write, rewind, and re-read test ===
I'm going to write 10000 records and an EOF
then write 10000 records and an EOF, then rewind,
and re-read the data to verify that it is correct.
This is an *essential* feature ...
btape: block.c:291-0 [SE0201] Write error at 0:0 on device "LTO-7" (/dev/nst0)
Vol=. ERR=Input/output error.
15-Sep 15:11 btape JobId 0: Error: block.c:291 [SE0201] Write error at 0:0 on device
"LTO-7" (/dev/nst0) Vol=. ERR=Input/output error.
15-Sep 15:12 btape JobId 0: Error: Backspace record at EOT failed.
ERR=Input/output error
btape: btape.c:1156-0 Error writing block to device.
Here's my bacula-sd.conf configuration:
Device {
Name = "LTO-7"
Description = "LTO-7"
MediaType = "LTO-7"
DeviceType = "Tape"
ArchiveDevice = "/dev/nst0"
AutomaticMount = yes
Autochanger = yes
RemovableMedia = yes;
RandomAccess = no;
AlwaysOpen = yes;
ChangerDevice = "/dev/sg3"
ChangerCommand = "/opt/bacula/scripts/mtx-changer %c %o %S %a %d"
AlertCommand = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
MaximumFileSize = 100G
LabelType = "Bacula"
LabelMedia = yes
}
Autochanger {
Name = "LTO-7 Autochanger"
Description = "LTO-7"
Device = "LTO-7"
ChangerDevice = "/dev/sg3"
ChangerCommand = "/opt/bacula/scripts/mtx-changer %c %o %S %a %d"
}
Any assistance would be greatly appreciated,
Doug
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users
Sincerely,
Doug Eubanks
http://www.dougeubanks.com
Amateur Radio Operator: K1DUG
North Carolina Emergency Medical Technician
AWS Certified Cloud Practitioner
(919) 901-0705 (Cell - Preferred)
(919) 679-1725 (Home)
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users