Whamcloud - gitweb
3d8c6b669812ac6322267d50d76ecbabb468e6ea
[fs/lustre-release.git] / lustre / doc / tunefs.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, v2.
7 .\"
8 .TH tunefs.lustre 8 "2008 Mar 15" Lustre "configuration utilities"
9 .SH NAME
10 tunefs.lustre \- modify the Lustre configuration information on a disk
11 .SH SYNOPSIS
12 .br
13 .B tunefs.lustre
14 [options] 
15 .I device
16 .br
17 .SH DESCRIPTION
18 .B tunefs.lustre
19 is used to modify the configuration information on a Lustre target
20 disk. This includes upgrading old (pre-Lustre 1.6) disks.  This does not
21 reformat the disk or erase the target information, but modifying the
22 configuration information can result in an unusable filesystem.  You have
23 been warned.
24 .br
25 Changes made here will affect a filesystem only when the target is next
26 mounted.
27
28 .SH OPTIONS
29 .TP
30 .BI \--comment= comment
31 Set user comment about this disk, ignored by Lustre.
32 .TP
33 .BI \--dryrun
34 Only print what would be done; does not affect the disk.
35 .TP
36 .BI \--erase-param " param"
37 Remove all previously stored instances of the parameter \fIparam\fR. Attempts
38 to remove a non-existing parameter appear as successful ones.
39 .TP
40 .BI \--erase-params
41 Remove all previously stored parameter info.
42 .TP
43 .BI \--failnode= nid,...  
44 Set the NID(s) of a failover partner. This option can be repeated as desired.
45 Cannot be used with --servicenode.
46 .TP
47 .BI \--servicenode= nid,....
48 Set the NID(s) of all service partner. This option treats all nodes as equal
49 service nodes. Cannot be used with --failnode.
50 .TP
51 .BI \--fsname= filesystem_name  
52 The Lustre filesystem this service will be part of.  Default is 'lustre'.
53 .TP
54 .BI \--index= index
55 Force a particular OST or MDT index.
56 .TP
57 .BI \--mountfsoptions= opts
58 Set  the persistent mount options that will be used when Lustre fs.
59 WARNING: unlike earlier versions of \fBtunefs.lustre\fR,  this version
60 completely replaces the existing mount options with those specified on
61 the command line, issuing a warning  on  stderr  if any  of the default
62 mount options are omitted.  The defaults for ldiskfs  are
63 OST: \fIerrors=remount-ro,mballoc,extents\fR;
64 MGS/MDT: \fIerrors=remount-ro,user_xattr\fR.
65 \fBDO NOT\fR alter the default mount options unless you know what you are doing.
66 .TP
67 .BI \--backfs-mount-opts=opts
68 Use these options for mounting backing fs while tune.lustre is working.
69 .TP
70 .BI \--network= net,...
71 Network(s) to restrict this ost/mdt to. This option can be repeated as desired.
72 .TP
73 .BI \--mgs
74 Add a configuration management service to this target.
75 .TP
76 .BI \--mgsnode= nid,...  
77 Set the NID(s) of the MGS node, required for all targets other than the MGS.
78 .TP
79 .BI \--nomgs
80 Remove a configuration management service to this target.
81 .TP
82 .BI \--param " key=value"
83 Set permanent parameter
84 .I key
85 to value
86 .IR value .
87 This option can be repeated as desired. All previously stored instances of
88 .IR key
89 are removed, and new instances specified in the command line are added.
90 Typical options might include:
91 .RS
92 .I \--param sys.timeout=40
93 .RS
94 System obd timeout
95 .RE
96 .I \--param lov.stripesize=2M
97 .RS
98 Default stripe size
99 .RE
100 .I \--param lov.stripecount=2
101 .RS
102 Default stripe count
103 .RE
104 .I \--param failover.mode=failout
105 .RS
106 Return errors instead of waiting for recovery
107 .RE
108 .RE
109 .TP
110 .BI \--force-nohostid
111 Ignore unset hostid for ZFS import protection. To set hostid either set
112 spl_hostid option for spl.ko or set /etc/hostid, see zgenhostid(8).
113 .TP
114 .BI \--quiet
115 Print less information.
116 .TP
117 .BI \--verbose
118 Print more information.
119 .TP
120 .BI \--writeconf
121 Erase the configuration logs for the filesystem that this server is part of, and regenerate them. This is very dangerous.  All clients must be unmounted and servers for this filesystem should be stopped.  
122 All targets (OSTs/MDTs) must then be restarted to regenerate the logs. 
123 No clients should be started until all targets have restarted.
124 .br
125 Correct order of operations is:
126 .br
127 * Unmount all clients of this filesystem.
128 .br
129 * Unmount MDT and all OSTs of this filesystem.
130 .br
131 * Run \fBtunefs.lustre --writeconf <device>\fR on every server.
132 .br
133 * Mount MDT and OSTs.
134 .br
135 * Mount clients
136 .TP
137 .BI \--quota
138 Enable space accounting on old 2.x devices.
139
140 .SH EXAMPLES
141 .TP
142 .B tunefs.lustre --erase-params --mgsnode=<new_nid> --writeconf /dev/sda
143 Change the MGS NID address. (This should be done on every target disk,
144 since they should all be contacting the same MGS.)
145 .TP
146 .B tunefs.lustre --param "failover.node=192.168.0.13@tcp0" /dev/sda
147 +Remove all previous failover NID locations for this target, and add a new
148 +failover NID location for this target.
149 +.TP
150 +.B tunefs.lustre --erase-param failover.node /dev/sda
151 +Remove all failover NID locations for this target.
152 .TP
153 .B tunefs.lustre --mgs --mdt --fsname=testfs /dev/sda
154 Upgrade an old 1.4.X Lustre MDT to 1.6. The new filesystem name is "testfs". 
155 .TP
156 .B tunefs.lustre --writeconf --mgs --mdt --fsname=testfs /dev/sda1
157 Upgrade an old 1.4.X Lustre MDT to 1.6, and start with brand-new 1.6
158 configuration logs. All old servers and clients must be stopped.
159
160 .SH AVAILABILITY
161 .B tunefs.lustre
162 is part of the 
163 .BR Lustre (7) 
164 filesystem package.
165 .SH SEE ALSO
166 .BR lustre (7),
167 .BR mkfs.lustre (8),
168 .BR mount.lustre (8),
169 .BR lctl (8),
170 .BR lfs (1)