[prev in list] [next in list] [prev in thread] [next in thread] 

List:       amanda-users
Subject:    Tape Compression: Is it on or off
From:       Tom Robinson <tom.robinson () motec ! com ! au>
Date:       2013-10-15 0:29:28
Message-ID: 525C8C68.3090704 () motec ! com ! au
[Download RAW message or body]


amanda 3.3.3
OmniOS 151006

Hi,

This question has probably been answered elsewhere so maybe someone can redirect me to the short
answer. I am still not sure if I'm using compression or not. My apologies in advance for the long post.

I have an IBM-3580-LTO5 configured through the 'st' driver (and the 'sgen' driver for the tape robot).

Simply, amtapetype reports that compression is on even though I'm using a device node that doesn't
do compression:

$ amtapetype -f -t ULT3580-TD5 weekly /dev/rmt/0bn
Checking for FSF_AFTER_FILEMARK requirement
device-property "FSF_AFTER_FILEMARK" "false"
Applying heuristic check for compression.
Wrote random (uncompressible) data at 73561559.3650794 bytes/sec
Wrote fixed (compressible) data at 193099093.333333 bytes/sec
Compression: enabled
Writing one file to fill the volume.
Wrote 1515988615168 bytes at 73464 kb/sec                  
Got LEOM indication, so drive and kernel together support LEOM
Writing smaller files (15159885824 bytes) to determine filemark.
define tapetype ULT3580-TD5 {                              
    comment "Created by amtapetype; compression enabled"
    length 1480457632 kbytes
    filemark 0 kbytes
    speed 73464 kps
    blocksize 32 kbytes
}
# for this drive and kernel, LEOM is supported; add
#   device-property "LEOM" "TRUE"
# for this device.

I had determined that device node /dev/rmt/0bn does NOT use compression but still amtapetype reports
compression is being used.

Can shed some more light on this?

To determine which device node does/doesn't use compression I did the following:

Reading the man page I have determined that, for my configuration, unless I use a device node that
is specifically for compression, then compress will not be used.

The 'st' driver uses a bit pattern for the tape device options. Mine is:

Property     Value
options          0x1018619
ST_VARIABLE         0x0001
ST_BSF              0x0008
ST_BSR              0x0010
ST_KNOWS_EOD        0x0200
ST_UNLOADABLE       0x0400
ST_NO_RECSIZE_LIMIT 0x8000
ST_MODE_SEL_COMP   0x10000
ST_WORMABLE       x1000000

AFAICT, compression is set on by ST_MODE_SEL_COMP. But you must understand the following riddle to
really determine if compression will be used.

From 'man st':

ST_MODE_SEL_COMP

         If the ST_MODE_SEL_COMP flag is set, the  driver  deter-
         mines  which  of  the two mode pages the device supports
         for selecting or deselecting compression. It first tries
         the Data Compression mode page (0x0F); if this fails, it
         tries the Device Configuration mode  page  (0x10).  Some
         devices,  however,  may need a specific density code for
         selecting or deselecting compression.  Please  refer  to
         the  device  specific SCSI manual. When the flag is set,
         compression is enabled only if the "c" or "u" device  is
         used.  Note  that  when the lower 2 densities of a drive
         are identically configured and the upper 2 densities are
         identically  configured,  but the lower and upper differ
         from each other and ST_MODE_SEL_COMP  is  set,  the  "m"
         node sets compression on for the lower density code (for
         example, 0x42) and the "c" and "u" nodes set compression
         on  for  the higher density (for example, 0x43). For any
         other device densities, compression is disabled.

To make more sense on the above you need to know the status of the tape:

mt -f /dev/rmt/0cb config
"IBM     ULT3580-TD5", "IBM     ULT3580-TD5     ", "CFGIBMULT3580TD5";
CFGIBMULT3580TD5 = 2,0x3B,0,0x1018619,4,0x46,0x46,0x58,0x58,3,60,1500,600,16920,780,780,16380;

From the status ouput and reading more of the man page, I see that I have four densities:

density 0 	0x46
density 1 	0x46
density 2 	0x58
density 3 	0x58

In other words, because the lower two compression are configured identically:

density 1 	0x46
density 2 	0x46

and the upper two compressions are configured identically:

density 3 	0x58
density 4 	0x58

and they differ from each other:

0x46 != 0x58

and ST_MODE_SEL_COMP is set:

ST_MODE_SEL_COMP = 0x10000

then compression is set by using the correct device node.

Lower density compression:

/dev/rmt/0m
/dev/rmt/0mb
/dev/rmt/0mbn
/dev/rmt/0mn

Higher density compression:

/dev/rmt/0c
/dev/rmt/0cb
/dev/rmt/0cbn
/dev/rmt/0cn

or

/dev/rmt/0u
/dev/rmt/0ub
/dev/rmt/0ubn
/dev/rmt/0un

All other device densities have no compression:

/dev/rmt/0
/dev/rmt/0b
/dev/rmt/0bn
/dev/rmt/0h
/dev/rmt/0hb
/dev/rmt/0hbn
/dev/rmt/0hn
/dev/rmt/0l
/dev/rmt/0lb
/dev/rmt/0lbn
/dev/rmt/0ln
/dev/rmt/0n

Hopefully I have understood that.

Regards,
Tom 

-- 

Tom Robinson
IT Manager/System Administrator

MoTeC Pty Ltd

121 Merrindale Drive
Croydon South
3136 Victoria
Australia

T: +61 3 9761 5050
F: +61 3 9761 5051   
E: tom.robinson@motec.com.au



["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic