Closed vguilleaume closed 7 months ago
Compression setting on tape drive is not important especially LTO and IBM enterprise tape drive. It means weakness of data on tape is not changed by compression setting because of internal data structure on tape. So we never recommend that user uses LTFS with compression off.
To enable compression, you can use space which is generated by compressed data as a buffer. So I strongly recommend that compression on is used all time.
You can confirm this option really disable compression by writing a 0-fill large file. Because 0-fill data is maximumly compressed (may be 20:1?). On a compression on tape, used capacity is not so increased. But on a no-comprerssion on tape, it is increased almost same as file size.
thanks @piste-jp-ibm for this update and advice. I understand your idea about compression - non compression. I'm personally used to let it activated as you mentioned.
My question is related to a very special case, where we do have a request for data stored to LTFS tape without compression. I'm looking for all available options where we can provide evidence that no compression is active when writing to the tapes.
I don't believe that the customer will be fine with the option about the 0-fill large file. He has strong requirement about how data are stored on the tape itself (LTFS format) and also about the compression that has to be disable
I'm evaluating the option to disable the compression on the tape drive itself, based on your knowledge is this redundant or complementary with the ltfs -c
option
My question is related to a very special case, where we do have a request for data stored to LTFS tape without compression. I'm looking for all available options where we can provide evidence that no compression is active when writing to the tapes.
I'm not sure how much you know about compression of tape/tape drive. But actually, tape drive has a H/W on-the-fly compression circuit in it and compression is done without any cost. The switch is in the drive itself and user need to specify the compression setting before writing data by MODE_SELECT command, 'compression ON' is default.
I'm not sure what you want to do from the description above, but if you want to switch the compression setting by 'file', it is a terrible idea for LTFS. Because we have a chance to write 2 files (or more) at a same time. If one stream 'file' shall be compressed and the other shall not be compressed, LTFS might switch compression setting frequently and it might cause dramatic performance degradation.
At this time, compression setting can be specified only at format time. The setting is stored into the LTFS label. When LTFS mount a tape, it reads the LTFS labels and make compression setting.
I don't believe that the customer will be fine with the option about the 0-fill large file. He has strong requirement about how data are stored on the tape itself (LTFS format) and also about the compression that has to be disable I'm evaluating the option to disable the compression on the tape drive itself, based on your knowledge is this redundant or complementary with the ltfs -c option
I'm not sure again what you want to do. Need to write a highly compressible data if you want to check the code and drive work well.
If you just want to indicate the current compression setting that LTFS detected, I think you can use ltfs.volumeCompression
VEA described into https://www.ibm.com/docs/en/spectrum-archive-sde/2.4.5?topic=attributes-virtual-extended.
The code is below. You might be able to get true
or false
.
Thanks for this comprehensive update,
From your detailed explanation, i made several tests today, in working on the drive itself.
I executed a mt
command to get the tape drive off.
Basically:
mt -f /dev/nstx compression 0
and
mt -f /dev/nstx defcompression 0
When doing this i can verify if the tape compression is enable or not (in mounting a tape in the drive:
# tapeinfo -f /dev/stx
Product Type: Tape Drive
Vendor ID: 'IBM '
Product ID: 'ULT3580-HH5 '
Revision: 'F991'
Attached Changer API: No
SerialNumber: '90WT013124'
MinBlock: 1
MaxBlock: 8388608
SCSI ID: 0
SCSI LUN: 0
Ready: yes
BufferedMode: yes
Medium Type: 0x58
Density Code: 0x58
BlockSize: 0
DataCompEnabled: no
DataCompCapable: yes
DataDeCompEnabled: yes
CompType: 0x1
DeCompType: 0x1
BOP: yes
Block Position: 0
Partition 0 Remaining Kbytes: -1
Partition 0 Size in Kbytes: -1
ActivePartition: 0
EarlyWarningSize: 0
NumPartitions: 1
MaxPartitions: 1
Partition0: 38
Partition1: 1444
I experimented some strange behavior:
def compression
mode to off is possible when the drive is empty. compression
mode to off is not possible when the drive is empty.tapeinfo
verification requires to have a tape mounted, and then we can see DataCompEnabled: no
. And last but not least, the most important: after the LTFS mounted or even after i did the LTFS tape format, i have can see that the DataCompEnabled
setting went back to on, meaning that the compression is enable again.
I wrote data on the tape, i can see that compression is still also active (i retrieved the real capacity stored through log sense and the compression ratio too).
With your experience on tape drive, compression, and LTFS, could we imagine that the compression is back on due to LTFS usage?
And then, can I go to the conclusion that we have to use the mt
command to the compression at off and then format the tape with mkltfs -c
in specifying the compression as off too ?
Thanks again for your support and experience in this area
As I said in my previous comment. Compression setting of LTFS formatted tape is written on the tape as a part of the LTFS label. The LTFS label is read in the middle of mount process and LTFS set the compression setting.
Another implicit rule is tape application never restore drive setting at start time at all. In other words, LTFS never revert the compression setting to off
at unmount even if it is set before mount process.
So your description below is quite natural to me.
And last but not least, the most important: after the LTFS mounted or even after i did the LTFS tape format, i have can see that the DataCompEnabled setting went back to on, meaning that the compression is enable again.
And then, can I go to the conclusion that we have to use the mt command to the compression at off and then format the tape with mkltfs -c in specifying the compression as off too ?
No, just issue mkltfs -c
. Previous compression setting is not related at all. mkltfs
shall set the compression off
and write the compression-off setting LTFS label on tapeat format. And ltfs
shall read the compression-off setting LTFS label and set teh drive compression off
.
Thanks for this update, you confirm what i had in mind.
We will then proceed with mkltfs -c
to disable the compression, we will include this into all LTFS format commands .
And we can conclude that we will not rely on the mt
commands anymore.
Closing because there is no update for long time.
Dear community,
I would like to get your support to validate my understanding about the command
mkltfs -c
.My objective is to make sure that the tape compression is not enable, then the tape content will not be compress. I do know that they are some options to do it, and going into OpenLTFS, i have seen this option, but never use it.
All the LTFS format task i did never include this option.
Could you help me to confirm that this option disable well the tape compression as i understand it ?
The situation as i have doubt about the effect of this option. Here is standard command i use to format a tape. I 'd like to understand if there is something - somewhere an indication about if the compression is set or not.
Thanks Valery