X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=LustreMaintenance.xml;h=271d1b38e27affce1a0344050720cd97f57875aa;hb=30dbf01c7386a9514d618281526d78fdea92db6b;hp=4ce9c39c46e558be6c3a7024017fe35cee7ae3f6;hpb=e53f9a41cf658c4131162c87279c7380715f0634;p=doc%2Fmanual.git diff --git a/LustreMaintenance.xml b/LustreMaintenance.xml index 4ce9c39..271d1b3 100644 --- a/LustreMaintenance.xml +++ b/LustreMaintenance.xml @@ -1,63 +1,69 @@ - + Lustre Maintenance Once you have the Lustre file system up and running, you can use the procedures in this section to perform these basic Lustre maintenance tasks: - + - + - + - + - + - + - + - + - + - \ + - + - + - + - + - + - + - + - + + + + + + + -
+
<indexterm><primary>maintenance</primary></indexterm> <indexterm><primary>maintenance</primary><secondary>inactive OSTs</secondary></indexterm> @@ -74,7 +80,7 @@ <literal>exclude=testfs-OST0000:testfs-OST0001</literal>.</para> </note> </section> - <section xml:id="dbdoclet.50438199_15240"> + <section xml:id="lustremaint.findingNodes"> <title><indexterm><primary>maintenance</primary><secondary>finding nodes</secondary></indexterm> Finding Nodes in the Lustre File System There may be situations in which you need to find all nodes in @@ -105,7 +111,7 @@ Finding Nodes in the Lustre File System 0: testfs-OST0000_UUID ACTIVE 1: testfs-OST0001_UUID ACTIVE
-
+
<indexterm><primary>maintenance</primary><secondary>mounting a server</secondary></indexterm> Mounting a Server Without Lustre Service If you are using a combined MGS/MDT, but you only want to start the MGS and not the MDT, run this command: @@ -114,13 +120,15 @@ Mounting a Server Without Lustre Service In this example, the combined MGS/MDT is testfs-MDT0000 and the mount point is /mnt/test/mdt. $ mount -t lustre -L testfs-MDT0000 -o nosvc /mnt/test/mdt
-
+
<indexterm><primary>maintenance</primary><secondary>regenerating config logs</secondary></indexterm> Regenerating Lustre Configuration Logs - If the Lustre file system configuration logs are in a state where the file system cannot - be started, use the writeconf command to erase them. After the - writeconf command is run and the servers restart, the configuration logs - are re-generated and stored on the MGS (as in a new file system). + If the Lustre file system configuration logs are in a state where + the file system cannot be started, use the + tunefs.lustre --writeconf command to regenerate them. + After the writeconf command is run and the servers + restart, the configuration logs are re-generated and stored on the MGS + (as with a new file system). You should only use the writeconf command if: @@ -130,82 +138,84 @@ Regenerating Lustre Configuration Logs A server NID is being changed - The writeconf command is destructive to some configuration items (i.e., OST pools information and items set via conf_param), and should be used with caution. To avoid problems: - - - Shut down the file system before running the writeconf command - - - Run the writeconf command on all servers (MDT first, then OSTs) - - - Start the file system in this order: - - - MGS (or the combined MGS/MDT) - - - MDT - - - OSTs - - - Lustre clients - - - - + The writeconf command is destructive to some + configuration items (e.g. OST pools information and tunables set via + conf_param), and should be used with caution. - The OST pools feature enables a group of OSTs to be named for file striping purposes. If you use OST pools, be aware that running the writeconf command erases all pools information (as well as any other parameters set via lctl conf_param). We recommend that the pools definitions (and conf_param settings) be executed via a script, so they can be reproduced easily after a writeconf is performed. + The OST pools feature enables a group of OSTs to be named for + file striping purposes. If you use OST pools, be aware that running + the writeconf command erases + all pools information (as well as + any other parameters set via lctl conf_param). + We recommend that the pools definitions (and + conf_param settings) be executed via a script, + so they can be regenerated easily after writeconf + is performed. However, tunables saved with lctl set_param + -P are not erased in this case. + + If the MGS still holds any configuration logs, it may be + possible to dump these logs to save any parameters stored with + lctl conf_param by dumping the config logs on + the MGS and saving the output: + +mgs# lctl --device MGS llog_print fsname-client +mgs# lctl --device MGS llog_print fsname-MDT0000 +mgs# lctl --device MGS llog_print fsname-OST0000 + + To regenerate Lustre file system configuration logs: - Shut down the file system in this order. + Stop the file system services in the following order before + running the tunefs.lustre --writeconf command: + Unmount the clients. - Unmount the MDT. + Unmount the MDT(s). - Unmount all OSTs. + Unmount the OST(s). + + + If the MGS is separate from the MDT it can remain mounted + during this process. - Make sure the the MDT and OST devices are available. + Make sure the MDT and OST devices are available. - Run the writeconf command on all servers. - Run writeconf on the MDT first, and then the OSTs. + Run the tunefs.lustre --writeconf command + on all target devices. + Run writeconf on the MDT(s) first, and then the OST(s). - On the MDT, run: - mdt# tunefs.lustre --writeconf /dev/mdt_device + On each MDS, for each MDT run: + mds# tunefs.lustre --writeconf /dev/mdt_device - - On each OST, run: - - ost# tunefs.lustre --writeconf /dev/ost_device + On each OSS, for each OST run: + oss# tunefs.lustre --writeconf /dev/ost_device - Restart the file system in this order. + Restart the file system in the following order: - Mount the MGS (or the combined MGS/MDT). + Mount the separate MGT, if it is not already mounted. - Mount the MDT. + Mount the MDT(s) in order, starting with MDT0000. - Mount the OSTs. + Mount the OSTs in order, starting with OST0000. Mount the clients. @@ -213,9 +223,11 @@ Regenerating Lustre Configuration Logs - After the writeconf command is run, the configuration logs are re-generated as servers restart. + After the tunefs.lustre --writeconf command is + run, the configuration logs are re-generated as servers connect to the + MGS.
-
+
<indexterm><primary>maintenance</primary><secondary>changing a NID</secondary></indexterm> Changing a Server NID In Lustre software release 2.3 or earlier, the tunefs.lustre @@ -242,7 +254,7 @@ Changing a Server NID To change a server NID: - Update the LNET configuration in the /etc/modprobe.conf file so the list of server NIDs is correct. Use lctl list_nids to view the list of server NIDS. + Update the LNet configuration in the /etc/modprobe.conf file so the list of server NIDs is correct. Use lctl list_nids to view the list of server NIDS. The lctl list_nids command indicates which network(s) are configured to work with the Lustre file system. @@ -281,7 +293,58 @@ Changing a Server NID The previous configuration log is backed up on the MGS disk with the suffix '.bak'.
-
+
+ <indexterm> + <primary>maintenance</primary> + <secondary>Clearing a config</secondary> + </indexterm> Clearing configuration + + This command runs on MGS node having the MGS device mounted with + -o nosvc. It cleans up configuration files + stored in the CONFIGS/ directory of any records marked SKIP. + If the device name is given, then the specific logs for that + filesystem (e.g. testfs-MDT0000) are processed. Otherwise, if a + filesystem name is given then all configuration files are cleared. + The previous configuration log is backed up on the MGS disk with + the suffix 'config.timestamp.bak'. Eg: Lustre-MDT0000-1476454535.bak. + + To clear a configuration: + + + Shut down the file system in this order: + + + Unmount the clients. + + + Unmount the MDT. + + + Unmount all OSTs. + + + + + + If the MGS and MDS share a partition, start the MGS only + using "nosvc" option. + + mount -t lustre MDT partition -o nosvc mount_point + + + Run the clear_conf command on the MGS: + + lctl clear_conf config + + Example: To clear the configuration for + MDT0000 on a filesystem named + testfs + + mgs# lctl clear_conf testfs-MDT0000 + + +
+
<indexterm> <primary>maintenance</primary> <secondary>adding an MDT</secondary> @@ -334,137 +397,205 @@ client# lfs mkdir -c 4 /mnt/testfs/new_directory_striped_across_4_mdts </listitem> </orderedlist> </section> - <section xml:id="dbdoclet.50438199_22527"> + <section xml:id="lustremaint.adding_new_ost"> <title><indexterm><primary>maintenance</primary><secondary>adding a OST</secondary></indexterm> Adding a New OST to a Lustre File System - To add an OST to existing Lustre file system: + A new OST can be added to existing Lustre file system on either + an existing OSS node or on a new OSS node. In order to keep client IO + load balanced across OSS nodes for maximum aggregate performance, it is + not recommended to configure different numbers of OSTs to each OSS node. + - Add a new OST by passing on the following commands, run: - oss# mkfs.lustre --fsname=spfs --mgsnode=mds16@tcp0 --ost --index=12 /dev/sda -oss# mkdir -p /mnt/test/ost12 -oss# mount -t lustre /dev/sda /mnt/test/ost12 - - - Migrate the data (possibly). - The file system is quite unbalanced when new empty OSTs are added. New file creations are automatically balanced. If this is a scratch file system or files are pruned at a regular interval, then no further work may be needed. - New files being created will preferentially be placed on the empty OST. As old files are deleted, they will release space on the old OST. - Files existing prior to the expansion can optionally be rebalanced with an in-place copy, which can be done with a simple script. The basic method is to copy existing files to a temporary file, then move the temp file over the old one. This should not be attempted with files which are currently being written to by users or applications. This operation redistributes the stripes over the entire set of OSTs. - For example, to rebalance all files within /mnt/lustre/dir, enter: - client# lfs_migrate /mnt/lustre/file - To migrate files within the /test file system on - OST0004 that are larger than 4GB in size, enter: - client# lfs find /test -obd test-OST0004 -size +4G | lfs_migrate -y - See for more details. + Add a new OST by using mkfs.lustre as when + the filesystem was first formatted, see + for details. Each new OST + must have a unique index number, use lctl dl to + see a list of all OSTs. For example, to add a new OST at index 12 + to the testfs filesystem run following commands + should be run on the OSS: + oss# mkfs.lustre --fsname=testfs --mgsnode=mds16@tcp0 --ost --index=12 /dev/sda +oss# mkdir -p /mnt/testfs/ost12 +oss# mount -t lustre /dev/sda /mnt/testfs/ost12 + + + Balance OST space usage (possibly). + The file system can be quite unbalanced when new empty OSTs + are added to a relatively full filesystem. New file creations are + automatically balanced to favour the new OSTs. If this is a scratch + file system or files are pruned at regular intervals, then no further + work may be needed to balance the OST space usage as new files being + created will preferentially be placed on the less full OST(s). As old + files are deleted, they will release space on the old OST(s). + Files existing prior to the expansion can optionally be + rebalanced using the lfs_migrate utility. + This redistributes file data over the entire set of OSTs. + For example, to rebalance all files within the directory + /mnt/lustre/dir, enter: + client# lfs_migrate /mnt/lustre/dir + To migrate files within the /test file + system on OST0004 that are larger than 4GB in + size to other OSTs, enter: + client# lfs find /test --ost test-OST0004 -size +4G | lfs_migrate -y + See for details.
-
- <indexterm><primary>maintenance</primary><secondary>restoring a OST</secondary></indexterm> - <indexterm><primary>maintenance</primary><secondary>removing a OST</secondary></indexterm> -Removing and Restoring OSTs - OSTs can be removed from and restored to a Lustre file system. Removing a OST means the - OST is deactivated in the file system, not permanently - removed. - A removed OST still appears in the file system; do not create a new OST with the same name. - You may want to remove (deactivate) an OST and prevent new files from being written to it in several situations: +
+ <indexterm><primary>maintenance</primary><secondary>restoring an OST</secondary></indexterm> + <indexterm><primary>maintenance</primary><secondary>removing an OST</secondary></indexterm> +Removing and Restoring MDTs and OSTs + OSTs and DNE MDTs can be removed from and restored to a Lustre + filesystem. Deactivating an OST means that it is temporarily or + permanently marked unavailable. Deactivating an OST on the MDS means + it will not try to allocate new objects there or perform OST recovery, + while deactivating an OST the client means it will not wait for OST + recovery if it cannot contact the OST and will instead return an IO + error to the application immediately if files on the OST are accessed. + An OST may be permanently deactivated from the file system, + depending on the situation and commands used. + A permanently deactivated MDT or OST still appears in the + filesystem configuration until the configuration is regenerated with + writeconf or it is replaced with a new MDT or OST + at the same index and permanently reactivated. A deactivated OST + will not be listed by lfs df. + + You may want to temporarily deactivate an OST on the MDS to + prevent new files from being written to it in several situations: - Hard drive has failed and a RAID resync/rebuild is underway + A hard drive has failed and a RAID resync/rebuild is underway, + though the OST can also be marked degraded by + the RAID system to avoid allocating new files on the slow OST which + can reduce performance, see + for more details. + - OST is nearing its space capacity + OST is nearing its space capacity, though the MDS will already + try to avoid allocating new files on overly-full OSTs if possible, + see for details. + - OST storage has failed permanently - + MDT/OST storage or MDS/OSS node has failed, and will not + be available for some time (or forever), but there is still a + desire to continue using the filesystem before it is repaired. + -
- <indexterm><primary>maintenance</primary><secondary>removing a MDT</secondary></indexterm>Removing a MDT from the File System - If the MDT is permanently inaccessible, lfs rmdir {directory} can be used to delete the directory entry. A normal rmdir will report an IO error due to the remote MDT being inactive. After the remote directory has been removed, the administrator should mark the MDT as permanently inactive with: -lctl conf_param {MDT name}.mdc.active=0 - -A user can identify which MDT holds a remote sub-directory using -the lfs utility. For example: -client$ lfs getstripe -M /mnt/lustre/remote_dir1 +
+ <indexterm><primary>maintenance</primary><secondary>removing an MDT</secondary></indexterm>Removing an MDT from the File System + If the MDT is permanently inaccessible, + lfs rm_entry {directory} can be used to delete the + directory entry for the unavailable MDT. Using rmdir + would otherwise report an IO error due to the remote MDT being inactive. + Please note that if the MDT is available, standard + rm -r should be used to delete the remote directory. + After the remote directory has been removed, the administrator should + mark the MDT as permanently inactive with: + lctl conf_param {MDT name}.mdc.active=0 + A user can identify which MDT holds a remote sub-directory using + the lfs utility. For example: +client$ lfs getstripe --mdt-index /mnt/lustre/remote_dir1 1 client$ mkdir /mnt/lustre/local_dir0 -client$ lfs getstripe -M /mnt/lustre/local_dir0 +client$ lfs getstripe --mdt-index /mnt/lustre/local_dir0 0 - The getstripe [--mdt-index|-M] parameters return - the index of the MDT that is serving the given directory. -
-
+ The lfs getstripe --mdt-index command + returns the index of the MDT that is serving the given directory. +
+
<indexterm><primary>maintenance</primary></indexterm> <indexterm><primary>maintenance</primary><secondary>inactive MDTs</secondary></indexterm>Working with Inactive MDTs - Files located on or below an inactive MDT are inaccessible until the MDT is activated again. Clients accessing an inactive MDT will receive an EIO error.
-
+ Files located on or below an inactive MDT are inaccessible until + the MDT is activated again. Clients accessing an inactive MDT will receive + an EIO error. +
+
<indexterm> <primary>maintenance</primary> - <secondary>removing a OST</secondary> - </indexterm> Removing an OST from the File System - When removing an OST, remember that the MDT does not communicate directly with OSTs. - Rather, each OST has a corresponding OSC which communicates with the MDT. It is necessary to - determine the device number of the OSC that corresponds to the OST. Then, you use this - device number to deactivate the OSC on the MDT. - To remove an OST from the file system: + removing an OST + Removing an OST from the File System + When deactivating an OST, note that the client and MDS each have + an OSC device that handles communication with the corresponding OST. + To remove an OST from the file system: - For the OST to be removed, determine the device number of the corresponding OSC on - the MDT. + If the OST is functional, and there are files located on + the OST that need to be migrated off of the OST, the file creation + for that OST should be temporarily deactivated on the MDS (each MDS + if running with multiple MDS nodes in DNE mode). + - List all OSCs on the node, along with their device numbers. Run: - lctl dl | grep osc - For example: lctl dl | grep - 11 UP osc testfs-OST-0000-osc-cac94211 4ea5b30f-6a8e-55a0-7519-2f20318ebdb4 5 -12 UP osc testfs-OST-0001-osc-cac94211 4ea5b30f-6a8e-55a0-7519-2f20318ebdb4 5 -13 IN osc testfs-OST-0000-osc testfs-MDT0000-mdtlov_UUID 5 -14 UP osc testfs-OST-0001-osc testfs-MDT0000-mdtlov_UUID 5 + With Lustre 2.9 and later, the MDS should be + set to only disable file creation on that OST by setting + max_create_count to zero: + mds# lctl set_param osp.osc_name.max_create_count=0 + This ensures that files deleted or migrated off of the OST + will have their corresponding OST objects destroyed, and the space + will be freed. For example, to disable OST0000 + in the filesystem testfs, run: + mds# lctl set_param osp.testfs-OST0000-osc-MDT*.max_create_count=0 + on each MDS in the testfs filesystem. - Determine the device number of the OSC that corresponds to the OST to be - removed. + With older versions of Lustre, to deactivate the OSC on the + MDS node(s) use: + mds# lctl set_param osp.osc_name.active=0 + This will prevent the MDS from attempting any communication with + that OST, including destroying objects located thereon. This is + fine if the OST will be removed permanently, if the OST is not + stable in operation, or if it is in a read-only state. Otherwise, + the free space and objects on the OST will not decrease when + files are deleted, and object destruction will be deferred until + the MDS reconnects to the OST. + For example, to deactivate OST0000 in + the filesystem testfs, run: + mds# lctl set_param osp.testfs-OST0000-osc-MDT*.active=0 + Deactivating the OST on the MDS does not + prevent use of existing objects for read/write by a client. + + If migrating files from a working OST, do not deactivate + the OST on clients. This causes IO errors when accessing files + located there, and migrating files on the OST would fail. + + + Do not use lctl conf_param to + deactivate the OST if it is still working, as this immediately + and permanently deactivates it in the file system configuration + on both the MDS and all clients. + - Temporarily deactivate the OSC on the MDT. On the MDT, run: - mds# lctl --device lustre_devno deactivate - For example, based on the command output in Step 1, to deactivate device 13 (the - MDT’s OSC for OST-0000), the command would be: - mds# lctl --device 13 deactivate - This marks the OST as inactive on the MDS, so no new objects are assigned to the - OST. This does not prevent use of existing objects for reads or writes. - - Do not deactivate the OST on the clients. Do so causes errors (EIOs), and the copy - out to fail. - - - Do not use lctl conf_param to deactivate the OST. It - permanently sets a parameter in the file system configuration. - - - - Discover all files that have objects residing on the deactivated OST. - Depending on whether the deactivated OST is available or not, the data from that OST - may be migrated to other OSTs, or may need to be restored from backup. + Discover all files that have objects residing on the + deactivated OST. Depending on whether the deactivated OST is + available or not, the data from that OST may be migrated to + other OSTs, or may need to be restored from backup. - If the OST is still online and available, find all files with objects on the - deactivated OST, and copy them to other OSTs in the file system to: - client# lfs find --obd ost_name /mount/point | lfs_migrate -y + If the OST is still online and available, find all + files with objects on the deactivated OST, and copy them + to other OSTs in the file system to: + client# lfs find --ost ost_name /mount/point | lfs_migrate -y + Note that if multiple OSTs are being deactivated at one + time, the lfs find command can take multiple + --ost arguments, and will return files that + are located on any of the specified OSTs. + - If the OST is no longer available, delete the files on that OST and restore them - from backup: - client# lfs find --obd ost_uuid -print0 /mount/point | \ - tee /tmp/files_to_restore | xargs -0 -n 1 unlink - The list of files that need to be restored from backup is stored in - /tmp/files_to_restore. Restoring these files is beyond the - scope of this document. + If the OST is no longer available, delete the files + on that OST and restore them from backup: + client# lfs find --ost ost_uuid -print0 /mount/point | + tee /tmp/files_to_restore | xargs -0 -n 1 unlink + The list of files that need to be restored from backup is + stored in /tmp/files_to_restore. Restoring + these files is beyond the scope of this document. @@ -473,30 +604,32 @@ client$ lfs getstripe -M /mnt/lustre/local_dir0 - If there is expected to be a replacement OST in some short - time (a few days), the OST can temporarily be deactivated on - the clients using: + If there is expected to be a replacement OST in some short + time (a few days), the OST can temporarily be deactivated on + the clients using: client# lctl set_param osc.fsname-OSTnumber-*.active=0 - This setting is only temporary and will be reset - if the clients are remounted or rebooted. It needs to be run - on all clients. - + This setting is only temporary and will be reset + if the clients are remounted or rebooted. It needs to be run + on all clients. + + + + + If there is not expected to be a replacement for this OST in + the near future, permanently deactivate it on all clients and + the MDS by running the following command on the MGS: + mgs# lctl conf_param ost_name.osc.active=0 + A deactivated OST still appears in the file system + configuration, though a replacement OST can be created using the + mkfs.lustre --replace option, see + . + - If there is not expected to be a replacement for this OST in - the near future, permanently deactivate it on all clients and the MDS - by running the following command on the MGS: - mgs# lctl conf_param ost_name.osc.active=0 - - A deactivated OST still appears in the file system - configuration, though a new OST with the same name can be - created using the --replace option for - mkfs.lustre. -
-
+
<indexterm> <primary>maintenance</primary> <secondary>backing up OST config</secondary> @@ -505,17 +638,19 @@ client$ lfs getstripe -M /mnt/lustre/local_dir0 <primary>backup</primary> <secondary>OST config</secondary> </indexterm> Backing Up OST Configuration Files - If the OST device is still accessible, then the Lustre configuration files on the OST - should be backed up and saved for future use in order to avoid difficulties when a - replacement OST is returned to service. These files rarely change, so they can and should be - backed up while the OST is functional and accessible. If the deactivated OST is still - available to mount (i.e. has not permanently failed or is unmountable due to severe - corruption), an effort should be made to preserve these files. + If the OST device is still accessible, then the Lustre + configuration files on the OST should be backed up and saved for + future use in order to avoid difficulties when a replacement OST is + returned to service. These files rarely change, so they can and + should be backed up while the OST is functional and accessible. If + the deactivated OST is still available to mount (i.e. has not + permanently failed or is unmountable due to severe corruption), an + effort should be made to preserve these files. Mount the OST file system. oss# mkdir -p /mnt/ost -[oss]# mount -t ldiskfs /dev/ost_device /mnt/ost +oss# mount -t ldiskfs /dev/ost_device /mnt/ost @@ -530,7 +665,7 @@ client$ lfs getstripe -M /mnt/lustre/local_dir0
-
+
<indexterm> <primary>maintenance</primary> <secondary>restoring OST config</secondary> @@ -539,22 +674,36 @@ client$ lfs getstripe -M /mnt/lustre/local_dir0 <primary>backup</primary> <secondary>restoring OST config</secondary> </indexterm> Restoring OST Configuration Files - If the original OST is still available, it is best to follow the OST backup and restore - procedure given in either , or - and - . - To replace an OST that was removed from service due to corruption or hardware failure, - the file system needs to be formatted using mkfs.lustre, and the Lustre - file system configuration should be restored, if available. - If the OST configuration files were not backed up, due to the OST file system being - completely inaccessible, it is still possible to replace the failed OST with a new one at - the same OST index. + If the original OST is still available, it is best to follow the + OST backup and restore procedure given in either + , or + and + . + To replace an OST that was removed from service due to corruption + or hardware failure, the replacement OST needs to be formatted using + mkfs.lustre, and the Lustre file system configuration + should be restored, if available. Any objects stored on the OST will + be permanently lost, and files using the OST should be deleted and/or + restored from backup. + With Lustre 2.5 and later, it is possible to + replace an OST to the same index without restoring the configuration + files, using the --replace option at format time. + oss# mkfs.lustre --ost --reformat --replace --index=old_ost_index \ + other_options /dev/new_ost_dev + The MDS and OSS will negotiate the LAST_ID value + for the replacement OST. + + If the OST configuration files were not backed up, due to the + OST file system being completely inaccessible, it is still possible to + replace the failed OST with a new one at the same OST index. - Format the OST file system. - oss# mkfs.lustre --ost --index=old_ost_index other_options \ - /dev/new_ost_dev - + For older versions, format the OST file system without the + --replace option and restore the saved + configuration: + oss# mkfs.lustre --ost --reformat --index=old_ost_index \ + other_options /dev/new_ost_dev + Mount the OST file system. @@ -568,24 +717,27 @@ oss# mount -t ldiskfs /dev/new_ost_dev / Recreate the OST configuration files, if unavailable. - Follow the procedure in to recreate the - LAST_ID file for this OST index. The last_rcvd file will be recreated - when the OST is first mounted using the default parameters, which are normally correct - for all file systems. The CONFIGS/mountdata file is created by - mkfs.lustre at format time, but has flags set that request it to - register itself with the MGS. It is possible to copy these flags from another working - OST (which should be the same): - oss1# debugfs -c -R "dump CONFIGS/mountdata /tmp/ldd" /dev/other_osdev -oss1# scp /tmp/ldd oss0:/tmp/ldd -oss0# dd if=/tmp/ldd of=/mnt/ost/CONFIGS/mountdata bs=4 count=1 seek=5 skip=5 conv=notrunc - - - Unmount the OST file system. oss# umount /mnt/ost + Follow the procedure in + to recreate the LAST_ID + file for this OST index. The last_rcvd file + will be recreated when the OST is first mounted using the default + parameters, which are normally correct for all file systems. The + CONFIGS/mountdata file is created by + mkfs.lustre at format time, but has flags set + that request it to register itself with the MGS. It is possible to + copy the flags from another working OST (which should be the same): + oss1# debugfs -c -R "dump CONFIGS/mountdata /tmp" /dev/other_osdev +oss1# scp /tmp/mountdata oss0:/tmp/mountdata +oss0# dd if=/tmp/mountdata of=/mnt/ost/CONFIGS/mountdata bs=4 count=1 seek=5 skip=5 conv=notrunc + + + Unmount the OST file system. + oss# umount /mnt/ost
-
+
<indexterm> <primary>maintenance</primary> <secondary>reintroducing an OSTs</secondary> @@ -593,13 +745,13 @@ oss0# dd if=/tmp/ldd of=/mnt/ost/CONFIGS/mountdata bs=4 count=1 seek=5 skip=5 co <para>If the OST was permanently deactivated, it needs to be reactivated in the MGS configuration. <screen>mgs# lctl conf_param <replaceable>ost_name</replaceable>.osc.active=1</screen> - If the OST was temporarily deactivated, it needs to be reactivated on - the MDS and clients. - <screen>mds# lctl --device <replaceable>lustre_devno</replaceable> activate + If the OST was temporarily deactivated, it needs to be reactivated on + the MDS and clients. + <screen>mds# lctl set_param osp.<replaceable>fsname</replaceable>-OST<replaceable>number</replaceable>-*.active=1 client# lctl set_param osc.<replaceable>fsname</replaceable>-OST<replaceable>number</replaceable>-*.active=1</screen></para> </section> </section> - <section xml:id="dbdoclet.50438199_77819"> + <section xml:id="lustremaint.abortRecovery"> <title><indexterm><primary>maintenance</primary><secondary>aborting recovery</secondary></indexterm> <indexterm><primary>backup</primary><secondary>aborting recovery</secondary></indexterm> Aborting Recovery @@ -608,13 +760,13 @@ Aborting Recovery The recovery process is blocked until all OSTs are available.
-
+
<indexterm><primary>maintenance</primary><secondary>identifying OST host</secondary></indexterm> Determining Which Machine is Serving an OST In the course of administering a Lustre file system, you may need to determine which machine is serving a specific OST. It is not as simple as identifying the machine’s IP address, as IP is only one of several networking protocols that the Lustre software uses and, - as such, LNET does not use IP addresses as node identifiers, but NIDs instead. To identify the + as such, LNet does not use IP addresses as node identifiers, but NIDs instead. To identify the NID that is serving a specific OST, run one of the following commands on a client (you do not need to be a root user): client$ lctl get_param osc.fsname-OSTnumber*.ost_conn_uuid @@ -629,7 +781,7 @@ osc.testfs-OST0002-osc-f1579000.ost_conn_uuid=192.168.20.1@tcp osc.testfs-OST0003-osc-f1579000.ost_conn_uuid=192.168.20.1@tcp osc.testfs-OST0004-osc-f1579000.ost_conn_uuid=192.168.20.1@tcp
-
+
<indexterm><primary>maintenance</primary><secondary>changing failover node address</secondary></indexterm> Changing the Address of a Failover Node To change the address of a failover node (e.g, to use node X instead of node Y), run @@ -642,11 +794,15 @@ Changing the Address of a Failover Node --failnode options, see .
-
- <indexterm><primary>maintenance</primary><secondary>separate a combined MGS/MDT</secondary></indexterm> -Separate a combined MGS/MDT - These instructions assume the MGS node will be the same as the MDS node. For instructions on how to move MGS to a different node, see . - These instructions are for doing the split without shutting down other servers and clients. +
+ <indexterm><primary>maintenance</primary><secondary>separate a + combined MGS/MDT</secondary></indexterm> + Separate a combined MGS/MDT + These instructions assume the MGS node will be the same as the MDS + node. For instructions on how to move MGS to a different node, see + . + These instructions are for doing the split without shutting down + other servers and clients. Stop the MDS. @@ -664,7 +820,7 @@ Separate a combined MGS/MDT mds# cp -r /mdt_mount_point/CONFIGS/filesystem_name-* /mgs_mount_point/CONFIGS/. mds# umount /mgs_mount_point mds# umount /mdt_mount_point - See for alternative method. + See for alternative method. Start the MGS. @@ -684,4 +840,33 @@ Separate a combined MGS/MDT
+
+ <indexterm><primary>maintenance</primary> + <secondary>set an MDT to readonly</secondary></indexterm> + Set an MDT to read-only + It is sometimes desirable to be able to mark the filesystem + read-only directly on the server, rather than remounting the clients and + setting the option there. This can be useful if there is a rogue client + that is deleting files, or when decommissioning a system to prevent + already-mounted clients from modifying it anymore. + Set the mdt.*.readonly parameter to + 1 to immediately set the MDT to read-only. All future + MDT access will immediately return a "Read-only file system" error + (EROFS) until the parameter is set to + 0 again. + Example of setting the readonly parameter to + 1, verifying the current setting, accessing from a + client, and setting the parameter back to 0: + mds# lctl set_param mdt.fs-MDT0000.readonly=1 +mdt.fs-MDT0000.readonly=1 + +mds# lctl get_param mdt.fs-MDT0000.readonly +mdt.fs-MDT0000.readonly=1 + +client$ touch test_file +touch: cannot touch ‘test_file’: Read-only file system + +mds# lctl set_param mdt.fs-MDT0000.readonly=0 +mdt.fs-MDT0000.readonly=0 +