StoreEver Tape Storage

Re: how to use streamer

 
SOLVED
Go to solution
Dennis Handly
Acclaimed Contributor

Re: how to use streamer

>I will read and then try to practice with pax utility.

You may need to install PAX-ENH on your 11.31 system.
If > 8 Gb, read about "-x pax" format.
If you want to read (or write) this on 11.23, you'll need to install PAX-ENH there too.
rustam_2
Super Advisor

Re: how to use streamer

Hi Torsten,

I read several topics about kind of tape h\w path.
So here 2 kind of them
No rewind ones:
/dev/rmt/0m
/dev/rmt/0mb(best)

and rewind ones:
/dev/rmt/0mn
/dev/rmt/0mnb(best)

and i didnt find more information but read that there are include hardware compress:
/dev/rmt/c0t0d0BEST
/dev/rmt/c0t0d0BESTb
/dev/rmt/c0t0d0BESTn
/dev/rmt/c0t0d0BESTnb

But what gives me if i use rewind one or norewind ones? I think to use h\w compress is best way, isnt?


1. I write 3 files to my tape
$mt status
Drive: HP Ultrium 3-SCSI
Format:
Status: [81114400] EOF online compression immediate-report-mode
File: 3
Block: -1

2. and went to begin of cartridge
$ mt -f /dev/rmt/0mn rewind

3. check the status and files in cartridge
$ mt status
Drive: HP Ultrium 3-SCSI
Format:
Status: [41114400] BOT online compression immediate-report-mode
File: 0
Block: 0

I think Files in status command means number of files in my cartridge. What does mean block ('-1' or '0')? How can i read files' name iand extract one them? Then went to end 3 file and continue write 4th file?

+ i didnt find docs about BOT and EOF status in mt status command.

Regards,
Rustam
Dennis Handly
Acclaimed Contributor

Re: how to use streamer

>But what gives me if I use rewind one or norewind ones?

If you don't use norewind, after you close the FD, the tape is rewound. That means you can't use "mt fsf 3" to position the tape.
WARNINGS: Only raw, no-rewind Berkeley-type devices should be specified.

>1. I write 3 files to my tape

How are you doing this?

>I think Files in status command means number of files in my cartridge.

It means filemarks.

>What does mean block ('-1' or '0')?

How many tape records from the last filemark.

>How can read files' name and extract one them?

You don't want to go there. If you try to append to your tape without a commercial or special purpose backup program, you risk overwriting everything.

If you have written a pax/tar/cpio archive, you can list and extract files.

>I didn't find docs about BOT and EOF status in mt status command.

Have you ever threaded reel to reel mag tape? :-)
mt(1) just assumes you know about status.
It does point to mt(7):
http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02264803/c02264803.pdf

See comments about "struct mtget".
rustam_2
Super Advisor

Re: how to use streamer

Hi Dennis,
>> If you don't use norewind, after you close the FD, the tape is rewound. That means you can't use "mt fsf 3" to >>position the tape.
I got it now. I think it is not to important for me, will I use norewind or rewind option. I decided to use /dev/rmt/0mn, dont know will I have problems in the future coz of this or wont.

>>WARNINGS: Only raw, no-rewind Berkeley-type devices should be specified.
I dont know what did you mean.

>1. I write 3 files to my tape
>>How are you doing this?
tar cvf /dev/rmt/0mn

>>You don't want to go there. If you try to append to your tape without a commercial or special purpose backup >>program, you risk overwriting everything.
>>If you have written a pax/tar/cpio archive, you can list and extract files.

I dont use any freeware soft or commercial. I am gonna use just tar command to write\read files to\from tape.
I read several docs and decided to do following steps.
1.I will use device file /dev/rmt/0mn
2.Write files to tape with this command: tar cvf /dev/rmt/0mn can I write several files in one time?
3.For instance, I have 5 files in my tape.
4.I rewind cartridge to go begin of cartridge: mt â f /dev/rmt/0mn rewind
5.List files in tape step by step. I need to run 5 times to see all my 5 files.
tar -tvf /dev/rmt/0mn
6.Forward space count ï¬ les I run mt -f /dev/rmt/0mn fsf N (N=1,2,3..)
7.But I couldnt run Backward space count ï¬ les. tar -tvf /dev/rmt/0mn doesnt give me any error. But I was still in end of cartridge, why? I run 1-2 times tar -tvf /dev/rmt/0mn and thought that im in middle of cartridge. But when I run command tar -tvf /dev/rmt/0mn got error Tar: blocksize = 0; broken pipe?
8.I extract file from tape like this
tar -tvf /dev/rmt/0mn (which extracts all files)
tar -tvf /dev/rmt/0mn /path/my_file which extracts my_file
I want to know, how can I change restore path? For instance, I write file from /tmp/my_file and always restores to /tmp. How can I restore to another directory? Is there another command?

