Bacula-users

[Bacula-users] Unable to position to end of data on device

2015-06-01 17:09:34
Subject: [Bacula-users] Unable to position to end of data on device
From: badangel <bacula-forum AT backupcentral DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 22 May 2015 14:01:29 -0700
I know that the post is old, but after some head banging I found the clue ...
I had the same problem with two LTO4 tapes (I own an Overland Arcvault 24 with 
a server running ubuntu 14). The server crashed before bacula be able to end 
the tape writing for these two tapes.
I found the clue reading how LTO drive detects / stores the end-of-data mark. 
Some tells that two consecutive end of files (EOF) is used to the this is the 
end of data, others claims that when the write is finished the eod is 
automatically written ... So ...
- First list the volume in bacula (list volumes) and find how many files are 
recorder for your tape: in my case: 118 files on the tape in slot 6
- close bacula (bacula-dir stop, bacula-sd stop)
- use mtx to load the tape (if you own a tape changer, else load it manually): 
mtx -f /dev/tape/by-id/yourchangerdevice
- rewind tape if needed (mt -f /dev/tape/by-id/yourtapedevice-nst)
- next fast forward to the n-1 file (in my case, I must skip 117 files to 
position the drive on the 118th file): mt -f /dev/tape/by-id/yourtapedevice-nst 
fsf 117
- write two eof on the tape: type twice:  mt -f 
/dev/tape/by-id/yourtapedevice-nst eof
- rewind tape, and unload it
- restart bacula sd then dir
- update volume from error to append
- enjoy using your tape again !!!
Note: bacula may complain that file number mismatch, and will automatically 
corrects :
  22-mai 22:45 david-sd JobId 3992 : Attention : For Volume "JC0006L4":
  The number of files mismatch! Volume=119 Catalog=118
  Correcting Catalog

+----------------------------------------------------------------------
|This was sent by nospam AT teranova DOT org via Backup Central.
|Forward SPAM to abuse AT backupcentral DOT com.
+----------------------------------------------------------------------



------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] Unable to position to end of data on device, badangel <=