[LU-6818] quiet permanently deactivated OSTs in "lfs df" Created: 08/Jul/15  Updated: 01/Dec/17  Resolved: 16/Sep/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0, Lustre 2.5.3, Lustre 2.8.0
Fix Version/s: Lustre 2.10.0

Type: Improvement Priority: Minor
Reporter: Andreas Dilger Assignee: WC Triage
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates LU-8920 don't print permanently deactivated O... Resolved
Related
is related to LU-7668 permanently remove deactivated OSTs f... Resolved
Rank (Obsolete): 9223372036854775807

 Description   

The lfs df output reports inactive OSTs:

lfs df
UUID                   1K-blocks        Used   Available Use% Mounted on
myth-MDT0000_UUID        9174328      629228     8020812   7% /myth[MDT:0]
myth-OST0000_UUID     3880285544  3431022920   255223648  93% /myth[OST:0]
myth-OST0001_UUID     3886052008  2209970436  1481768956  60% /myth[OST:1]
myth-OST0002_UUID     3880285544  3554012112   209851112  94% /myth[OST:2]
OST0003             : inactive device
myth-OST0004_UUID     3880285544  3688294444   191991100  95% /myth[OST:4]

filesystem summary:  15526908640 12883299912  2138834816  86% /myth

However, if the OST is permanently disabled vs. just temporarily deactivated, it would be better not to list them at all as this has been reported several times as annoying to users.

One option is to return a different error code for OSTs that have been permanently deactivated vs. ones temporarily deactivated via "lctl --device X deactivate". I see in lov_iocontrol()::IOC_OBD_STATFS that devices that have never been configured (lov->lov_tgts[index] == NULL) return -EAGAIN and that skips all output, vs. inactive devices (lov->lov_tgts[index]->ltd_active == 0) return -ENODATA.



 Comments   
Comment by Andreas Dilger [ 16/Sep/17 ]

This was fixed via LU-8920 for the 2.10 release.

LU-8920 utils: don't print deactivated OSTs in "lfs df"
    
    Don't print deactivated OSTs or MDTs in "lfs df".  If they have
    been deactivated then the sysadmin knows they are inactive so
    there isn't much benefit to printing them all the time.  Only
    print deactivated OSTs/MDTs if the new "-v" option is given.
    
    Add long options for "-i" and "-h" (--inodes and --human-readable,
    respectively) and sort the lfs_df() options to be alphabetical by
    short option letter.
    
    Move the "lfs df" manual to a separate "lfs-df.1" man page to
    allow better description of the options and examples.
    
    Add a "flags" argument to showdf() and mntdf() instead of adding
    an every-growing list of boolean arguments to these functions.

Reviewed-on: https://review.whamcloud.com/24228
Generated at Sat Feb 10 02:03:30 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.