Click to See Complete Forum and Search --> : DAT tape drive & compression
I recently acquired a 12/24 DAT tape drive for my linux box and am able to backup my native filesystem in 12gb, but I'd like to use compression to back up some remote file shares to tape that are bigger than 12gb. The problem is i can't figure out how to ensure compression is turned on.
Anyone able to explain how to do such a thing with mt, or a good tutorial? The device is /dev/st0, but it looks like i have to use density codes and its not just an on/off flag....?
Thanks!!
techwise
11-30-2004, 10:32 PM
are asking I believe is regarding the drives ability to implement "hardware" compression. The flags for the use of this are dependent on the specific model of drive you are using. You will need to find the manual or google for info on that particular drive.
If you cant find what you need you could just use software compression (bzip, gzip. . .) before the data goes to the device.
It in fact may be prudent for you to implement software compression instead of hardware which may save you from having to acquire the identical hardware device in the case of a hardware failure. With software compression you will be able to use any DDS3 drive to recover your data. Decompression would not be dependant on the chip in the drive.
Regards
Mike
P.S. One of my favorite O'Reilly books is "Unix Backup and Recovery" by Curtis Preston. It is a fantastic book both technically and theoretically.
Yes, hardware compression was my intent. I actually found that if I do
mt -f /dev/st0 status
it shows DDS-3 for the density code.
mt -f /dev/st0 densities
lists the density codes for all the types, and does not list both a compressed AND uncompressed density code for DDS-3. I'm assuming that means compression is turned on......?
Using software compression, would I be able to calculate total space after compression needed to write to the tape? I'm just thinking, with hardware compression i'd get at least 18gb usable (figuring 1.5:1 compression, i think)
ps - i might have to add your suggested reading to my bookshelf as it will also come in handy with our 3 different *nix flavors and therefore 3 different backup styles at work
techwise
12-01-2004, 12:18 AM
run this command
mt -f /dev/st0 datcompression
and see what you get.
I get this:
Compression on.
Compression capable.
Decompression capable.
My drive is a Sony SDT9000. I believe that to turn compression off on mine, I may have to change a jumper on the drive itself.
Regarding the other issue of knowing the size of the software compressed archive, tar has the -L option which can prompt for a tape change after a certian size has been achieved. Now, I assume (never tried) that when passing the z or j options to tar will cause tar to then base your desired -L factor on the compressed data.
Get the book, and have your boss pay for it.
Mike
What distro are you using? I've recently upgraded for FC3 and it looks like my version of mt doesnt support the 'datcompression' command
techwise
12-01-2004, 10:22 AM
runnung debian unstable on that box and it reports GNU mt version 2.5
Also, for the datcompression to return a result, I believe you need to have a tape in the drive. Do you have one in?
Mike
techwise
12-01-2004, 11:48 AM
that RH uses a variant of mt called mt-st. It has different syntax so just read up on the man page.
Or you could install GNU mt and just use that.
Mike
I'll read up on the man pages for mt-st. THanks