[LU-16386] Handle mkfs.lustre --version correctly Created: 12/Dec/22  Updated: 03/Jan/23  Resolved: 03/Jan/23

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0

Type: Bug Priority: Minor
Reporter: Arshad Hussain Assignee: Arshad Hussain
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Running mkfs.lustre with --version or -V argument fails instead of printing the version.

Output:

 

$ ./lustre/utils/mkfs.lustre --version
usage: mkfs.lustre <target type> [--backfstype=ldiskfs] --fsname=<filesystem name>
    --index=<target index> [options] <device>
    <device>:block device or file (e.g /dev/sda or /tmp/ost1)
    target types:
        --mgs: configuration management service
        --nomgs: turn off MGS service on this MDT
        --mdt: metadata storage, mutually exclusive with ost
        --ost: object storage, mutually exclusive with mdt, mgs
    options (in order of popularity):
        --index=#N: numerical target index (0..N)
            required for all targets other than the MGS,
            target index may either be a decimal number or
            hexadecimal number starting with '0x'
        --fsname=<8_char_filesystem_name>: fs targets belong to
            required for all targets other than MGS
        --mgsnode=<nid>[,<...>]: NID(s) of remote MGS
            required for all targets other than MGS
        --mountfsoptions=<opts>: permanent Lustre mount options
        --backfs-mount-opts=<opts>: backing fs mount options
        --failnode=<nid>[,<...>]: NID(s) of backup failover node
            mutually exclusive with --servicenode
        --servicenode=<nid>[,<...>]: NID(s) of service partners
            treat nodes as equal service node, mutually exclusive with --failnode
        --param <key>=<value>: set a permanent parameter
            e.g. --param sys.timeout=40
                 --param lov.stripesize=2M
        --network=<net>[,<...>]: restrict OST/MDT to network(s)
        --backfstype=<fstype>: backing fs type (ldiskfs, zfs)
        --device-size=#N(KB): device size for loop devices
        --mkfsoptions=<opts>: format options
        --reformat: overwrite an existing disk
        --replace: replace an old target with the same index
        --stripe-count-hint=#N: for optimizing MDT inode size
        --comment=<user comment>: arbitrary string (824 bytes)
        --dryrun: report what we would do; don't write to disk
        --verbose: e.g. show mkfs progress
        --force-nohostid: Ignore hostid requirement for ZFS import
        -V|--version: output build version of the utility and
            exit
        --quiet

 

 

Expected output:

 

$ ./lustre/utils/mkfs.lustre --version
mkfs.lustre <version>

 



 Comments   
Comment by Gerrit Updater [ 12/Dec/22 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49379
Subject: LU-16386 mkfs: Handle --version argument correctly
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: fd8e0874c86380b9af753f99451fb431dd848571

Comment by Gerrit Updater [ 13/Dec/22 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49384
Subject: LU-16386 utils: Improve mkfs.lustre.8 man page
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 3e947b1473ca697f79de246ab484967aeb170f0a

Comment by Gerrit Updater [ 20/Dec/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49379/
Subject: LU-16386 mkfs: Handle --version argument correctly
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 73ee4e7fe31f31fae6b823086f706869b50adec6

Comment by Gerrit Updater [ 03/Jan/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49384/
Subject: LU-16386 utils: Improve mkfs.lustre.8 man page
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 45fceb6dee7ff1ebd072a3406f3e728b16ee9f2f

Comment by Peter Jones [ 03/Jan/23 ]

Landed for 2.16

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