No issues creating an LTO backup on Debian .. SAS3 with LTO9
tar -czf */dev/st0 /data1
Backing up a second directory to the same tape writes over the first set of data.
tar -czf */dev/st0 /data2
Anyone doing this with LTO care to share how to move the tape pointer to the end of the first job so the second archive does not write over the first ?
Do you need to do separate tape sections of tape / separate tape archives on the same tape? -- This seems like something someone might not be aware of when they need to do a restore; e.g. mt to the 3rd tar type thing.
Can you do a single monolithic tar that preserves the directory structure?
I did extensive searching and read the tar manual a bunch before this thread. I did move the tape around with FSF, but could not get the second tar to play back. I could position the tape correctly, checked with status and would run the second backup. First first was fine to replay. But I could not get the second to replay.
The file structure in /dev/ looks like this when the drive is powered on:
crw-rw---- 1 root tape 9, 128 Mar 25 19:32 nst0
crw-rw---- 1 root tape 9, 0 Mar 25 19:32 st0
drwxr-xr-x 4 root root 80 Mar 25 19:32 tape
crw-rw---- 1 root tape 9, 224 Mar 25 19:32 nst0a
crw-rw---- 1 root tape 9, 160 Mar 25 19:32 nst0l
crw-rw---- 1 root tape 9, 192 Mar 25 19:32 nst0m
crw-rw---- 1 root tape 9, 96 Mar 25 19:32 st0a
crw-rw---- 1 root tape 9, 32 Mar 25 19:32 st0l
crw-rw---- 1 root tape 9, 64 Mar 25 19:32 st0m
Tape directory contains two pointers:
root@host:/dev/tape/by-path# ls -lt
total 0
lrwxrwxrwx 1 root root 9 Mar 25 19:32 pci-0000:02:00.0-sas-phy6-lun-0 -> ../../st0
lrwxrwxrwx 1 root root 10 Mar 25 19:32 pci-0000:02:00.0-sas-phy6-lun-0-nst -> ../../nst0
I have no problems running a backup to either /dev/st0 OR /dev/nst0. So its not a path issue.
The purpose of a second tar is simply a second backup. They both fit when you have 15TB uncompressed on a tape
Currently running this successfully for a single backup:
I'm coming to this topic very late I know but I'm trying to understand.
So you still have a problem???
I don't think that you've stated which operating system it is; what is it?
Let me just state a few simple facts just to ensure it's crystal and we're all not missing a point here.
By default a tape device will 'rewind' after completing an operation; read or write or whatever.
To avoid a 'rewind' you must specify the 'no rewind' device. So if you write a tar archive to a newly mounted tape using a 'no rewind' device it will stop dead at the end of writing and not rewind. If you were writing the archive using the verbose switch (-v) and watching the file list as the operation proceeded, you should hear no noise from the tape drive at the end, i.e. no rewind is performed. You could then write a second tar archive thereby storing two tar archives on the tape sequentially.
Each of those archives is regarded as a file. (Imagine those archives were written to disk where they would appear as two separate files).
Now, assuming the tape is dismounted/unloaded you should be able to skip over the first archive by either (a) using 'mt' command to skip over one file as posted by @MadeInGermany , or (b) using 'tar -tv' to verbose list the first archive to the screen whilst specifying a 'no rewind' device thereby parking the tape at the end of the first archive. You should now be ready to read/list/restore the second tar archive.
It should be as simple as that. Please post back whatever doesn't seem to work for you.