TUNEFS.LUSTRE(8)

NAME
tunefs.lustre - modify the Lustre configuration information on a disk

SYNOPSIS
tunefs.lustre [OPTIONS] DEVICE

DESCRIPTION
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.

Changes made here will affect a filesystem only when the target is next mounted.

OPTIONS

--comment=COMMENT
    Set user comment about this disk, ignored by Lustre.

--dryrun
    Only print what would be done; does not affect the disk.

--erase-param PARAM
    Remove all previously stored instances of the parameter param. Attempts to remove a non-existing parameter appear as successful ones.

--erase-params
    Remove all previously stored parameter info.

--failnode=NID,...
    Set the NID(s) of a failover partner. This option can be repeated as desired. Cannot be used with --servicenode.

--servicenode=NID,....
    Set the NID(s) of all service partner. This option treats all nodes as equal service nodes. Cannot be used with --failnode.

--fsname=FILESYSTEM_NAME
    The Lustre filesystem this service will be part of. Default is 'lustre'.

--index=INDEX
    Force a particular OST or MDT index.

--mountfsoptions=OPTS
    Set the persistent mount options that will be used when Lustre fs. WARNING: unlike earlier versions of 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

OST :
    errors=remount-ro,mballoc,extents

MGS/MDT:
    errors=remount-ro,user_xattr

DO NOT alter the default mount options unless you know what you are doing.

--backfs-mount-opts=OPTS
    Use these options for mounting backing fs while tunefs.lustre is working.

--network=NET,...
    Network(s) to restrict this ost/mdt to. This option can be repeated as desired.

--mgs
    Add a configuration management service to this target.

--mgsnode=NID,...
    Set the NID(s) of the MGS node, required for all targets other than the MGS.

--nomgs
    Remove a configuration management service to this target.

--param KEY=VALUE
    Set permanent parameter KEY to value VALUE. This option can be repeated as desired. All previously stored instances of KEY are removed, and new instances specified in the command line are added. Typical options might include:
    --param sys.timeout=40
        System obd timeout
    --param lov.stripesize=2M
        Default stripe size
    --param lov.stripecount=2
        Default stripe count
    --param failover.mode=failout
        Return errors instead of waiting for recovery

--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).

--mountdata-reset-from=DEV|FILE
    Reset the CONFIGS/mountdata file using the path to a similar local device or a backup CONFIG/mountdata file.

--quiet
    Print less information.

--verbose
    Print more information.

--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.

Correct order of operations is:
    * Unmount all clients of this filesystem.
    * Unmount MDT and all OSTs of this filesystem.
    * Run tunefs.lustre --writeconf <device> on every server.
    * Mount MDT and OSTs.
    * Mount clients

--nolocallogs
    Use configuration logs from the MGS, not local ones.

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.

replace_nids changes config logs on the server side and local copies become invalid. --nolocallogs sets the 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.

--quota
    Enable space accounting on old 2.x devices.

--replace
    Reset the state of a target that is already registered with the MGS and is returning an error (EADDRINUSE=98) that its index is already used, like:
        # mount -t lustre /dev/vg_testfs_ost1/lvost1
        mount.lustre: mount failed: Address already in use
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 mkfs.lustre was used to reformat the target without the --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.
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 blkid(8) to that the filesystem UUIDs and volume names are unique).

EXAMPLES
Change the MGS NID address. (This should be done on every target disk, since they should all be contacting the same MGS.):
        # tunefs.lustre --erase-params --mgsnode=NEW_NID --writeconf /dev/sda

Remove all previous failover NID locations for this target, and add a new failover NID location for this target:
        # tunefs.lustre --param failover.node=192.168.0.13@tcp0 /dev/sda

Remove all failover NID locations for this target:
        # tunefs.lustre --erase-param failover.node /dev/sda

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:
        # tunefs.lustre --writeconf /dev/vgtestfs/lvtestfs-mdt0
        # tunefs.lustre --writeconf /dev/vgtestfs/lvtestfs-ost0

AVAILABILITY
tunefs.lustre is part of the lustre(7) filesystem package since release 1.4.0

SEE ALSO
lfs(1), lustre(7), blkid(8), lctl(8), mkfs.lustre(8), mount.lustre(8)