are these steps ok if I will make manual and give to use for implementing production environment?
Dennis Handly
Acclaimed Contributor

Re: how to use streamer

>>WARNINGS: Only raw, no-rewind Berkeley-type devices should be specified.

>I don't know what did you mean.

It means you must have a norewind device to use mt's positioning commands.

>tar cvf /dev/rmt/0mn

This only adds ONE tarfile to the tape.

>2. Write files to tape with this command: tar cvf /dev/rmt/0mn can I write several files in one time?

Yes, you can give tar lots of directories/files and it will write one tarfile to the tape.

>3. I have 5 files in my tape.

Again how did you do that? One tar or 5?

>5. List files in tape step by step. I need to run 5 times to see all my 5 files.

You are going to have no end of problems keeping track of N tars on the same tape and if you make a mistake, you have lost all of them.

This is what I recommend you not do.

>how can I change restore path? Is there another command?

You either tar it off with a relative path or you don't use tar to restore. You can use pax's -s option or gnu tar.

>are these steps ok if I will make manual and give to use for implementing production environment?

How are you going to handle tape positioning and not have an operator error and lose everything on your tape?
rustam_2
Super Advisor

Re: how to use streamer

Thanks Dennis,

>> tar cvf /dev/rmt/0mn
>This only adds ONE tarfile to the tape.
>>2. Write files to tape with this command: tar cvf /dev/rmt/0mn can I write several files in one time?
>Yes, you can give tar lots of directories/files and it will write one tarfile to the tape.
How can I write several files in the same time? Every night about 12 dump files generate, so I can write them in one tar file?
>>3. I have 5 files in my tape.
>Again how did you do that? One tar or 5?
I write them so:
# tar cvf /dev/rmt/0mn /tmp/first_files
# tar cvf /dev/rmt/0mn /tmp/second_files
and etc
and read them
# tar â tvf /dev/rmt/0mn (I need to run 5 times to see all files. One command shows me only one file)

>>5. List files in tape step by step. I need to run 5 times to see all my 5 files.
>You are going to have no end of problems keeping track of N tars on the same tape and if you make a mistake, you >have lost all of them.
>This is what I recommend you not do.
Then how should I write them there?
>>how can I change restore path? Is there another command?
>You either tar it off with a relative path or you don't use tar to restore. You can use pax's -s option or gnu tar.
Ok, I will try to restore with pax â s and gnu tar. Hope I could.

>How are you going to handle tape positioning and not have an operator error and lose everything on your tape?
Yeah, I guess that I have mistake and choice wrong way. So could you recommend and suggest some idea and sequence of steps which help me to solve my problems.
Dennis Handly
Acclaimed Contributor

Re: how to use streamer

>How can I write several files in the same time? Every night about 12 dump files generate, so I can write them in one tar file?

Yes: tar -cvf /dev/rmt/0mn /tmp/first_files /tmp/second_files ...

You can also look into using -C path, to simplify things:
tar -cvf /dev/rmt/0mn -C /tmp/first_files . -C /tmp/second_files .

># tar cvf /dev/rmt/0mn /tmp/first_files
># tar cvf /dev/rmt/0mn /tmp/second_files
>Then how should I write them there?

There is no need to do it this way.

>I will try to restore with pax -s and gnu tar.

You should first practice the syntax on a tar disk file and not the tape. Use -k so you don't overwrite existing files.

>So could you recommend and suggest some idea and sequence of steps

I assumed you appended to the tape on following days, that's dangerous. Doing it one after another isn't so bad but there is no reason to do that.