Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A pal of mine has a stock control system that runs on mandrake v8 which I think is circa 2003, every night the software does a backup to a tape drive and the tapes are numbered for the backup. We could do to be able to format some spare tapes, however I'm struggling to understand how it all works, it appears you don't format a tape drive or maybe you can?!
I have installed my own seagate tape drive on my PC with Ubuntu 14.4 on and can interrogate the tape using the command;
mt -f /dev/st0 status
this tells me the tape is there okay.
I tried to run;
tar -tzf /dev/st0
this exited with an error and so did the command to extract files.
If I typed ls -l /dev/st0 no files show just the permissions and tape name; tape9.
Is it possible to format these tapes or name them? At the moment a support comapny want £50 per tape to format them. Or maybe its the programs own proprietary backup system and format.
Either way I'm stuck!
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672
Rep:
We'd need to know what sort of tape drive you're using. There are DLTs, Super DLTs,(Digital Linear tape) DDS1, DDS2, DDS3, DDS4 helical scan tapes, 1/4" Quik tapes and numerous others. There are also several density settings you can set up on most drives. Trying to read a DDS3 tape in a DDS 1 drive won't happen. (It'll probably just eject.) so you're not really giving us much to go on from the hardware side.
From the software side, tapes are initialised with their name, the density, etc, before use though this generally happens the first time you write it. Using a "used" tape can have problems due to head alignment issues if it was initialised in a different drive.
I have had a look again today and the tapes are Quantum Travan 20's for use in travan 20 drives. The drive is a seagate STT220000A.
I ran the following command;
sudo tar -tzf /dec/st0 and got;
gzip; stdin; not in gzip format.
gzip; stdin; unexpected end of file
tar; child died with signal 13
tar; error is not recoverable exiting now.
So to test the drive I got a new tape and ran;
tar -czf /dev/st0 /www /home
it seemed to back up fine, then I ran;
tar -tzf /dev/st0
and got a HUGE list of files!
So I'm thinking the backup system must use a different format.
Also the tapes from this backup system are numbered as I ran; sudo ls -l /dev/st0 and the tape number was shown, but no files. It now says tape 9 no matter what tape is in.
You can not list the contents of the tape by using the ls command. /dev/st0 is the device ID the operating system uses to identify and communicate with the drive but has nothing to do with the physical tape. linux uses what is known as major minor numbers to identify devices with 9,0 being st0. tape is the group the drive is assigned to.
A tape drive is a character device versus a block device like a hard drive. Data is written and read sequentially. Tapes these days are typically "low level" formatted by the manufacture and so it isn't required by the end user. However, the user should retension the tape since it stretches with normal use.
There are many ways to write data to tape. So what problems is your pal actually having.
Hi,
Thanks for your response, I wonder then if the tape is simply labled. The software he uses is a stock control system which
has a backup program which backs up to the tapes. When he puts a brand new tape in it won't backup and he has to ring the
software company and they dial in and charge him to label/format or make usable the tape. Hence why I thought they needed formating.
I get what you mean as a character drive, Just like cassette tale you have to play the whole tape get a read out.
So how else could I read the contents of a tape?
Thanks.
Last edited by atomiccomp; 08-10-2015 at 04:24 PM.
The software he uses is a stock control system which has a backup program which backs up to the tapes.
Means nothing to the common folk...
Since your test worked with a new tape it must be something specific with the control system software. Has your pal asked the company how to label the tape or whatever they do himself?
You can dump a block of data using the dd command i.e.
dd if=/dev/st0 of=/tmp/test.dat bs=1M
By using a hex editor you can examine the file and maybe get an idea of what backup program is used.
bacula uses a tape label and is a possibility. Except for dumping and analyzing data from tape there isn't much we can do until we know more information about the system. The backup routine could be a standard linux utility or built into the control system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.