I keep having this problem: I have 3x LTO tape drives connected directly
to my Server (two SCSI, one SAS). The drives work fine with Bareos most
of the time. However if I shut down the server, even if the drives are
idle and the shutdown uses the 'shutdown' command, there is a high
(almost certain but not quite) chance that the tape in the drive at the
time will become un-appendable thereafter, with this message:
02-Feb 21:00 helva-sd JobId 10389: Volume "Incr-04" previously written,
moving to end of data.
02-Feb 21:13 helva-sd JobId 10389: Error: Unable to position to end of
data on device "LTODrive1" (/dev/tape/by-id/scsi-30001438010af988a-nst):
ERR=backends/generic_tape_device.cc:197 ioctl MTEOM error on "LTODrive1"
(/dev/tape/by-id/scsi-30001438010af988a-nst). ERR=Input/output error.
02-Feb 21:13 helva-sd JobId 10389: Marking Volume "Incr-04" in Error in
Catalog.
The error message is quite correct - the drive can no longer find end of
data on that tape. My intent therefore is to prevent that from becoming
the case.
I have found that it is possible to write a new EOF pair on the tape if
you carefully position the head using 'fsf' commands, after which the
tape behaves normally again. Also, on overwriting it the tape behaves
perfectly.
The tapes are configured very similarly... for the one involved in the
message above:
Storage {
Name = "LTO4-I-Tape"
Address = "helva"
Password = "[md5]"
Device = "LTODrive1"
MediaType = "LTO4-I"
}
... and ...
Device {
Name = LTODrive1
DeviceType = tape
Media Type = LTO4-I
Drive Index = 0
Autochanger = no
AutomaticMount = yes
AlwaysOpen = yes
Archive Device = /dev/tape/by-id/scsi-30001438010af988a-nst
Two Eof = yes
RandomAccess = no
RemovableMedia = yes
Offline On Unmount = yes
Spool Directory = /var/spool/tapespool/Drive1
Maximum Block Size = 512k
Maximum File Size = 32g
Maximum Network Buffer Size = 65536
Maximum Concurrent Jobs = 1
}
You will notice I have 'two eof' set, which was my /hope/ that it would
by default set end of data every time it completed a write, that is at
end of each tape 'file' it would write eof, eof, then bsf back over the
second eof so as to overwrite it as soon as the next file was written
and thus ensure there was always an eof pair at end of current data.
That doesn't appear to be happening though.
'Offline on unmount' causes the tape to eject (which I need), which is
nice, and 'always open' stops it doing lots of rewinds, which is also
necessary.
Any ideas how to solve this, so a server shutdown doesn't do nasty
things? I have contemplated an on-shutdown systemd script for the
storage to do something. Might that help?
Regards,
Ruth
--
Software Manager & Engineer
Tel: 01223 414180
Blog:http://www.ivimey.org/blog
LinkedIn:http://uk.linkedin.com/in/ruthivimeycook/
--
You received this message because you are subscribed to the Google Groups
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bareos-users/68aa4afc-a857-ea04-77b3-82f1b90166f8%40ivimey.org.