Using Ultrium 7 WORM tapes

General support questions
stevemowbray
Posts: 417
Joined: 2012/06/26 14:20:47

Re: Using Ultrium 7 WORM tapes

Post by stevemowbray » 2018/02/14 09:54:00

tar -xvf will extract files. The man page would definitely be a help :-)

tunk
Posts: 472
Joined: 2017/02/22 15:08:17

Re: Using Ultrium 7 WORM tapes

Post by tunk » 2018/02/14 10:48:49

As suggested, use tar -xvf: x=extract, t=list.
And I seem to remember that it will extract to the current path, i.e. make sure you don't overwrite something important.

badgerfruit
Posts: 9
Joined: 2018/02/13 09:34:18

Re: Using Ultrium 7 WORM tapes

Post by badgerfruit » 2018/02/14 11:31:48

tunk wrote:As suggested, use tar -xvf: x=extract, t=list.
And I seem to remember that it will extract to the current path, i.e. make sure you don't overwrite something important.
#SchoolboyError

Yep, correct ... using tar xf worked and yes, extracted into the current working directory.
Guys, thank you for your help, you won't believe how much hair I have lost with this the past few days and weeks!!

ps, Yes, I discovered this for myself using the man page ;)

badgerfruit
Posts: 9
Joined: 2018/02/13 09:34:18

Re: Using Ultrium 7 WORM tapes

Post by badgerfruit » 2018/12/06 16:35:29

Hello,
I'm sorry to bump this thread but since I last posted I have been on other projects and just returned to this now.
So, after all the help received last time (thank you all!), I was hoping to pick more brains to figure out how I can write multiple tar's to a WORM tape.

I used the command below to write some data to the tape:

Code: Select all

tar -c /mnt/bigdisk/quantum-backup | mbuffer -t -m 2048M -P 80 -o /dev/st0
And when I do the command below, I see it's worked:

Code: Select all

dd if=/dev/st0 bs=1M | tar -tvf -

drwxr-xr-x root/root         0 2018-02-15 11:49 mnt/bigdisk/quantum-backup/
-rw-r--r-- root/root     12288 2018-01-19 11:37 mnt/bigdisk/quantum-backup/.oldbackup.old.swp
drwxr-xr-x root/root         0 2018-10-29 15:51 mnt/bigdisk/quantum-backup/templates/
-rw-r--r-- root/root       185 2018-02-15 13:04 mnt/bigdisk/quantum-backup/templates/tapebackupfailed.txt
-rw-r--r-- root/root       210 2018-02-15 13:04 mnt/bigdisk/quantum-backup/templates/tapebackupcomplete.txt
-rw-r--r-- root/root       202 2018-02-15 13:03 mnt/bigdisk/quantum-backup/templates/tapereminder.txt
drwxr-xr-x root/root         0 2018-12-04 00:19 mnt/bigdisk/quantum-backup/data/
-rwxr-xr-x root/root      4639 2016-12-29 09:27 mnt/bigdisk/quantum-backup/data/tf-insite.php
-rwxr-xr-x root/root  51604992 2018-12-04 00:01 mnt/bigdisk/quantum-backup/data/Patbase.adp
-rwxr-xr-x root/root  29118976 2018-12-04 00:01 mnt/bigdisk/quantum-backup/data/Patbase.ade
0+13135 records in
0+13134 records out
53796864 bytes (54 MB) copied, 2.20562 s, 24.4 MB/s
However, as this is to help me create a backup script, I want to append more data to the "end" of this write rather than trash WORM 7 6TB tapes (at £70+ per shot!) with a single, 3gb write!!

I have google'd the shazam out of this and seen many sites with useful tips but none work, for example using:

Code: Select all

mt -f /dev/st0 rewind
mt -f /dev/st0 asf 2
and then performing the tar again (trying to use a different folder), like below, gives an error:

Code: Select all

mt -f /dev/st0 rewind
mt -f /dev/st0 fsf 1
tar -c /tmp | mbuffer -t -m 2048M -P 80 -o /dev/st0
tar: Removing leading `/' from member names
in @  0.0 KiB/s, out @  0.0 KiB/s,  0.0 KiB total, buffer 100% fullmbuffer: error: outputThread: error writing to /dev/st0 at offset 0x0: Input/output error
in @  0.0 KiB/s, out @  0.0 KiB/s, 0 x  0.0 KiB total, buffer 100% fullmbuffer: error: error closing /dev/st0: Input/output error

summary:  0.0 KiByte in 14.9sec - average of  0.0 KiB/s
mbuffer: warning: error during output to /dev/st0: Input/output error
I've checked the man pages for MT and using 'eod' instead of asf, fsf and god knows what else!
Does anyone have any ideas on what I can try next please?

User avatar
TrevorH
Forum Moderator
Posts: 24353
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Using Ultrium 7 WORM tapes

Post by TrevorH » 2018/12/06 17:01:47

I think you write to /dev/nst0 not /dev/st0.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

badgerfruit
Posts: 9
Joined: 2018/02/13 09:34:18

Re: Using Ultrium 7 WORM tapes

Post by badgerfruit » 2018/12/07 13:50:01

TrevorH wrote:
2018/12/06 17:01:47
I think you write to /dev/nst0 not /dev/st0.
Thanks ... do you mean initially, subsequently or all the time?

ps. What's the difference with nst0 vs st0 ?

User avatar
TrevorH
Forum Moderator
Posts: 24353
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Using Ultrium 7 WORM tapes

Post by TrevorH » 2018/12/07 13:55:32

/dev/st0 rewinds every time, /dev/nst0 does not.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

badgerfruit
Posts: 9
Joined: 2018/02/13 09:34:18

Re: Using Ultrium 7 WORM tapes

Post by badgerfruit » 2018/12/07 15:02:47

B I N G O!

Thank you, so, starting with a fresh tape, I am writing to the tape with:

Code: Select all

tar -c /tmp | mbuffer -t -m 2048M -P 80 -o /dev/nst0
Then I can repeat that command with different source folders successfully :D

To read, I initally do

Code: Select all

dd if=/dev/st0 bs=1M | tar -tvf -
... fast forward to the next tar with:

Code: Select all

mt -f /dev/nst0 asf 1
and then repeat the read command and I can see my 2nd write!!
Now to put this into a working script (although I feel this is a job for Monday!)


@TrevorH, thank you for your assistance and patience, it really is appreciated and my god, my head is sore from all the googleing, trials and errors!
Many thanks

Richard

Post Reply