From: Andreas Dilger Date: Wed, 25 Jul 2018 07:15:40 +0000 (-0600) Subject: LU-11040 utils: improve mount usage/man page X-Git-Tag: 2.11.55~52 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a1fed6b26809bd87836ece8f3e93ead80863b095;p=fs%2Flustre-release.git LU-11040 utils: improve mount usage/man page Improve the description of the mount.lustre.8 man page and usage: - provide separate SYNOPSYS for client and server mount commands - move "acl" option out of general options into server-only options, since client option was removed and ACLs are only controlled by MDS - correct "CLIENT OPTIONS" section to be named "SERVER OPTIONS" - add checksum, lruresize, lazystatfs, 32bitapi, user_fid2path usage - mark the default values of the options in the usage message Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: I28fe0f13d363e0a26ffcbc1ba9923e4fd35804f0 Reviewed-on: https://review.whamcloud.com/32481 Tested-by: Jenkins Reviewed-by: Emoly Liu Tested-by: Maloo Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- diff --git a/lustre/doc/mount.lustre.8 b/lustre/doc/mount.lustre.8 index 7fc2c26..dfc8c1a 100644 --- a/lustre/doc/mount.lustre.8 +++ b/lustre/doc/mount.lustre.8 @@ -10,20 +10,24 @@ mount.lustre \- start a Lustre client or target service .SH SYNOPSIS .br -.BI "mount \-t lustre [\-o " options "] " "device mountpoint" +.BI "mount \-t lustre [\-o " options "] " " " +.br +.BI "mount \-t lustre [\-o " options "] " ":/ " .SH DESCRIPTION .B mount.lustre -is used to start a Lustre client or target service. This program should not be -called directly; rather it is a helper program invoked through +is used to start a Lustre client or target service. This program should not +be called directly; rather it is a helper program invoked through .BR mount (8) -as above. Lustre clients and targets are stopped by using the +as above when the +.B lustre +filesystem type is used. Lustre clients and targets are stopped by using the .BR umount (8) command. .br -There are two forms for the -.I device -option, depending on whether a client or a target service is started: +There are two forms for the device option passed to the +.I mount +command, depending on whether a client or a target service is started: .TP .IR :/ [/] mounts the Lustre filesystem named @@ -31,12 +35,12 @@ mounts the Lustre filesystem named (optionally starting at subdirectory .I subdir within the filesystem, if specified) on the client at the directory -.IR mountpoint , +.IR client_mountpoint , by contacting the Management Service at .IR mgsname . The format for .I mgsname -is defined below. A client filesystem can be listed in +is defined below. A client filesystem will typically be listed in .BR fstab (5) for automatic mount at boot time, is usable like any local filesystem, and provides a full POSIX-compilant interface. @@ -44,7 +48,7 @@ provides a full POSIX-compilant interface. .I block_device starts the target service defined by the .IR mkfs.lustre (8) -command on the physical disk +command on the physical disk or ZFS dataset given by .IR block_device . The .I block_device @@ -80,8 +84,8 @@ and may be running on any one of the nodes. .BI := [,] Each .I mgsnode -may be specify a comma-separated list of NIDs, if there are different -LNet interfaces for that +may specify a comma-separated list of NIDs, if there are different +LNet interfaces for the same .IR mgsnode . .TP .BI mgssec= flavor @@ -150,7 +154,7 @@ support entirely, and is the default option. Applications calling .BR flock(2) will get an .B ENOSYS -error. It is up to theadministrator to choose either the +error. It is up to the administrator to choose either the .B localflock or .B flock @@ -187,13 +191,14 @@ Disable use of extended attributes by regular users. Root and system processes Force a client to keep pinging even if servers have enabled suppress_pings. .TP .BI verbose -Enable mount/umount console messages. +Enable mount/remount/umount console messages. .TP .BI noverbose -Disable mount/umount console messages. +Disable mount/remount/umount console messages. .TP .BI user_fid2path -Enable FID to path translation by regular users. +Enable FID to path translation by regular users via +.BR "lfs fid2path" . .TP .BI nouser_fid2path Disable FID to path translation by regular users. Root and process with @@ -206,7 +211,7 @@ This option can be useful in case of several Lustre client mount points on the same node, with each mount point using a different network. It is also interesting when running Lustre clients from containers, by restricting each container to a specific network. -.SH CLIENT OPTIONS +.SH SERVER OPTIONS In addition to the standard mount options and backing disk type (e.g. ldiskfs) options listed in .BR mount (8), @@ -215,21 +220,24 @@ Lustre understands the following options: .TP .BI acl -Enable POSIX Access Control List support. See the +Enable POSIX Access Control List support for all clients. See the .BR acl (5) manual page. .TP .BI nosvc -Only start the MGC (and MGS, if co-located) for a target service, and not the actual service. +Only start the MGC (and MGS, if co-located) for a target service, +and not the actual MDS or OSS service. .TP .BI nomgs -Start a MDT with a co-located MGS without starting the MGS. +Start an MDT with a co-located MGS without starting the MGS service. .TP .BI noscrub -Not trigger OI scrub automatically when detect some inconsistency, unless it is started explicitly. +Do not trigger OI scrub automatically when an inconsistency is detected. +It is still possible to start explicitly using the +.BR "lctl lfsck_start" . .TP .BI skip_lfsck -Not resume the former paused/crashed LFSCK automatically when mount. +Do not resume the former paused/crashed LFSCK automatically when mounting. .TP .BI abort_recov Abort client recovery and start the target service immediately. diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c index 5d34176..1acd635 100644 --- a/lustre/utils/mount_lustre.c +++ b/lustre/utils/mount_lustre.c @@ -88,35 +88,49 @@ void usage(FILE *out) { fprintf(out, "\nThis mount helper should only be invoked via the " "mount (8) command,\ne.g. mount -t lustre dev dir\n\n"); - fprintf(out, "usage: %s [-fhnvV] [-o ] \n", + fprintf(out, "usage: %s [-fhnvV] [-o ] \n", + progname); + fprintf(out, "usage: %s [-fhnvV] [-o ] \n", progname); fprintf(out, - "\t: the disk device, or for a client:\n" + "\t: the local disk device when mounting a server\n" + "\t: the server MGS and filesystem for a client:\n" "\t\t[:...]:/[/]\n" - "\t: name of the Lustre filesystem (e.g. lustre1)\n" + "\t\t\t: MGS LNet Node Identifier (e.g. mgs01@o2ib)\n" + "\t\t\t: Lustre filesystem name (e.g. lustre1)\n" + "\t\t\t: subdirectory of the filesystem to mount\n" "\t: filesystem mountpoint (e.g. /mnt/lustre)\n" - "\t-f|--fake: fake mount (updates /etc/mtab)\n" + "\t-f|--fake: fake mount (only update /etc/mtab)\n" "\t-o force|--force: force mount even if already in /etc/mtab\n" "\t-h|--help: print this usage message\n" "\t-n|--nomtab: do not update /etc/mtab after mount\n" "\t-v|--verbose: print verbose config settings\n" "\t-V|--version: output build version of the utility and exit\n" - "\t: one or more comma separated of:\n" - "\t\t(no)flock,(no)user_xattr,(no)acl\n" + "\tdefault options are marked below with '*'\n" + "\t\t(no)flock: disable* or enable POSIX flock support\n" + "\t\t(no)user_xattr: disable or enable* user xattr namespace\n" + "\t: one or more comma separated server options:\n" + "\t\t(no)acl: disable or enable* POSIX ACL support completely\n" "\t\tabort_recov: abort server recovery handling\n" - "\t\tnosvc: only start MGC/MGS obds\n" - "\t\tnomgs: only start target obds, using existing MGS\n" - "\t\tnoscrub: NOT auto start OI scrub unless start explicitly\n" - "\t\tskip_lfsck: NOT auto resume the paused/crashed LFSCK\n" - "\t\texclude=[:] : colon-separated list of " - "inactive OSTs (e.g. lustre-OST0001)\n" + "\t\tnosvc: only start MGC/MGS without starting MDS/OSS\n" + "\t\tnomgs: only start target MDS/OSS, using existing MGS\n" + "\t\tnoscrub: do NOT auto start OI scrub unless requested\n" + "\t\tskip_lfsck: do NOT auto resume paused/crashed LFSCK\n" + "\t\tmd_stripe_cache_size=: set MD RAID device stripe cache size\n" + "\t: one or more comma separated client options:\n" + "\t\texclude=[:]: list of inactive OSTs (e.g. lustre-OST0001)\n" + "\t\tlocalflock: enable POSIX flock only on local client\n" + "\t\tretry=: number of times mount is retried by client\n" #ifdef HAVE_GSS - "\t\tskpath=: Path to a file or directory of" - "key configuration files to load into the kernel keyring\n" + "\t\tskpath=: path of keys to load into kernel keyring\n" #endif - "\t\tretry=: number of times mount is retried by client\n" - "\t\tmd_stripe_cache_size=: set the raid stripe cache " - "size for the underlying raid if present\n"); + "\t\t(no)user_fid2path: disable* or enable user $MOUNT/.lustre/fid access\n" + "\t\t(no)checksum: disable or enable* data checksums\n" + "\t\t(no)lruresize: disable or enable* LDLM dynamic LRU size\n" + "\t\t(no)lazystatfs: disable or enable* statfs to work if OST is unavailable\n" + "\t\t32bitapi: return only 32-bit inode numbers to userspace\n" + "\t\t(no)verbose: disable or enable* messages at filesystem (un,re)mount\n" + ); exit((out != stdout) ? EINVAL : 0); }