Viewing: tunefs.lustre.8
.\" -*- nroff -*-
.\" 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, v2.
.\"
.TH TUNEFS.LUSTRE 8 2024-08-28 Lustre "Lustre Configuration Utilities"
.SH NAME
tunefs.lustre \- modify the Lustre configuration information on a disk
.SH SYNOPSIS
.SY tunefs.lustre
.RI [ OPTIONS ]
.I DEVICE
.YS
.SH DESCRIPTION
.B tunefs.lustre
is used to modify the configuration information on a Lustre target
disk. This includes upgrading old (pre-Lustre 1.6) disks. This does not
reformat the disk or erase the target information, but modifying the
configuration information can result in an unusable filesystem. You have
been warned.
.P
Changes made here will affect a filesystem only when the target is next
mounted.
.SH OPTIONS
.TP
.BI --comment= COMMENT
Set user comment about this disk, ignored by Lustre.
.TP
.B --dryrun
Only print what would be done; does not affect the disk.
.TP
.BI --erase-param " PARAM"
Remove all previously stored instances of the parameter
.IR param .
Attempts to remove a non-existing parameter appear as successful ones.
.TP
.B --erase-params
Remove all previously stored parameter info.
.TP
.BI --failnode= NID\fR,...
Set the NID(s) of a failover partner. This option can be repeated as desired.
Cannot be used with
.BR --servicenode .
.TP
.BI --servicenode= NID\fR,....
Set the NID(s) of all service partner. This option treats all nodes as equal
service nodes. Cannot be used with
.BR --failnode .
.TP
.BI --fsname= FILESYSTEM_NAME
The Lustre filesystem this service will be part of. Default is 'lustre'.
.TP
.BI --index= INDEX
Force a particular OST or MDT index.
.TP
.BI --mountfsoptions= OPTS
Set the persistent mount options that will be used when Lustre fs.
WARNING: unlike earlier versions of
.BR tunefs.lustre ,
this version completely replaces the existing 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 ldiskfs are
.TP
.B OST :
.I errors=remount-ro,mballoc,extents
.TP
.BR MGS/MDT :
.I errors=remount-ro,user_xattr
.PP
.B DO NOT
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 tunefs.lustre is working.
.TP
.BI --network= NET\fR,...
Network(s) to restrict this ost/mdt to. This option can be repeated as desired.
.TP
.B --mgs
Add a configuration management service to this target.
.TP
.BI --mgsnode= NID\fR,...
Set the NID(s) of the MGS node, required for all targets other than the MGS.
.TP
.B --nomgs
Remove a configuration management service to this target.
.TP
.BI --param " KEY" = VALUE
Set permanent parameter
.I KEY
to value
.IR VALUE .
This option can be repeated as desired. All previously stored instances of
.I KEY
are removed, and new instances specified in the command line are added.
Typical options might include:
.RS
.I --param sys.timeout=40
.RS
System obd timeout
.RE
.I --param lov.stripesize=2M
.RS
Default stripe size
.RE
.I --param lov.stripecount=2
.RS
Default stripe count
.RE
.I --param failover.mode=failout
.RS
Return errors instead of waiting for recovery
.RE
.RE
.TP
.B --force-nohostid
Ignore unset hostid for ZFS import protection. To set hostid either set
spl_hostid option for spl.ko or set /etc/hostid, see zgenhostid(8).
.TP
.B --mountdata-reset-from=\fIDEV\fR|\fIFILE\fR
Reset the CONFIGS/mountdata file using the path to a similar local device or a
backup CONFIG/mountdata file.
.TP
.B --quiet
Print less information.
.TP
.B --verbose
Print more information.
.TP
.B --writeconf
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.
All targets (OSTs/MDTs) must then be restarted to regenerate the logs.
No clients should be started until all targets have restarted.
.P
Correct order of operations is:
.EX
* Unmount all clients of this filesystem.
* Unmount MDT and all OSTs of this filesystem.
.BR "* Run " "tunefs.lustre --writeconf <device>" " on every server."
* Mount MDT and OSTs.
* Mount clients
.EE
.TP
.B --nolocallogs
Use configuration logs from the MGS, not local ones.
.P
There is feature that starts a target with a local copy of
the config log in order to avoid a delay in communicating with
the MGS and to load MGS log updates later on.
However, that feature is not always useful.
.P
.B replace_nids
changes config logs on the server side and local copies
become invalid.
.B --nolocallogs
sets the
.B nolocallogs
mount flag,
which causes the local copy of the config log to be ignored.
The flag is reset once new logs are downloaded from MGS.
.TP
.B --quota
Enable space accounting on old 2.x devices.
.TP
.B --replace
Reset the state of a target that is already registered with the MGS
and is returning an error
.RB ( EADDRINUSE = 98 )
that its index is already used, like:
.RS
.EX
.B # mount -t lustre /dev/vg_testfs_ost1/lvost1
.B mount.lustre: mount failed: Address already in use
.EE
.RE
This might happen if a new target is re-using the index of a
previous target that was permanently removed or reformatted for
some reason (e.g. hardware replacement, multiple disk failure), and
.B mkfs.lustre
was used to reformat the target without the
.B --repace
option. This can also happen if there was an error during initial
target registration with the MGS (e.g. a network error or MGS failure
on first mount). This stops the target trying to register with the
MGS as a newly-added target with the filesystem.
.br
.B NOTE:
this is a potentially dangerous operation that overrides internal
safety checks in the filesystem. If it used incorrectly it may
lead to filesystem corruption or data loss, so it should be used
with caution after verifying that there are not two different devices
using the same index number (e.g. by checking on all servers with
.BR blkid (8)
to that the filesystem UUIDs and volume names are unique).
.SH EXAMPLES
Change the MGS NID address. (This should be done on every target disk,
since they should all be contacting the same MGS.):
.RS
.EX
.B # tunefs.lustre --erase-params --mgsnode=NEW_NID --writeconf /dev/sda
.EE
.RE
.PP
Remove all previous failover NID locations for this target, and add a new
failover NID location for this target:
.RS
.EX
.B # tunefs.lustre --param "failover.node=192.168.0.13@tcp0" /dev/sda
.EE
.RE
.PP
Remove all failover NID locations for this target:
.RS
.EX
.B # tunefs.lustre --erase-param failover.node /dev/sda
.EE
.RE
.PP
Force the targets to re-register with the MGS on their next mount
to recreate the filesystem configuration logs in case of an error.
This should be run for every target disk in the filesystem:
.RS
.EX
.B # tunefs.lustre --writeconf /dev/vgtestfs/lvtestfs-mdt0
.br
.B # tunefs.lustre --writeconf /dev/vgtestfs/lvtestfs-ost0
.EE
.RE
.SH AVAILABILITY
.B tunefs.lustre
is part of the
.BR lustre (7)
filesystem package since release 1.4.0
.\" Added in commit 1.3.4-1130-g113303973e
.SH SEE ALSO
.BR lfs (1),
.BR lustre (7),
.BR blkid (8),
.BR lctl (8),
.BR mkfs.lustre (8),
.BR mount.lustre (8)