[gpfsug-discuss] du --apparent-size and quota
Kumaran Rajaram
krajaram at geocomputing.net
Tue Jun 1 17:08:51 BST 2021
Hi,
>> If I'm not mistaken even with SS5 created filesystems, 1 MiB FS block size implies 32 kiB sub blocks (32 sub-blocks).
Just to add: The /srcfilesys seemed to have been created with GPFS version 4.x which supports only 32 sub-blocks per block.
-T /srcfilesys Default mount point
-V 16.00 (4.2.2.0) Current file system version
14.10 (4.1.0.4) Original file system version
--create-time Tue Feb 3 11:46:10 2015 File system creation time
-B 1048576 Block size
-f 32768 Minimum fragment (subblock) size in bytes
--subblocks-per-full-block 32 Number of subblocks per full block
The /dstfilesys was created with GPFS version 5.x which support greater than 32 subblocks per block. /dstfilesys does have 512 subblocks-per-full-block with 8KiB subblock size since file-system blocksize is 4MiB.
-T /dstfilesys Default mount point
-V 23.00 (5.0.5.0) File system version
--create-time Tue May 11 16:51:27 2021 File system creation time
-B 4194304 Block size
-f 8192 Minimum fragment (subblock) size in bytes
--subblocks-per-full-block 512 Number of subblocks per full block
Hope this helps,
-Kums
-----Original Message-----
From: gpfsug-discuss-bounces at spectrumscale.org <gpfsug-discuss-bounces at spectrumscale.org> On Behalf Of Loic Tortay
Sent: Tuesday, June 1, 2021 10:57 AM
To: gpfsug main discussion list <gpfsug-discuss at spectrumscale.org>; Ulrich Sibiller <u.sibiller at science-computing.de>; gpfsug-discuss at gpfsug.org
Subject: Re: [gpfsug-discuss] du --apparent-size and quota
On 6/1/21 4:26 PM, Ulrich Sibiller wrote:
[...]
> )
>
> While trying to understand what's going on here I found this on the
> source file system (which is valid for all files, with different
> number of course):
>
> $ du --block-size 1 /srcfilesys/fileset/filename
> 65536 /srcfilesys/fileset/filename
>
> $ du --apparent-size --block-size 1 /srcfilesys/fileset/filename
> 3994 /srcfilesys/fileset/filename
>
> $ stat /srcfilesys/fileset/filename
> File: ‘/srcfilesys/fileset/filename’
> Size: 3994 Blocks: 128 IO Block: 1048576 regular
> file
> Device: 2ah/42d Inode: 23266095 Links: 1
> Access: (0660/-rw-rw----) Uid: (73018/ cpunnoo) Gid: (50070/
> dc-rti)
> Context: system_u:object_r:unlabeled_t:s0
> Access: 2021-05-12 20:10:13.814459305 +0200
> Modify: 2020-07-16 11:08:41.631006000 +0200
> Change: 2020-07-16 11:08:41.630896177 +0200
> Birth: -
>
Hello,
This looks like the sub-block overhead.
If I'm not mistaken even with SS5 created filesystems, 1 MiB FS block size implies 32 kiB sub blocks (32 sub-blocks).
The sub-block is the minimum disk allocation for files (if the file content is too large to be kept in the inode, when that is supported on the specific GPFS filesystem).
The "Blocks" value displayed by "stat" is in 512 bytes unit, so 128*512 = 65536 (which is consistent with "du"): two 32 kiB sub-blocks due to data replication.
The "--apparent-size" option to "du" uses the user visible size not the actual disk usage (per the man page), so 3994 is also consistent w/ "stat" output.
AFAIK, GPFS space quotas count the sub-blocks not the apparent sizes, so again this would be consistent with the overhead.
Beside the overhead, hard-links in the source FS (which, if I'm not mistaken, are not handled by "rsync" unless you specify "-H") and in some cases spare files can also explain the differences.
Loïc.
--
| Loïc Tortay <tortay at cc.in2p3.fr> - IN2P3 Computing Centre |
_______________________________________________
gpfsug-discuss mailing list
gpfsug-discuss at spectrumscale.org
http://gpfsug.org/mailman/listinfo/gpfsug-discuss
More information about the gpfsug-discuss
mailing list