Whamcloud - gitweb
6100656d929c9ff177e4be6af638ef8592950d00
[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, 2012, 2014, 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 service will be part of. The maximum filesystem_name
80 length is 8 characters. Required for all targets other than MGS.
81 .TP
82 .BI \--index= index
83 Specify a particular OST or MDT index. Required for all targets other than the MGS.
84 .TP
85 .BI \--mkfsoptions= opts
86 Format options for the backing fs. For example, ext3 options could be set here.
87 .TP
88 .BI \--mountfsoptions= opts
89 Set the persistent mount options that will be used when mounting Lustre fs.
90 WARNING: unlike earlier versions of \fBmkfs.lustre\fR, this version completely
91 replaces the default mount options with those specified on the command line,
92 issuing a warning on stderr if any of the default mount options are omitted.
93 The defaults for \fIldiskfs\fR are
94 OST: \fIerrors=remount-ro,mballoc,extents\fR;
95 MGS/MDT: \fIerrors=remount-ro,user_xattr\fR.
96 \fBDO NOT\fR alter the default mount options unless you know what you are doing.
97 .TP
98 .BI \--backfs-mount-opts=opts
99 Use these options for mounting backing fs while mkfs.lustre is working.
100 .TP
101 .BI \--network= net,...
102 Network(s) to restrict this ost/mdt to. This option can be repeated as desired.
103 .TP
104 .BI \--mgsnode= nid,...
105 Set the NID(s) of the MGS node, required for all targets other than the MGS.
106 .TP
107 .BI \--param " key=value"
108 Set permanent parameter
109 .I key
110 to value
111 .IR value .
112 This option can be repeated as desired.  Typical options might include:
113 .RS
114 .I \--param sys.timeout=40
115 .RS
116 System obd timeout
117 .RE
118 .I \--param lov.stripesize=2M
119 .RS
120 Default stripe size
121 .RE
122 .I \--param lov.stripecount=2
123 .RS
124 Default stripe count
125 .RE
126 .I \--param failover.mode=failout
127 .RS
128 Return errors instead of waiting for recovery
129 .RE
130 .RE
131 .TP
132 .BI \--quiet
133 Print less information.
134 .TP
135 .BI \--reformat
136 Reformat an existing Lustre disk as a new target
137 .TP
138 .BI \--replace
139 Used to initialize a target with the same
140 .I --index
141 as a previously used target if the old target was permanently lost for
142 some reason (e.g. multiple disk failure or massive corruption).  This
143 avoids having the target try to register as a new target with the MGS.
144 .TP
145 .BI \--stripe-count-hint= stripes
146 Used for optizing MDT inode size
147 .TP
148 .BI \--verbose
149 Print more information.
150 .TP
151 .BI \--version
152 Output build version of the mkfs.lustre utiltiy.
153
154 .SH EXAMPLES
155 .TP
156 .B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs /dev/sda1
157 Combined MGS and MDT for filesystem 'testfs' on node e.g. cfs21
158 .TP
159 .B mkfs.lustre --fsname=testfs --index=0 --ost --mgsnode=cfs21@tcp0 /dev/sdb
160 OST for filesystem 'testfs' on any node using the above MGS.
161 .TP
162 .B mkfs.lustre --mgs /dev/sda1
163 Standalone MGS on e.g. node cfs22
164 .TP
165 .B mkfs.lustre --fsname=myfs1 --index=0 --mdt --mgsnode=cfs22@tcp0 /dev/sda2
166 MDT for filesystem 'myfs1' on any node, using the above MGS
167 .TP
168 .B mkfs.lustre --fsname=testfs --index=0 --mdt --mgs zfspool/mdt1 mirror /dev/sdb /dev/sdc mirror /dev/sdd /dev/sde
169 Create zfs pool 'zfspool' on two root vdevs each a mirror of two disks and create mdt/mgs on
170 filesystem 'zfspool/mdt1'.
171
172 .SH AVAILABILITY
173 .B mkfs.lustre
174 is part of the
175 .BR lustre (7)
176 filesystem package.
177 .SH SEE ALSO
178 .BR lustre (7),
179 .BR mount.lustre (8),
180 .BR tunefs.lustre (8),
181 .BR lctl (8),
182 .BR lfs (1),
183 .BR zpool (8)