IBM Support

IBM Spectrum Scale: The intended shrinkage ("shrink-to-fit") of the pre-allocated last data block of a file may be skipped, causing increased space usage.

News


Abstract

IBM has identified a problem in IBM Spectrum Scale V5.0.0.0 (ESS 5.3.0.0 or ESS 6.0.0.0) through 5.1.1.0 (ESS 6.1.1.0), in which the intended shrinkage ("shrink-to-fit") of the pre-allocated last data block of a file (for which only part of the full block is written) may be skipped, which will cause unexpected disk space usage in the file system.

Content

Problem and Cause:
With the semantics of disk space pre-allocation for files in Spectrum Scale(for example, through gpfs_prealloc API or fallocate(2) on Linux), all pre-allocated data blocks will be initially full file system blocks, even when a smaller fragment block for the last data block is large enough to accommodate the data according to the file size. Later, after some data has been written to the last data block and the last file close is being done, the file should be shrunk to a smaller fragment block where appropriate. However, if the last close on the file is done immediately after writing the data to the last data block, this intended shrinkage ("shrink-to-fit") may be skipped.
If many such files are missing the intended shrinkage on their pre-allocated last data blocks, the disk space usage in the file system may be significantly increased (eg, the Spectrum Protect Plus Copy Restore doing pre-allocation would result in increased block usage compared to the expected usage).
Users Affected:
This issue may affect customers doing pre-allocation for their files on Spectrum Scale V5.0.0.0 (ESS 5.3.0.0 or ESS 6.0.0.0) through 5.1.1.0 (ESS 6.1.1.0), under the stated conditions above.
Diagnosing the problem:
Only users doing disk space pre-allocation for their files could be affected, and need to determine whether they have experienced this problem.  Use the system provided commands (e.g., du or stat) to check the disk space usage for a file after writing the data to its last data block, then compare with the expected disk space for the file. The expected disk space for such file is as many subblocks (The mmlsfs command can be used to get the subblock size for the given file system) that can accommodate all the data of the file. Note that if your files are sparse, you need to exclude the holes when computing the real necessary disk space according to the file size, given that sparse files consume less space than regular non-sparse files with the same size.
Resolving the problem:
1. Users running IBM Spectrum Scale V5.0.0.0 (ESS 5.3.0.0 or ESS 6.0.0.0) through V5.0.5.7 (ESS 5.3.7.1 or ESS 6.0.2.1), should apply IBM Spectrum Scale V5.0.5.8 or later,  available from Fix Central at:
2. Users running IBM Spectrum Scale V5.1.0.0 (ESS 6.1.0.0) through V5.1.1.0 (ESS 6.1.1.0), should apply IBM Spectrum Scale V5.1.1.1 or later, available from Fix Central at:
3. If you cannot apply one of the above PTF levels, contact IBM Service to obtain and apply an efix for your level of code:

      -  For IBM Spectrum Scale V5.0.0.0 thru V5.0.5.7, reference APAR  IJ32581
      -  For IBM Spectrum Scale V5.1.0.0 thru V5.1.1.0, reference APAR  IJ32627

A subsequent update will be notified when the IBM ESS fix version gets GA'ed.

[{"Type":"SW","Line of Business":{"code":"LOB26","label":"Storage"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"STXKQY","label":"IBM Spectrum Scale"},"ARM Category":[{"code":"a8m50000000KzgwAAC","label":"File System"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"5.0.0;5.1.0;5.1.1"}]

Document Information

Modified date:
24 June 2021

UID

ibm16449624