LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-11-2002, 11:22 AM   #1
goyome
LQ Newbie
 
Registered: May 2002
Distribution: red hat 7.2
Posts: 5

Rep: Reputation: 0
Question How to use mt and tar ?


Hi,

I'm just trying to use a DLT to backup my Linux System.
Obviously, I can't find a good way of using tar and mt.
The device /dev/st0 seems to work well : it gives me the number of the block where it points (with mt -f /dev/st0 tell), it rewinds...
But as soon as I'm trying to backup and restore with tar the system react as if he throw the data in /dev/null

What are my errors? Did I badly configure my DLT? Do I need to use something else than tar?(I didn't succeed with dump-restore but ...)
Does someone have an idea
There's maybe not enough information. Tell me please.
 
Old 06-12-2002, 04:46 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
What commands are you exactly using? If you trying to add data after each other without rewinding you will have to use the nonrewind device /dev/nst0.

But in any case the following commands should at least give you something:

mt -f /dev/st0 rewind
tar cvf /dev/st0 testfile (will rewind after this command)
tar tvf /dev/st0
 
Old 06-12-2002, 11:50 AM   #3
goyome
LQ Newbie
 
Registered: May 2002
Distribution: red hat 7.2
Posts: 5

Original Poster
Rep: Reputation: 0
Unhappy Trying to better understand

Well in fact, wouldn't it be possible to use the creation of blocks or partitions to quickly find the data on the tape. With such a possibility I could program a shell to remember what is going on which place on the tape and then do it.
With this file I could maybe backup easily?

Am I right or is there a better way to do that

Thanks by advance

Goyome.will.backup.his.system
 
Old 06-13-2002, 01:51 AM   #4
goyome
LQ Newbie
 
Registered: May 2002
Distribution: red hat 7.2
Posts: 5

Original Poster
Rep: Reputation: 0
Post Here is all the problem !!

Hi,

I tried to do what you describe but I had the same problem as before. So I just copy what is given on my terminal :

[root@MACHINE donnees]# mt -f /dev/nst0 rewind
[root@MACHINE donnees]# tar -cvf /dev/nst0 /tmp
tar: Removing leading `/' from member names
tmp/
tmp/lost+found/
tmp/install.log
tar: /dev/nst0: n'a pu écrire seulement 0 sur 10240 octets
tar: Erreur non récupérable: fin de l'exécution immédiate
[root@MACHINE donnees]#

This means that it couldn't write on the device /dev/nst0 and I've got the same problem with the device st0

This makes me think that I have a problem of configuration of the driver, so I printed the status of my DLT

[root@MACHINE donnees]# mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 32768 bytes. Density code 0x7f (no translation).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN

Isn't it a problem in the density code?
Do I have to create a partition?

Please HELP !!!!
 
Old 06-13-2002, 07:16 AM   #5
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
mt densities gives you a list of all the densities. I don't see any 7f in my list. You could look up the densities in the tape drive documentation and try 'mt setdensity number'. What kind of DLT tape is it by the way? And is it recognized properly by the kernel? What does 'cat /proc/scsi/scsi' tell you? And what happens when you try setting the blocksize to something smaller. Like 1024 maybe.

If you create partitions or blocks on the tape then you won't be able to read and write from it using standard tape tools like tar. But if you only use your own program to read and write to the tape then I suppose it could be faster. Depends on how much you read and write to the tape though and the size and amount of the files. I don't know how you would create partitions on a tape in linux though, only done that in windows NT.
 
Old 06-13-2002, 10:04 AM   #6
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
I used tar and mt to make backups on .DAT tapes. If you have problems with tar, then maybe you can try to use the program taper for making backups.
Every time your tape is full you can use mt /dev/st0 rewind to rewind the tape and overwrite your existing data.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
tar tar cvf - . | (cd /root/; tar xvf -) ewt3y Linux - General 10 02-19-2014 10:55 AM
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 5 11-08-2010 11:02 AM
.rpms, .tar.gz, .tgz, .src.rpm, & .tar.bz2 whoots Mandriva 10 10-18-2003 12:08 PM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 06:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration