X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fdoc%2Fmkfs.lustre.8;h=73ffab1d56a9278014024f5a44aa6ee35739f423;hb=28cedfae1e318b3f4783a6f145e24441b279646c;hp=06a695c250c56f433cc6018b52206ff11d61455e;hpb=40b99fd05bc8848ddda55a84895fd1e7f96e993a;p=fs%2Flustre-release.git diff --git a/lustre/doc/mkfs.lustre.8 b/lustre/doc/mkfs.lustre.8 index 06a695c..73ffab1 100644 --- a/lustre/doc/mkfs.lustre.8 +++ b/lustre/doc/mkfs.lustre.8 @@ -1,19 +1,35 @@ .\" -*- nroff -*- -.\" Copyright 2006 by Cluster File Systems, Inc. All Rights Reserved. -.\" Copyright 2008 by Sun Microsystems. All Rights Reserved. +.\" Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +.\" +.\" Copyright (c) 2011, 2017, Intel Corporation. +.\" .\" This file may be copied under the terms of the GNU Public License. .\" -.TH mkfs.lustre 8 "2008 Mar 15" Lustre "configuration utilities" +.TH mkfs.lustre 8 "2014 Jun 10" Lustre "configuration utilities" .SH NAME mkfs.lustre \- format a disk for a Lustre service .SH SYNOPSIS .br -.BR mkfs.lustre { --ost | --mdt | --mgs } -.I [options] +.B mkfs.lustre +.RB { --ost | --mdt | --mgs } +.BR --fsname= <\fIname\fR> +.RI [ options ] .I device .br -.B -is one of +.B mkfs.lustre +.RB { --ost | --mdt | --mgs } +.B --backfstype=zfs +.BR --fsname= <\fIname\fR> +.RI [ options "] <" pool_name >/< dataset_name "> [<" zpool_specification >] + +.SH DESCRIPTION +.B mkfs.lustre +is used to format a disk device for use as part of a Lustre +filesystem. After formatting, a disk can be mounted with +.B mount -t lustre ... +to start the Lustre service defined by this command. + +.SH OPTIONS .TP .BI \--ost object storage target @@ -22,20 +38,25 @@ object storage target metadata storage target .TP .BI \--mgs -configuration management service - one per site. This service can be -combined with one +configuration management service, one per site or filesystem. This service can +be combined with one .BI \--mdt -service by specifying both types -.SH DESCRIPTION -.B mkfs.lustre -is used to format a disk device for use as part of a Lustre -filesystem. After formatting, a disk can be mounted to start the Lustre -service defined by this command. - -.SH OPTIONS +service by specifying both types. .TP .BI \--backfstype= fstype -Force a particular format for the backing fs (ext3, ldiskfs) +Force a particular format for the backing fs (ldiskfs, zfs). +.br +.IR zpool_specification " = [[<" vdev_type ">] <" device "> [<" device "> ...] [<" vdev_type ">] ...]" +.br +.IR vdev_type " =" +.RB { mirror , raidz , raidz2 , raidz3 , cache } +.br +.IR device " = { " "Linux block device" " }" + +If no vdev_type is given, then the devices are used in a round-robin +(striped) manner. See +.BR zpool (8) +for more details. .TP .BI \--comment= comment Set user comment about this disk, ignored by Lustre. @@ -46,30 +67,71 @@ Set device size for loop devices .BI \--dryrun Only print what would be done; does not affect the disk .TP -.BI \--failnode= nid,... +.BI \--failnode= nid,... Set the NID(s) of a failover partner. This option can be repeated as desired. -.TP -.BI \--fsname= filesystem_name -The Lustre filesystem this service will be part of. Default is 'lustre' +Cannot be used with --servicenode. +.TP +.BI \--servicenode= nid,.... +Set the NID(s) of all service partner. This option treats all nodes as equal +service nodes. Cannot be used with --failnode. +.TP +.BI \--fsname= filesystem_name +The Lustre filesystem this target will be part of. Valid +.IR filesystem_name s +are between 1 and 8 characters long and must only use upper- and lower-case +English letters, numbers, and '\-', or '_' (regexp [-_a\-zA\-Z0\-9]). All +targets in a single filesystem must specify the same +.IR filesystem_name , +and it must be unique between all filesystems mounted by a single client +at one time. Using "lustre" as the filesystem name is discouraged, to avoid +future problems if a client needs to mount two such filesystems, and to +reduce confusion for administrators/users between "lustre" as the +.I filesystem_name +and "lustre" as the literal string that must be used in places for the +.BR filesystem_type . +The +.B \--fsname +option is not valid for the MGS, since it may be used for multiple filesystems. .TP .BI \--index= index -Force a particular OST or MDT index +Specify a particular OST or MDT index. Required for all targets other than +the MGS, and must be unique for all targets in the same filesystem. Typically +sequential values starting from 0 are used. The index parameter may either +be a decimal number, or a hexadecimal number starting with '0x'. .TP .BI \--mkfsoptions= opts -Format options for the backing fs. For example, ext3 options could be set here. +Additional formatting options passed through to the backing filesystem. For +example, options for +.B mke2fs +or +.B zpool +could be set here. .TP .BI \--mountfsoptions= opts -Set permanent mount options, equivalent to setting in /etc/fstab -.TP -.BI \--mgsnode= nid,... +Set persistent mount options that will be used when mounting Lustre targets. +WARNING: unlike earlier versions of \fBmkfs.lustre\fR, this version completely +replaces the default mount options with those specified on the command line, +issuing a warning on stderr if any of the default mount options are omitted. +The defaults for \fIldiskfs\fR are +OST: \fIerrors=remount-ro,mballoc,extents\fR; +MGS/MDT: \fIerrors=remount-ro,user_xattr\fR. +\fBDO NOT\fR alter the default mount options unless you know what you are doing. +.TP +.BI \--backfs-mount-opts=opts +Use these options for mounting backing fs while mkfs.lustre is working. +.TP +.BI \--network= net,... +Network(s) to restrict this OST/MDT to. This option can be repeated as desired. +.TP +.BI \--mgsnode= nid,... Set the NID(s) of the MGS node, required for all targets other than the MGS. .TP .BI \--param " key=value" -Set permanent parameter -.I key -to value +Set permanent parameter +.I key +to value .IR value . -This option can be repeated as desired. Typical options might include: +This option can be repeated as desired. Typical options might include: .RS .I \--param sys.timeout=40 .RS @@ -79,11 +141,11 @@ System obd timeout .RS Default stripe size .RE -.I \--param lov.stripecount=2 +.I \--param lov.stripecount=2 .RS Default stripe count .RE -.I \--param failover.mode=failout +.I \--param failover.mode=failout .RS Return errors instead of waiting for recovery .RE @@ -92,41 +154,79 @@ Return errors instead of waiting for recovery .BI \--quiet Print less information. .TP -.BI \--reformat -Reformat an existing Lustre disk +.BI \--reformat +Reformat an existing Lustre disk as a new target +.TP +.BI \--replace +Used to initialize a target with the same +.I --index +as a previously used target if the old target was permanently lost for +some reason (e.g. multiple disk failure or massive corruption). This +avoids having the target try to register as a new target with the MGS. .TP .BI \--stripe-count-hint= stripes -Used for optizing MDT inode size +Specify the expected common number of stripes on a file so that the MDT +inode size can be optimized for the typical use case. +.TP +.BI \--force-nohostid +Ignore unset hostid for ZFS import protection. To set hostid either set +spl_hostid parameter for spl.ko or set /etc/hostid, see zgenhostid(8). To +populate the spl_hostid parameter, spl.ko must be (re)loaded after /etc/hostid +is created. + .TP .BI \--verbose Print more information. +.TP +.BI \--version +Output build version of the mkfs.lustre utiltiy. + +.SH NID +A Lustre network identifier (NID) is used to uniquely identify a Lustre network +endpoint by node ID and network type. The format of the NID is: +\fInetwork_id@network_type\fR. +If a node has multiple network interfaces, it may have multiple NIDs, which must +all be identified so other nodes can choose the NID that is appropriate for +their network interfaces. Typically, NIDs are specified in a list delimited by +commas (,). However, when failover nodes are specified, the NIDs are delimited +by a colon (:) or by repeating a keyword such as \fI--mgsnode=\fR or +\fI--servicenode=\fR. .SH EXAMPLES .TP -.B mkfs.lustre --fsname=testfs --mdt --mgs /dev/sda1 +.B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs /dev/sda1 Combined MGS and MDT for filesystem 'testfs' on node e.g. cfs21 .TP -.B mkfs.lustre --fsname=testfs --ost --mgsnode=cfs21@tcp0 /dev/sdb +.B mkfs.lustre --fsname=testfs --index=0 --ost --mgsnode=cfs21@tcp0 /dev/sdb OST for filesystem 'testfs' on any node using the above MGS. .TP +.B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs --servicenode=cfs21@tcp0,cfs21ib@o2ib0 --servicenode=cfs22@tcp0,cfs22ib@o2ib0 /dev/sda1 +Combined MGS and MDT for filesystem 'testfs' on failover pair cfs21 and cfs22. +.TP +.B mkfs.lustre --fsname=testfs --index=1 --ost --mgsnode=cfs21@tcp0,cfs21ib@o2ib0:cfs22@tcp0,cfs22ib@o2ib0 --failnode=cfs24@tcp0,cfs24ib@o2ib0 /dev/sdb +OST for filesystem 'testfs' using the above MGS and having a failover partner +cfs24. +.TP .B mkfs.lustre --mgs /dev/sda1 Standalone MGS on e.g. node cfs22 .TP -.B mkfs.lustre --fsname=myfs1 --mdt --mgsnode=cfs22@tcp0 /dev/sda2 +.B mkfs.lustre --fsname=myfs1 --index=0 --mdt --mgsnode=cfs22@tcp0 /dev/sda2 MDT for filesystem 'myfs1' on any node, using the above MGS +.TP +.B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs zfspool/mdt1 mirror /dev/sdb /dev/sdc mirror /dev/sdd /dev/sde +Create zfs pool 'zfspool' on two root vdevs each a mirror of two disks and +create mdt/mgs on filesystem 'zfspool/mdt1'. -.SH BUGS -Please report all bugs to Sun Microsystems via http://bugzilla.lustre.org/ .SH AVAILABILITY .B mkfs.lustre -is part of the -.BR Lustre (7) -filesystem package and is available from Sun Microsystems via -.br -http://downloads.lustre.org/ +is part of the +.BR lustre (7) +filesystem package. .SH SEE ALSO +.BR lctl (8), +.BR lfs (1), .BR lustre (7), +.BR mke2fs (8), .BR mount.lustre (8), .BR tunefs.lustre (8), -.BR lctl (8), -.BR lfs (1) +.BR zpool (8)