Free space of filesystem "/usr" returning incorrect size/number

Hi,

I’m using this in some analysis:

free space of filesystem "/usr"

This is returning ‘2108022784’

However when checking on the command line:

# df -B1 /usr
Filesystem                 1B-blocks       Used  Available Use% Mounted on
/dev/mapper/system-usrlv 10418221056 8310198272 1586593792  84% /usr

When testing in QNA it also shows ‘2108022784’

# /opt/BESClient/bin/qna
Default masthead location, using /etc/opt/BESClient/actionsite.afxm
Q: free space of filesystem "/usr"
A: 2108022784
T: 4076

This is on SLES15(.5) using BESAgent-11.0.3.82-sle12.x86_64

Have you tried to plugin the relevance into a property and if so, is that showing accurate? What I am thinking is the context - you are running the qna tool under specific user but does that user has full rights to /usr to read its data accurately…? If ran as the agent which is root, then maybe that problem is not there…

If you have and it’s a problem with root too then open a support case cause this would look like a bug to me…

Thanks for the reply.

Both Agent and QNA running as root.
Also tested with qna as non root, but there are no strict permissions that would impact the output.

Just checking, do you have quotas configured, and so they apply to root?

Hi Jason, we are not using quotas

Ok, I’m out of ideas then. Please go ahead and open a Support ticket so the team can determine whether it’s a bug and look into a fix

I am following this up (very late, but for Google/forum search reasons).

I raised a ticket with support and they have advised that this is a feature, not a bug.

It seems to be specifically on EXT4 filesystems, (I didn’t bother to check ext2/ext3 though). xfs was fine.

The fix advised from support was to create a custom workaround.

It does not matter if there is reserved space with m0 or m50 (50% reserved space for root), it will still show the same output, which is not the same as df.

[root@server ~]# tune2fs -m50 /dev/mapper/lvgtest-lvext4
tune2fs 1.45.6 (20-Mar-2020)
Setting reserved blocks percentage to 50% (655360 blocks)
[root@server ~]# df -B1 /mnt/ext4 /mnt/ext4_m0
Filesystem                     1B-blocks  Used  Available Use% Mounted on
/dev/mapper/lvgtest-lvext4    5196382208 24576 2495225856   1% /mnt/ext4
/dev/mapper/lvgtest-lvext4_m0 5196382208 24576 5179580416   1% /mnt/ext4_m0
[root@server ~]# /opt/BESClient/bin/qna
Default masthead location, using /etc/opt/BESClient/actionsite.afxm
Q: free space of filesystem "/mnt/ext4"
A: 5196357632
T: 4049

Q: free space of filesystem "/mnt/ext4_m0"
A: 5196357632
T: 1261

Q:

:slight_smile: