Upgrading to a New Version of Lustre: Difference between revisions

From Lustre Wiki
Jump to navigation Jump to search
m (Fix formatting)
No edit summary
 
Line 1: Line 1:
{| class='wikitable'
== Upgrading to a New Version of Lustre ==
|-
!Note: This page originated on the old Lustre wiki. It was identified as likely having value and was migrated to the new wiki. It is in the process of being reviewed/updated and may currently have content that is out of date.
|}


<small>''(Updated: Dec 2009)''</small>
This page covers upgrade procedures for Lustre 2.x filesystems. For
the authoritative reference, see the Upgrading a Lustre File System
chapter of the Lustre Operations Manual.


__TOC__
=== Interoperability Rules ===
This section provides information about supported upgrades, upgrade paths, and interoperability of nodes with different versions of Lustre™ installed. It also describes procedures for upgrading your Lustre file system to a new version of Lustre. For information about available releases, see [[Lustre_Release_Information|Lustre Release Information]].


== Supported Upgrades ==
{| class="wikitable"
|-
! Upgrade Type !! Servers !! Clients
|-
| Major (2.x → 2.y) || All servers must be upgraded together || Clients may be upgraded independently
|-
| Minor (2.x.y → 2.x.z) || All servers upgraded together, or rolling upgrade || Clients may be upgraded independently
|}


For Lustre 1.8.x, the following upgrades are supported:
'''Key rule:''' All servers (MGS, MDS, OSS) must run the same major
* Lustre 1.6.x (latest version) to Lustre 1.8.x (latest version).
Lustre version. Clients have more flexibility — older clients can
* Lustre 1.8.x (any minor version) to Lustre 1.8.x (latest version).
generally connect to newer servers (check Release Notes for specific
interoperability).


=== Lustre Component Interoperability ===
=== Major Release Upgrade (2.x → 2.y) ===


Lustre interoperability enables 1.8.x servers ("new" servers) to work with 1.6.x clients ("old" clients), 1.6.x servers ("old" servers) to work with 1.8.x clients ("new" clients), and "mixed" environments with both 1.6.x and 1.8.x servers. For
This procedure requires stopping the entire filesystem. Plan for
example, half of each OSS failover pair could be upgraded to enable a quick reversion to 1.6 by powering down the 1.8 servers.
downtime.


The table below describes the interoperability between clients, OSTs, and MDTs with different versions of Lustre installed.
==== Pre-Upgrade Checklist ====


{| border="1" cellspacing=0 cellpadding="10"
* [ ] Back up the filesystem. At minimum, create a '''device-level backup of ALL MDTs''' — the MDT is the most critical component.
! Lustre Component !! Interoperability with Other Lustre Components
* [ ] Review the Release Notes for the target version. Note any required kernel versions or distribution changes.
|-
* [ ] Document all persistent parameter settings (''lctl get_param -R'') — a writeconf during upgrade would erase them.
| rowspan="1" valign="top" | Clients
* [ ] Plan the OS upgrade path if the new Lustre version requires a newer kernel.
|
* Old, live clients can communicate with old, new, or a mix of servers.


* Old clients can start up using old, new, or a mix of servers.
==== Upgrade Procedure ====


* New clients can start up using old, new, or a mix of servers.
'''Step 1: Back up the filesystem.'''
'''''Note:''' Old clients cannot mount a file system that was created by a new MDT.
|-
| rowspan="1" valign="top" | OSTs
|
* Old OSTs can communicate with new clients/MDTs.
* New OSTs can only be started after the MGS has been started (typically after the MDT has been upgraded).
|-
| rowspan="1" valign="top" | MDTs
|
* An old MDT can communicate with new clients.
* A new co-located MGS/MDT can be started at any point.
* A new non-co-located MDT can be started after the MGS starts.
|}


== Upgrading Lustre 1.6.x to Lustre 1.8.x ==
Create a complete, restorable backup. If a full backup is not
Two Lustre upgrade paths are supported to meet the upgrade requirements of different Lustre environments.
practical, a device-level backup of each MDT is strongly recommended.


* ''Entire file system upgrade'' - All servers and clients are shut down and upgraded at the same time. See [[#Performing a Complete File System Upgrade|Performing a Complete File System Upgrade]].
'''Step 2: Shut down the filesystem.'''
* ''Rolling upgrade'' - Individual servers (or their failover partners) and clients are upgraded one at a time and restarted, so that the file system never goes down.  See [[#Performing a Rolling Upgrade|Performing a Rolling Upgrade]].


'''''Note:''''' If you upgrade some Lustre components to 1.8.x but not others (such as running 1.8 clients in a file system with 1.6 OSTs), and run a mixed environment, you may see one or more warnings similar to this:
Unmount in order: clients → MDTs → OSTs → MGT.


<pre>
# On all clients:
LustreError: 3877:0:(socklnd_cb.c:2228:ksocknal_recv_hello())
umount /mnt/lustre
Unknown protocol version (2.x expected) from 192.168.2.43
</pre>


This warning is given when the 1.6 and 1.8 components use different protocols. It
# On MDS:
can be safely ignored because the Lustre components negotiate a common protocol.
umount /mnt/mdt
In this example, the 1.8 clients fall back to use the 1.6 protocol with the 1.6 OSTs.


=== Performing a Complete File System Upgrade ===
# On each OSS:
This procedure describes a complete file system upgrade in which 1.8.x Lustre packages are installed on multiple 1.6.x servers and clients, requiring a file system shut down. If you want to upgrade one Lustre component at a time and avoid the shutdown, see [[#Performing a Rolling Upgrade|Performing a Rolling Upgrade]].
umount /mnt/ost*


'''''Tip:''''' In a Lustre upgrade, the package install and file system unmount steps are reversible; you can do either step first. To minimize downtime, this procedure first performs the 1.8.x package installation, and then unmounts the file system.
# On MGS (if separate):
umount /mnt/mgt


1. ''Make a complete, restorable file system backup before upgrading Lustre.''
'''Step 3: Upgrade the OS on servers.'''


2. ''Install the 1.8.x packages on the Lustre servers and/or clients.'' Some or all servers can be upgraded. Some or all clients can be upgraded. For help determining where to install a specific package, see [[Lustre Packages]].
Install a Linux distribution and kernel version compatible with the
target Lustre release (see Release Notes). Reboot all servers.


:a. ''Install the kernel, modules and ldiskfs packages.'' For example:
'''Step 4: Upgrade the OS on clients.'''


<pre>
Install a compatible Linux distribution and kernel. Reboot all
$ rpm -ivh
clients.
kernel-lustre-smp-<ver> \
kernel-ib-<ver> \
lustre-modules-<ver> \
lustre-ldiskfs-<ver>
</pre>


:b. ''Upgrade the utilities/userspace packages.'' For example:
'''Step 5: Install Lustre server packages on all servers.'''


<pre>
# On each server (MGS, MDS, OSS):
$ rpm -Uvh lustre-<ver>
yum --nogpgcheck install lustre-*.rpm kmod-lustre-*.rpm \
</pre>
    lustre-osd-ldiskfs-mount-*.rpm kmod-lustre-osd-ldiskfs-*.rpm \
    e2fsprogs-*.rpm


:c. ''If a new e2fsprogs package is available, upgrade it.'' For example:
# Verify:
rpm -qa | egrep "lustre|e2fsprogs"


<pre>
For ZFS backends, install the ZFS OSD packages instead of ldiskfs.
$ rpm -Uvh e2fsprogs-<ver>
</pre>


:There may or may not be a new ''e2fsprogs'' package with a Lustre upgrade. The ''e2fsprogs'' release schedule is independent of Lustre releases.
'''Step 6: Install Lustre client packages on all clients.'''


:d. (Optional) ''If you want to add optional packages to your Lustre system, install them now.''
# On each client:
yum --nogpgcheck install lustre-client-*.rpm kmod-lustre-client-*.rpm


3. ''Shut down the file system.'' Shut down the components in this order: clients, then the MDT, then OSTs. Unmounting a block device causes Lustre to be shut down on that node.
# Or for DKMS:
yum --nogpgcheck install lustre-client-*.rpm lustre-client-dkms-*.rpm


:a. Unmount the clients. On each client node, run:
# Verify:
rpm -qa | egrep "lustre|kernel"


<pre>
'''Step 7: (Optional) Enable new features while targets are unmounted.'''
umount <mount point>
</pre>


:b. Unmount the MDT. On the MDS node, run:
See [[#Optional Feature Enablement]] below.


<pre>
'''Step 8: Start the filesystem.'''
umount <mount point>
</pre>


:c. Unmount the OSTs (be sure to unmount all OSTs). On each OSS node, run:
Mount in order: MGT → MDT(s) → OST(s) → clients.


<pre>
# On MGS (or combined MGS/MDS):
umount <mount point>
mount -t lustre /dev/mgt_device /mnt/mgt
</pre>


4. ''Unload the old Lustre modules'' by either:
# On each MDS:
* Rebooting the node
mount -t lustre /dev/mdt_device /mnt/mdt
:- OR -
* Removing the Lustre modules manually. Run ''lustre_rmmod'' several times and use ''lsmod'' to check the currently loaded modules.


5. ''Start the upgraded file system.'' Start the components in this order: OSTs, then the MDT, then clients.
# On each OSS:
:a. ''Mount the OSTs'' (be sure to mount all OSTs). On each OSS node, run:
mount -t lustre /dev/ost_device /mnt/ost0


<pre>
# On each client:
mount -t lustre <block device name> <mount point>
mount -t lustre mgsnode@tcp:/fsname /mnt/lustre
</pre>


:b. ''Mount the MDT.'' On the MDS node, run:
'''Note:''' After a major upgrade, the mount order for the first
start is MGT → MDT → OST → clients. For normal subsequent starts,
the order is MGT → OST → MDT → clients.


<pre>
'''Step 9: (Optional) Enable post-mount features.'''
mount -t lustre <block device name> <mount point>
</pre>


:c. ''Mount the file system on the clients.'' On each client node, run:
Some features can only be enabled after targets are mounted. See
[[#Optional Feature Enablement]] below.


<pre>
'''Step 10: (Optional) Attach new MDTs into the namespace.'''
mount -t lustre <MGS node>&#58;/<fsname> <mount point>
</pre>


If you have a problem upgrading Lustre, contact us by [[Reporting Bugs|submitting a bug]] to our bug tracker [https://bugzilla.lustre.org/query.cgi Bugzilla].
If you added new MDTs in Step 7, create directories on them:


=== Performing a Rolling Upgrade ===
lfs mkdir -i <mdt_index> /mnt/lustre/new_directory
This procedure describes a rolling upgrade in which one Lustre component (server or client) is upgraded and restarted at a time while the file system is running. If you want to upgrade the complete Lustre file system or multiple components at a time, requiring a file system shutdown, see [[#Performing a Complete File System Upgrade|Performing a Complete File System Upgrade]].


----
'''Step 11: Verify the upgrade.'''


'''''Note:''''' If the Lustre component to be upgraded is an OSS in a failover pair, follow these special upgrade steps to minimize downtime:
# Check filesystem health:
lfs df /mnt/lustre
lctl get_param health_check


1. ''Fail over the server to its peer server'', so the file system remains available.
# Check version:
lctl get_param version


2. ''Install the Lustre 1.8.x packages on the idle server.''
=== Minor Release Upgrade (2.x.y → 2.x.z) ===


3. ''Unload the old Lustre modules on the idle server'' by either:
Minor releases support rolling upgrades — you can upgrade servers
:* Rebooting the node.
and clients one at a time without shutting down the filesystem.
:- OR -
:* Removing the Lustre modules manually by running the ''lustre_rmmod'' command several times and checking the currently loaded modules with the ''lsmod'' command.


4. ''Fail back services to the now upgraded server.''
==== Rolling Upgrade Procedure ====


5. ''Repeat Steps 1 to 4 on the peer server.'' This limits the outage (per OSS) to a single server for as long as it takes to fail over.
'''Step 1: Back up the filesystem''' (device-level MDT backup
recommended).


----
'''Step 2: Upgrade servers one at a time.'''
To perform a rolling upgrade:


1. ''Make a complete, restorable file system backup before upgrading Lustre.''
For each server (start with OSSs, then MDS, then MGS):


2. ''Install the 1.8.x packages on the Lustre component (server or client).'' For help determining where to install a specific package, see [[Lustre Packages]].
# If using HA: fail over the targets to the partner server
# Unmount the Lustre targets on this server
umount /mnt/ost*


:a. ''Install the kernel, modules and ''ldiskfs'' packages.'' For example:
# Install new packages
yum --nogpgcheck install lustre-*.rpm kmod-lustre-*.rpm ...


<pre>
# Remount (or fail back)
$ rpm -ivh
mount -t lustre /dev/ost_device /mnt/ost0
kernel-lustre-smp-<ver> \
kernel-ib-<ver> \
lustre-modules-<ver> \
lustre-ldiskfs-<ver>
</pre>


:b. ''Upgrade the utilities/userspace packages.'' For example:
'''Step 3: Upgrade clients one at a time.'''


<pre>
For each client:
$ rpm -Uvh lustre-<ver>
</pre>


:c. ''If a new ''e2fsprogs'' package is available, upgrade it.'' For example:
umount /mnt/lustre
yum --nogpgcheck install lustre-client-*.rpm kmod-lustre-client-*.rpm
mount -t lustre mgsnode@tcp:/fsname /mnt/lustre


<pre>
=== Optional Feature Enablement ===
$ rpm -Uvh e2fsprogs-<ver>
</pre>


There may or may not be a new ''e2fsprogs'' package with a Lustre upgrade. The ''e2fsprogs'' release schedule is independent of Lustre releases.
These features can be enabled during an upgrade. Each is optional
and some are '''irreversible''' (prevent downgrade to older versions).


:d. (''Optional) If you want to add optional packages to your Lustre system, install them now.''
{| class="wikitable"
 
|-
3. ''Unload the old Lustre modules'' by either:
! Feature !! Since Version !! When to Enable !! Command !! Reversible?
:* Rebooting the node
|-
:- OR -
| '''Project quotas'''
:* Removing the Lustre modules manually. Run ''lustre_rmmod'' several times and use ''lsmod'' to check the currently-loaded modules.
| 2.10
 
| While target is unmounted (Step 7)
4. ''If the upgraded component is a server, fail back services to the new server.''
| <code>tune2fs -O project /dev/target_device</code>
 
| '''No''' — prevents use by older ldiskfs
If you have a problem upgrading Lustre, contact us via the [https://bugzilla.lustre.org/query.cgi Bugzilla] bug tracker.
|-
| '''Wide striping (ea_inode)'''
| 2.13
| While MDT is unmounted (Step 7)
| <code>tune2fs -O ea_inode /dev/mdt_device</code>
| Yes
|-
| '''index_in_idif'''
| 2.7
| After OST is mounted (Step 9)
| <code>lctl set_param osd-ldiskfs.*.osd_index_in_idif=1</code>
| '''No''' — prevents use by older Lustre
|-
| '''DNE (additional MDTs)'''
| 2.4
| While new MDT device is unmounted (Step 7)
| <code>mkfs.lustre --reformat --fsname=FS --mdt --mgsnode=MGS --index=N /dev/device</code>
| N/A
|-
| '''Striped directories'''
| 2.8
| After MDTs are mounted (Step 10)
| <code>lfs mkdir -c 2 /mnt/lustre/striped_dir</code>
| N/A
|-
| '''Auto-distribute subdirs'''
| 2.13
| After MDTs are mounted (Step 10)
| <code>lfs setdirstripe -D -c 1 -i -1 /mnt/lustre/dir</code>
| N/A
|}


== Upgrading Lustre 1.8.x to the Next Minor Version ==
'''Warning:''' Enabling ''project quotas'' or ''index_in_idif'' is a
one-way operation. Once enabled, the target cannot be used by older
Lustre versions. Only enable these if you are certain you will not
need to downgrade.


To upgrade Lustre 1.8.x to the next minor version, for example, Lustre 1.8.0.1 > 1.8.x,
=== Version-Specific Notes ===
follow these procedures:
* To upgrade the complete file system or multiple file system components at the same time, requiring a file system shutdown, see [[#Performing_a_Complete_File_System_Upgrade|Performing a Complete File System Upgrade]]
* To upgrade one Lustre component (server or client) at a time, while the file system is running, see [[#Performing_a_Rolling_Upgrade|Performing a Rolling Upgrade]]


== Downgrading from Lustre 1.8.x ==
* '''Lustre 2.15:''' If no default directory layout is set on the root directory, the MDS automatically configures round-robin distribution across all MDTs for new subdirectories.
For Lustre 1.8.x, the following downgrades are supported:
* '''Lustre 2.13+:''' <code>lfs setdirstripe -D</code> can automatically distribute new subdirectories to less-full MDTs.
* If you upgraded from Lustre 1.6.x > 1.8.x, you can downgrade to version 1.6.x.
* '''Pre-2.4 clients:''' Cannot access directories on MDTs other than MDT0. Accessing such directories returns an I/O error.
* If you upgraded from one minor version to the next (for example, Lustre 1.8.0 > 1.8.x), you can downgrade to the earlier minor version.
* '''Client kernel version:''' The kernel running on the client must match the version expected by the <code>lustre-client-modules</code> package.


For a procedure to downgrade from Lustre 1.8.x to Lustre 1.6.x, see [http://wiki.lustre.org/manual/LustreManual18_HTML/UpgradingLustre.html#50651255_38760 Section 13.5: ''Downgrading from Lustre 1.8.x to Lustre 1.6.x''] in the [http://wiki.lustre.org/manual/LustreManual18_HTML/index.html ''Lustre Operations Manual''].
=== See Also ===


'''''Caution:''''' A new installation of Lustre 1.8.x is not guaranteed to be downgradable to an earlier Lustre version.
* [[Lustre Release Information]] — Current and past releases
* [[Release Terminology]] — Version numbering scheme
* [[Simplified Interoperability]] — Interoperability design details
* [[Lustre Common Mistakes]] — Pitfalls to avoid during upgrades

Latest revision as of 07:55, 6 July 2026

Upgrading to a New Version of Lustre

This page covers upgrade procedures for Lustre 2.x filesystems. For the authoritative reference, see the Upgrading a Lustre File System chapter of the Lustre Operations Manual.

Interoperability Rules

Upgrade Type Servers Clients
Major (2.x → 2.y) All servers must be upgraded together Clients may be upgraded independently
Minor (2.x.y → 2.x.z) All servers upgraded together, or rolling upgrade Clients may be upgraded independently

Key rule: All servers (MGS, MDS, OSS) must run the same major Lustre version. Clients have more flexibility — older clients can generally connect to newer servers (check Release Notes for specific interoperability).

Major Release Upgrade (2.x → 2.y)

This procedure requires stopping the entire filesystem. Plan for downtime.

Pre-Upgrade Checklist

  • [ ] Back up the filesystem. At minimum, create a device-level backup of ALL MDTs — the MDT is the most critical component.
  • [ ] Review the Release Notes for the target version. Note any required kernel versions or distribution changes.
  • [ ] Document all persistent parameter settings (lctl get_param -R) — a writeconf during upgrade would erase them.
  • [ ] Plan the OS upgrade path if the new Lustre version requires a newer kernel.

Upgrade Procedure

Step 1: Back up the filesystem.

Create a complete, restorable backup. If a full backup is not practical, a device-level backup of each MDT is strongly recommended.

Step 2: Shut down the filesystem.

Unmount in order: clients → MDTs → OSTs → MGT.

# On all clients:
umount /mnt/lustre
# On MDS:
umount /mnt/mdt
# On each OSS:
umount /mnt/ost*
# On MGS (if separate):
umount /mnt/mgt

Step 3: Upgrade the OS on servers.

Install a Linux distribution and kernel version compatible with the target Lustre release (see Release Notes). Reboot all servers.

Step 4: Upgrade the OS on clients.

Install a compatible Linux distribution and kernel. Reboot all clients.

Step 5: Install Lustre server packages on all servers.

# On each server (MGS, MDS, OSS):
yum --nogpgcheck install lustre-*.rpm kmod-lustre-*.rpm \
    lustre-osd-ldiskfs-mount-*.rpm kmod-lustre-osd-ldiskfs-*.rpm \
    e2fsprogs-*.rpm
# Verify:
rpm -qa | egrep "lustre|e2fsprogs"

For ZFS backends, install the ZFS OSD packages instead of ldiskfs.

Step 6: Install Lustre client packages on all clients.

# On each client:
yum --nogpgcheck install lustre-client-*.rpm kmod-lustre-client-*.rpm
# Or for DKMS:
yum --nogpgcheck install lustre-client-*.rpm lustre-client-dkms-*.rpm
# Verify:
rpm -qa | egrep "lustre|kernel"

Step 7: (Optional) Enable new features while targets are unmounted.

See #Optional Feature Enablement below.

Step 8: Start the filesystem.

Mount in order: MGT → MDT(s) → OST(s) → clients.

# On MGS (or combined MGS/MDS):
mount -t lustre /dev/mgt_device /mnt/mgt
# On each MDS:
mount -t lustre /dev/mdt_device /mnt/mdt
# On each OSS:
mount -t lustre /dev/ost_device /mnt/ost0
# On each client:
mount -t lustre mgsnode@tcp:/fsname /mnt/lustre

Note: After a major upgrade, the mount order for the first start is MGT → MDT → OST → clients. For normal subsequent starts, the order is MGT → OST → MDT → clients.

Step 9: (Optional) Enable post-mount features.

Some features can only be enabled after targets are mounted. See #Optional Feature Enablement below.

Step 10: (Optional) Attach new MDTs into the namespace.

If you added new MDTs in Step 7, create directories on them:

lfs mkdir -i <mdt_index> /mnt/lustre/new_directory

Step 11: Verify the upgrade.

# Check filesystem health:
lfs df /mnt/lustre
lctl get_param health_check
# Check version:
lctl get_param version

Minor Release Upgrade (2.x.y → 2.x.z)

Minor releases support rolling upgrades — you can upgrade servers and clients one at a time without shutting down the filesystem.

Rolling Upgrade Procedure

Step 1: Back up the filesystem (device-level MDT backup recommended).

Step 2: Upgrade servers one at a time.

For each server (start with OSSs, then MDS, then MGS):

# If using HA: fail over the targets to the partner server
# Unmount the Lustre targets on this server
umount /mnt/ost*
# Install new packages
yum --nogpgcheck install lustre-*.rpm kmod-lustre-*.rpm ...
# Remount (or fail back)
mount -t lustre /dev/ost_device /mnt/ost0

Step 3: Upgrade clients one at a time.

For each client:

umount /mnt/lustre
yum --nogpgcheck install lustre-client-*.rpm kmod-lustre-client-*.rpm
mount -t lustre mgsnode@tcp:/fsname /mnt/lustre

Optional Feature Enablement

These features can be enabled during an upgrade. Each is optional and some are irreversible (prevent downgrade to older versions).

Feature Since Version When to Enable Command Reversible?
Project quotas 2.10 While target is unmounted (Step 7) tune2fs -O project /dev/target_device No — prevents use by older ldiskfs
Wide striping (ea_inode) 2.13 While MDT is unmounted (Step 7) tune2fs -O ea_inode /dev/mdt_device Yes
index_in_idif 2.7 After OST is mounted (Step 9) lctl set_param osd-ldiskfs.*.osd_index_in_idif=1 No — prevents use by older Lustre
DNE (additional MDTs) 2.4 While new MDT device is unmounted (Step 7) mkfs.lustre --reformat --fsname=FS --mdt --mgsnode=MGS --index=N /dev/device N/A
Striped directories 2.8 After MDTs are mounted (Step 10) lfs mkdir -c 2 /mnt/lustre/striped_dir N/A
Auto-distribute subdirs 2.13 After MDTs are mounted (Step 10) lfs setdirstripe -D -c 1 -i -1 /mnt/lustre/dir N/A

Warning: Enabling project quotas or index_in_idif is a one-way operation. Once enabled, the target cannot be used by older Lustre versions. Only enable these if you are certain you will not need to downgrade.

Version-Specific Notes

  • Lustre 2.15: If no default directory layout is set on the root directory, the MDS automatically configures round-robin distribution across all MDTs for new subdirectories.
  • Lustre 2.13+: lfs setdirstripe -D can automatically distribute new subdirectories to less-full MDTs.
  • Pre-2.4 clients: Cannot access directories on MDTs other than MDT0. Accessing such directories returns an I/O error.
  • Client kernel version: The kernel running on the client must match the version expected by the lustre-client-modules package.

See Also