[LU-14135] lfs df --pool incorrectly iterates over every FS when no path is provided Created: 12/Nov/20  Updated: 12/Nov/20

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Upstream
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Quentin Bouget Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Having several Lustre filesystems mounted on the same node will result in lfs df --pool ... misbehaving and reporting either the same information multiple times (if the same FS is mounted multiple times), or printing error messages.

$ lfs getname
fs0-abcdefabcdefabcd /mnt/fs0
fs1-abcdefabcdefabcd /mnt/fs1
$ lfs pool_list /mnt/fs0
Pools from fs0:
fs0.pool0
$ lfs df --pool fs0.pool0
<normal output>
filesystem name incorrect

Looking at the implementation of lfs df in lustre/utils/lfs.c I think what is happening is pretty straightforward: since no path is provided, lfs df assumes it should iterate on all available Lustre FS, diregarding the fact that the poolname provided on the command line points at a specific FS.

Note that the behaviour of iterating on all the filesystems returned by llapi_search_mounts() is not entirely correct anyway, as multiple bind mounts are reported as separate filesystems (which makes the output confusing).

Iterating on the FS names would be better.


Generated at Sat Feb 10 03:07:08 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.