Whamcloud - gitweb
LU-10467 ptlrpc: convert final users of LWI_TIMEOUT_INTERVAL
[fs/lustre-release.git] / lustre / doc / mkfs.lustre.8
1 .\" -*- nroff -*-
2 .\" Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
3 .\"
4 .\" Copyright (c) 2011, 2017, Intel Corporation.
5 .\"
6 .\" This file may be copied under the terms of the GNU Public License.
7 .\"
8 .TH mkfs.lustre 8 "2014 Jun 10" Lustre "configuration utilities"
9 .SH NAME
10 mkfs.lustre \- format a disk for a Lustre service
11 .SH SYNOPSIS
12 .br
13 .B mkfs.lustre
14 .RB { --ost | --mdt | --mgs }
15 .BR --fsname= <\fIname\fR>
16 .RI [ options ]
17 .I device
18 .br
19 .B mkfs.lustre
20 .RB { --ost | --mdt | --mgs }
21 .B --backfstype=zfs
22 .BR --fsname= <\fIname\fR>
23 .RI [ options "] <" pool_name >/< dataset_name "> [<" zpool_specification >]
24
25 .SH DESCRIPTION
26 .B mkfs.lustre
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.
31
32 .SH OPTIONS
33 .TP
34 .BI \--ost
35 object storage target
36 .TP
37 .BI \--mdt
38 metadata storage target
39 .TP
40 .BI \--mgs
41 configuration management service, one per site or filesystem.  This service can
42 be combined with one
43 .BI \--mdt
44 service by specifying both types.
45 .TP
46 .BI \--backfstype= fstype
47 Force a particular format for the backing fs (ldiskfs, zfs).
48 .br
49 .IR zpool_specification " = [[<" vdev_type ">] <" device "> [<" device "> ...] [<" vdev_type ">] ...]"
50 .br
51 .IR vdev_type " ="
52 .RB { mirror , raidz , raidz2 , raidz3 , cache }
53 .br
54 .IR device " = { " "Linux block device" " }"
55
56 If no vdev_type is given, then the devices are used in a round-robin
57 (striped) manner. See
58 .BR zpool (8)
59 for more details.
60 .TP
61 .BI \--comment= comment
62 Set user comment about this disk, ignored by Lustre.
63 .TP
64 .BI \--device-size= KB
65 Set device size for loop devices
66 .TP
67 .BI \--dryrun
68 Only print what would be done; does not affect the disk
69 .TP
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.
73 .TP
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.
77 .TP
78 .BI \--fsname= filesystem_name
79 The Lustre filesystem this target will be part of. Valid
80 .IR filesystem_name s
81 are between 1 and 8 characters long and must only use upper- and lower-case
82 English letters, numbers, and '\-', or '_' (regexp [-_a\-zA\-Z0\-9]).  All
83 targets in a single filesystem must specify the same
84 .IR filesystem_name ,
85 and it must be unique between all filesystems mounted by a single client
86 at one time.  Using "lustre" as the filesystem name is discouraged, to avoid
87 future problems if a client needs to mount two such filesystems, and to
88 reduce confusion for administrators/users between "lustre" as the
89 .I filesystem_name
90 and "lustre" as the literal string that must be used in places for the
91 .BR filesystem_type .
92 The
93 .B \--fsname
94 option is not valid for the MGS, since it may be used for multiple filesystems.
95 .TP
96 .BI \--index= index
97 Specify a particular OST or MDT index. Required for all targets other than
98 the MGS, and must be unique for all targets in the same filesystem. Typically
99 sequential values starting from 0 are used.  The index parameter may either
100 be a decimal number, or a hexadecimal number starting with '0x'.
101 .TP
102 .BI \--mkfsoptions= opts
103 Additional formatting options passed through to the backing filesystem. For
104 example, options for
105 .B mke2fs
106 or
107 .B zpool
108 could be set here.
109 .TP
110 .BI \--mountfsoptions= opts
111 Set persistent mount options that will be used when mounting Lustre targets.
112 WARNING: unlike earlier versions of \fBmkfs.lustre\fR, this version completely
113 replaces the default mount options with those specified on the command line,
114 issuing a warning on stderr if any of the default mount options are omitted.
115 The defaults for \fIldiskfs\fR are
116 OST: \fIerrors=remount-ro,mballoc,extents\fR;
117 MGS/MDT: \fIerrors=remount-ro,user_xattr\fR.
118 \fBDO NOT\fR alter the default mount options unless you know what you are doing.
119 .TP
120 .BI \--backfs-mount-opts=opts
121 Use these options for mounting backing fs while mkfs.lustre is working.
122 .TP
123 .BI \--network= net,...
124 Network(s) to restrict this OST/MDT to. This option can be repeated as desired.
125 .TP
126 .BI \--mgsnode= nid,...
127 Set the NID(s) of the MGS node, required for all targets other than the MGS.
128 .TP
129 .BI \--param " key=value"
130 Set permanent parameter
131 .I key
132 to value
133 .IR value .
134 This option can be repeated as desired. Typical options might include:
135 .RS
136 .I \--param sys.timeout=40
137 .RS
138 System obd timeout
139 .RE
140 .I \--param lov.stripesize=2M
141 .RS
142 Default stripe size
143 .RE
144 .I \--param lov.stripecount=2
145 .RS
146 Default stripe count
147 .RE
148 .I \--param failover.mode=failout
149 .RS
150 Return errors instead of waiting for recovery
151 .RE
152 .RE
153 .TP
154 .BI \--quiet
155 Print less information.
156 .TP
157 .BI \--reformat
158 Reformat an existing Lustre disk as a new target
159 .TP
160 .BI \--replace
161 Used to initialize a target with the same
162 .I --index
163 as a previously used target if the old target was permanently lost for
164 some reason (e.g. multiple disk failure or massive corruption).  This
165 avoids having the target try to register as a new target with the MGS.
166 .TP
167 .BI \--stripe-count-hint= stripes
168 Specify the expected common number of stripes on a file so that the MDT
169 inode size can be optimized for the typical use case.
170 .TP
171 .BI \--force-nohostid
172 Ignore unset hostid for ZFS import protection. To set hostid either set
173 spl_hostid parameter for spl.ko or set /etc/hostid, see zgenhostid(8).  To
174 populate the spl_hostid parameter, spl.ko must be (re)loaded after /etc/hostid
175 is created.
176
177 .TP
178 .BI \--verbose
179 Print more information.
180 .TP
181 .BI \--version
182 Output build version of the mkfs.lustre utiltiy.
183
184 .SH NID
185 A Lustre network identifier (NID) is used to uniquely identify a Lustre network
186 endpoint by node ID and network type. The format of the NID is:
187 \fInetwork_id@network_type\fR.
188 If a node has multiple network interfaces, it may have multiple NIDs, which must
189 all be identified so other nodes can choose the NID that is appropriate for
190 their network interfaces. Typically, NIDs are specified in a list delimited by
191 commas (,). However, when failover nodes are specified, the NIDs are delimited
192 by a colon (:) or by repeating a keyword such as \fI--mgsnode=\fR or
193 \fI--servicenode=\fR.
194
195 .SH EXAMPLES
196 .TP
197 .B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs /dev/sda1
198 Combined MGS and MDT for filesystem 'testfs' on node e.g. cfs21
199 .TP
200 .B mkfs.lustre --fsname=testfs --index=0 --ost --mgsnode=cfs21@tcp0 /dev/sdb
201 OST for filesystem 'testfs' on any node using the above MGS.
202 .TP
203 .B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs --servicenode=cfs21@tcp0,cfs21ib@o2ib0 --servicenode=cfs22@tcp0,cfs22ib@o2ib0 /dev/sda1
204 Combined MGS and MDT for filesystem 'testfs' on failover pair cfs21 and cfs22.
205 .TP
206 .B mkfs.lustre --fsname=testfs --index=1 --ost --mgsnode=cfs21@tcp0,cfs21ib@o2ib0:cfs22@tcp0,cfs22ib@o2ib0 --failnode=cfs24@tcp0,cfs24ib@o2ib0 /dev/sdb
207 OST for filesystem 'testfs' using the above MGS and having a failover partner
208 cfs24.
209 .TP
210 .B mkfs.lustre --mgs /dev/sda1
211 Standalone MGS on e.g. node cfs22
212 .TP
213 .B mkfs.lustre --fsname=myfs1 --index=0 --mdt --mgsnode=cfs22@tcp0 /dev/sda2
214 MDT for filesystem 'myfs1' on any node, using the above MGS
215 .TP
216 .B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs zfspool/mdt1 mirror /dev/sdb /dev/sdc mirror /dev/sdd /dev/sde
217 Create zfs pool 'zfspool' on two root vdevs each a mirror of two disks and
218 create mdt/mgs on filesystem 'zfspool/mdt1'.
219
220 .SH AVAILABILITY
221 .B mkfs.lustre
222 is part of the
223 .BR lustre (7)
224 filesystem package.
225 .SH SEE ALSO
226 .BR lctl (8),
227 .BR lfs (1),
228 .BR lustre (7),
229 .BR mke2fs (8),
230 .BR mount.lustre (8),
231 .BR tunefs.lustre (8),
232 .BR zpool (8)