2 .\" Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
4 .\" Copyright (c) 2011, 2014, Intel Corporation.
6 .\" This file may be copied under the terms of the GNU Public License.
8 .TH mkfs.lustre 8 "2014 Jun 10" Lustre "configuration utilities"
10 mkfs.lustre \- format a disk for a Lustre service
14 .RB { --ost | --mdt | --mgs }
15 .BR --fsname= <\fIname\fR>
20 .RB { --ost | --mdt | --mgs }
22 .BR --fsname= <\fIname\fR>
23 .RI [ options "] <" pool_name >/< dataset_name "> [<" zpool_specification >]
27 is used to format a disk device for use as part of a Lustre
28 filesystem. After formatting, a disk can be mounted with
29 .B mount -t lustre ...
30 to start the Lustre service defined by this command.
38 metadata storage target
41 configuration management service, one per site or filesystem. This service can
44 service by specifying both types.
46 .BI \--backfstype= fstype
47 Force a particular format for the backing fs (ldiskfs, zfs).
49 .IR zpool_specification " = [[<" vdev_type ">] <" device "> [<" device "> ...] [<" vdev_type ">] ...]"
52 .RB { mirror , raidz , raidz2 , raidz3 , cache }
54 .IR device " = { " "Linux block device" " }"
56 If no vdev_type is given, then the devices are used in a round-robin
61 .BI \--comment= comment
62 Set user comment about this disk, ignored by Lustre.
64 .BI \--device-size= KB
65 Set device size for loop devices
68 Only print what would be done; does not affect the disk
70 .BI \--failnode= nid,...
71 Set the NID(s) of a failover partner. This option can be repeated as desired.
72 Cannot be used with --servicenode.
74 .BI \--servicenode= nid,....
75 Set the NID(s) of all service partner. This option treats all nodes as equal
76 service nodes. Cannot be used with --failnode.
78 .BI \--fsname= filesystem_name
79 The Lustre filesystem this service will be part of. The maximum filesystem_name
80 length is 8 characters. Required for all targets other than MGS.
83 Specify a particular OST or MDT index. Required for all targets other than the MGS.
84 The index parameter may either be a decimal number or a hexadecimal number
87 .BI \--mkfsoptions= opts
88 Format options for the backing fs. For example, ext3 options could be set here.
90 .BI \--mountfsoptions= opts
91 Set the persistent mount options that will be used when mounting Lustre fs.
92 WARNING: unlike earlier versions of \fBmkfs.lustre\fR, this version completely
93 replaces the default mount options with those specified on the command line,
94 issuing a warning on stderr if any of the default mount options are omitted.
95 The defaults for \fIldiskfs\fR are
96 OST: \fIerrors=remount-ro,mballoc,extents\fR;
97 MGS/MDT: \fIerrors=remount-ro,user_xattr\fR.
98 \fBDO NOT\fR alter the default mount options unless you know what you are doing.
100 .BI \--backfs-mount-opts=opts
101 Use these options for mounting backing fs while mkfs.lustre is working.
103 .BI \--network= net,...
104 Network(s) to restrict this ost/mdt to. This option can be repeated as desired.
106 .BI \--mgsnode= nid,...
107 Set the NID(s) of the MGS node, required for all targets other than the MGS.
109 .BI \--param " key=value"
110 Set permanent parameter
114 This option can be repeated as desired. Typical options might include:
116 .I \--param sys.timeout=40
120 .I \--param lov.stripesize=2M
124 .I \--param lov.stripecount=2
128 .I \--param failover.mode=failout
130 Return errors instead of waiting for recovery
135 Print less information.
138 Reformat an existing Lustre disk as a new target
141 Used to initialize a target with the same
143 as a previously used target if the old target was permanently lost for
144 some reason (e.g. multiple disk failure or massive corruption). This
145 avoids having the target try to register as a new target with the MGS.
147 .BI \--stripe-count-hint= stripes
148 Used for optizing MDT inode size
150 .BI \--force-nohostid
151 Ignore unset hostid for ZFS import protection. To set hostid either set
152 spl_hostid parameter for spl.ko or set /etc/hostid, see genhostid(1). To
153 populate the spl_hostid parameter, spl.ko must be (re)loaded after /etc/hostid is
158 Print more information.
161 Output build version of the mkfs.lustre utiltiy.
164 A Lustre network identifier (NID) is used to uniquely identify a Lustre network
165 endpoint by node ID and network type. The format of the NID is:
166 \fInetwork_id@network_type\fR.
167 If a node has multiple network interfaces, it may have multiple NIDs, which must
168 all be identified so other nodes can choose the NID that is appropriate for
169 their network interfaces. Typically, NIDs are specified in a list delimited by
170 commas (,). However, when failover nodes are specified, the NIDs are delimited
171 by a colon (:) or by repeating a keyword such as \fI--mgsnode=\fR or
172 \fI--servicenode=\fR.
176 .B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs /dev/sda1
177 Combined MGS and MDT for filesystem 'testfs' on node e.g. cfs21
179 .B mkfs.lustre --fsname=testfs --index=0 --ost --mgsnode=cfs21@tcp0 /dev/sdb
180 OST for filesystem 'testfs' on any node using the above MGS.
182 .B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs --servicenode=cfs21@tcp0,cfs21ib@o2ib0 --servicenode=cfs22@tcp0,cfs22ib@o2ib0 /dev/sda1
183 Combined MGS and MDT for filesystem 'testfs' on failover pair cfs21 and cfs22.
185 .B mkfs.lustre --fsname=testfs --index=0 --ost --mgsnode=cfs21@tcp0,cfs21ib@o2ib0:cfs22@tcp0,cfs22ib@o2ib0 --failnode=cfs24@tcp0,cfs24ib@o2ib0 /dev/sdb
186 OST for filesystem 'testfs' using the above MGS and having a failover partner
189 .B mkfs.lustre --mgs /dev/sda1
190 Standalone MGS on e.g. node cfs22
192 .B mkfs.lustre --fsname=myfs1 --index=0 --mdt --mgsnode=cfs22@tcp0 /dev/sda2
193 MDT for filesystem 'myfs1' on any node, using the above MGS
195 .B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs zfspool/mdt1 mirror /dev/sdb /dev/sdc mirror /dev/sdd /dev/sde
196 Create zfs pool 'zfspool' on two root vdevs each a mirror of two disks and create mdt/mgs on
197 filesystem 'zfspool/mdt1'.
206 .BR mount.lustre (8),
207 .BR tunefs.lustre (8),