Operating System - Linux
1828485 Members
3851 Online
109978 Solutions
New Discussion

Re: How to enable compression on DAT under Linux ?

 
David Abbott
Occasional Contributor

How to enable compression on DAT under Linux ?

I've searched a fair bit but can't seem to find an answer -

How can I enable hardware compression on a 20/40GB DAT internal tape drive on a Compaq Proliant ML350 G3 running RH Linux 8.0 ? Linux says it's a Sony 10000 drive, /dev/st0 operates fine but mt compression/defcompression/density refuses to shift it from standard 20 GByte capacity on DDS-4 tape.

Thanks.
6 REPLIES 6
Stuart Browne
Honored Contributor

Re: How to enable compression on DAT under Linux ?

Umm, you'll find that that series of drives, the compression is usually ON.

What does the following command return:

mt -f /dev/nst0 compression

How much normal data can you put on the tape?

Do you have 20+GB of data to test with?

If not, just use the nst0 device, and put the same known-data-set on, over and over and see where it stops.

If you're not putting already-compressed files on, you should get more than 20GB easily. If they are already compressed, then you'll only get a bit over 20GB (if at all).

DAT40i's we use generally only get 25-30GB onto a tape.

The SDT10000 (which are very good drives) do about the same.

If you are not getting more than 20GB, ever, you might want to tear it out, and double check that the compression is enabled (physically) on the device.

It's a jumpered setting from memory.

If you want more compression, try using a user-space compression (bzip2) to compress the stream before putting it to the tape. If you are using something like 'tar' (-j flag) or 'cpio' (don't use -O, and pipe it), then you can do it easily.

Most other commercial tools allow you to use software-compression also.
One long-haired git at your service...
David Abbott
Occasional Contributor

Re: How to enable compression on DAT under Linux ?

I guess it's time to take out the drive + look at the settings, although as it's a pre-delivered internal drive I'd read that the default was harware-enabled.

I'm definitely not getting more than 20GB - am doing uncompressed dumps which gives "end of tape detected" reliably at the ~20 GB mark.

mt compression doesn't report anything, although I've used a tool called scu and it reports 20 GB capacity.

using mt defcompression or compression with >0 args doesn't appear to do anything either.
Albert Keizer
Occasional Advisor

Re: How to enable compression on DAT under Linux ?

To set compression with mt use:

mt -f datcompression on

It might be that your tapedrive can be accessed in a certain mode by using a device file with another minor number. (See /usr/src/linux/Documentation/devices.txt

Good luck,
Albert
Tim Clarke
Advisor

Re: How to enable compression on DAT under Linux ?

I've been (ignorantly!) looking at this for a while too on a Dell 2500SC with DDS4 under RH7.3.
Albert's "mt -f /dev/st0 datcompression on" gives an unknown command "datcompress" - i.e. not supported by my mt binary. The "compression" argument returns nothing just like David's.
Many "setdensity" experiments later I'm still getting "density code 0x25 (DDS-3)" from "mt status".
No minor numbered devices available in /dev or from devices.txt.
I've ended up running tar with -z but I can't span tapes like that and my Oracle database on there will only keep growing...!
I'll rip the lid off sometime and compare jumpers with another 2500SC that's running NW6.1 that I think is getting compressed.
More thoughts, anyone?
Albert Keizer
Occasional Advisor

Re: How to enable compression on DAT under Linux ?

Sorry, but I'm using the GNU version of mt.

If the other device files are not available in /dev you can make them with mknod.

the devices.txt file where I was referring to contains:

9 char SCSI tape devices
0 = /dev/st0 First SCSI tape, mode 0
1 = /dev/st1 Second SCSI tape, mode 0
...
32 = /dev/st0l First SCSI tape, mode 1
33 = /dev/st1l Second SCSI tape, mode 1
...
64 = /dev/st0m First SCSI tape, mode 2
65 = /dev/st1m Second SCSI tape, mode 2
...
96 = /dev/st0a First SCSI tape, mode 3
97 = /dev/st1a Second SCSI tape, mode 3
...
128 = /dev/nst0 First SCSI tape, mode 0, no rewind
129 = /dev/nst1 Second SCSI tape, mode 0, no rewind
...
160 = /dev/nst0l First SCSI tape, mode 1, no rewind
161 = /dev/nst1l Second SCSI tape, mode 1, no rewind
...
192 = /dev/nst0m First SCSI tape, mode 2, no rewind
193 = /dev/nst1m Second SCSI tape, mode 2, no rewind
...
224 = /dev/nst0a First SCSI tape, mode 3, no rewind
225 = /dev/nst1a Second SCSI tape, mode 3, no rewind
...

you can see the major,minor number by ls -l

There is also a tool available (stinit) which initializes the tapedrive with the required settings.

Albert
Albert Keizer
Occasional Advisor

Re: How to enable compression on DAT under Linux ?

Or look in this document for jumper settings:

http://allaw.com.au/Docs/UnixAIT.pdf