Spectrum H005G4 Exercises
Spectrum H005G4 Exercises
cover
Front cover
Course Exercises Guide
IBM Spectrum Scale Basic
Administration for Linux and AIX
Course code H005G ERC 4.0
May 2018 edition
Notices
This information was developed for products and services offered in the US.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative
for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not
intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or
service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate
and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this
document does not grant you any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive, MD-NC119
Armonk, NY 10504-1785
United States of America
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some jurisdictions do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein;
these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s)
and/or the program(s) described in this publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in any manner serve as an
endorsement of those websites. The materials at those websites are not part of the materials for this IBM product and use of those
websites is at your own risk.
IBM may use or distribute any of the information you provide in any way it believes appropriate without incurring any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other
publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other
claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those
products.
This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible,
the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to
actual people or business enterprises is entirely coincidental.
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., registered in many
jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM
trademarks is available on the web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml.
© Copyright International Business Machines Corporation 2014, 2018.
This document may not be reproduced in whole or in part without the prior written permission of IBM.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
V11.3
Contents
TOC
Contents
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
Exercises description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
TMK
Trademarks
The reader should recognize that the following terms, which appear in the content of this training
document, are official trademarks of IBM or other companies:
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide.
The following are trademarks of International Business Machines Corporation, registered in many
jurisdictions worldwide:
AIX® BigInsights® Express®
GPFS™ IBM Elastic Storage™ IBM FlashSystem®
IBM Spectrum Accelerate™ IBM Spectrum Archive™ IBM Spectrum Control™
IBM Spectrum Protect™ IBM Spectrum Scale™ IBM Spectrum Storage™
IBM Spectrum Virtualize™ IBM Spectrum™ InfoSphere®
Linear Tape File System™ Passport Advantage® Power Systems™
Power® POWER8® Redbooks®
Storwize® System Storage® Tivoli®
XIV®
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other
countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Other product and service names might be trademarks of IBM or other companies.
pref
Exercises description
This course includes the following exercises:
• Cluster node preparation
• Installation and cluster configuration
• Cluster management and configuration
• Storage pools, filesets, and policies
• Replication and snapshots
In the exercise instructions, you can check off the line before each step as you complete it to track
your progress.
Most exercises include required sections, which should always be completed. In this course it is
necessary to complete these sections before you can start later exercises. If you have sufficient
time and want an extra challenge, some exercises might also include optional sections that you can
complete.
pref
Text highlighting
The following text highlighting conventions are used throughout this book:
Bold Identifies interface controls, and graphical objects such as buttons,
labels and icons that the user selects.
Italics Identifies publication titles, is used where the word or phrase is meant
to stand out from the surrounding text, and identifies parameters
whose actual names or values are to be supplied by the user.
Monospace Identifies file names, directory names, file paths, attributes, variables,
file listings, SMIT menus, code examples, and input and output that
you would see displayed on a terminal.
Monospace bold Identifies commands, subroutines, daemons, and text the user would
type.
EXempty
Overview
This exercise introduces the lab environment. The steps also make sure that the nodes in your
assigned lab environment are ready for Spectrum Scale installation and cluster configuration.
Objectives
At the end of the exercise, you should be able to:
• Validate your assigned nodes for Spectrum Scale installation
• Ensure proper network name/address resolution
• Examine the disk configuration
• Configure node to node communication
Requirements
• This workbook
• Access to a set of nodes configured for this course
EXempty
Exercise instructions
Preface
• Two versions of these instructions are available: one with hints and one without. You can use
either version to complete this exercise. Also, do not hesitate to ask the instructor if you have
questions.
• All exercises in this chapter depend on the availability of specific equipment in your classroom.
• The typical lab environment for this course consists of set of virtual machines (VMs) that are
hosted in a cloud environment. Each student is provided with a URL that allows access to a set
of assigned VMs.
• The VM environment that is used for this course is a common configuration that is shared with a
number of other courses. This course does not use all of the assigned VMs in the lab exercises.
• The diagram below depicts the typical configuration.
EXempty
The set of VMs should be similar to the following example:
__ 2. Initially the VMs are in the Powered off state. You must start the VMs in order to use them.
__ a. First, start the VM called Host-5 by clicking the Run button for the VM. This VM functions
as an iSCSI server that provides shared disks to the other Linux VMs, and must be up
and running before the other Linux VMs are started.
__ b. When Host-5 has a state of Running, start the remaining VMs by clicking the Run button
for the entire set.
__ 3. When all of the VMs have a state of Running, click the icon for the Windows VM. Next,
select the Student ID, and log in. The password is: passw0rd
You will use the GUI of the Windows VM to access the command line environment of Linux
VMs as directed in later exercise steps.
In this course, you will use the first three Linux VMs (vm01, vm02, and vm03) to create
various Spectrum Scale cluster configurations. The table below shows the hostname, IP
address, and login information for these VMs.
VM name Host name IP address Login ID Password
Host-1 vm01 192.168.1.1 root passw0rd
Host-2 vm02 192.168.1.2 root passw0rd
EXempty
VM name Host name IP address Login ID Password
Host-3 vm03 192.168.1.3 root passw0rd
__ 4. Open a terminal session to vm01.
__ a. Double-click the PuTTY icon on the desktop of your Windows VM GUI.
__ b. Open a terminal session to vm01 by double-clicking the vm01 entry in the Saved
Sessions list. Alternatively, you can enter the IP address for vm01 and then click Open.
__ c. Log in as the root user.
__ 5. Using the procedure that is described in the previous step, open one terminal session to
vm02, and one session to vm03. Log in to each session as the root user.
Note
You can review the Spectrum Scale (formerly GPFS) FAQ compatibility list to ensure the OS levels
on your VMs are supported.
The Spectrum Scale FAQ:
https://www.ibm.com/support/knowledgecenter/en/STXKQY/gpfsclustersfaq.html
__ 6. The exercises in this course use Spectrum Scale V5.0. Check that the operating system on
the node is supported by the version of Spectrum Scale that will be installed. To determine
the operating system release information for Red Hat Linux, perform the following
command:
cat /etc/redhat-release
EXempty
__ 7. To ensure proper name resolution, the /etc/hosts file on each node must contain the
hostname and IP address of all nodes in the cluster. If the /etc/hosts file does not include
the hostname and IP address information for vm01, vm02, and vm03, then you need to add
it before you proceed.
__ 8. Ping all of the nodes that will be part of the cluster, including the node from which you are
running the test. This ensures that name resolution is working as expected, and that each
node has networking configured correctly.
__ 9. The Spectrum Scale daemon that runs on each cluster node must be able to communicate
and run commands remotely over a network on all other cluster nodes without being
prompted for a user ID or password. This includes a node being able to run commands on
itself. For this course SSH is being used to provide this functionality.
__ a. Generate a key pair for the node by running the following command:
ssh-keygen -t rsa -N ""
Note: there is no space between the quotation marks, and no passphrase is needed.
Press the Enter key when prompted to save the key in the default location.
__ 10. After generating the key pair for a node, the public component must be copied onto each
node that you want to be able to log in to without being prompted for a password. Use the
command sequence shown below to copy the public key file from the current node onto all
the nodes that will be part of the cluster:
ssh-copy-id -i root@vm01
ssh-copy-id -i root@vm02
ssh-copy-id -i root@vm03
Enter yes if prompted to continue connecting. When prompted, enter the root password for
the target node.
__ 11. Once you have copied the public key to all three nodes that will be part of the cluster, run
the command sequence shown below. This verifies that the root user on the current node
can log in to all of the nodes that will be part of the cluster without being prompted for a
password.
ssh vm01 date
ssh vm02 date
ssh vm03 date
Note
Once ssh has been properly configured on all three nodes that will be part of the cluster, you can do
almost everything you need to do from vm01.
__ 12. Run the following command to ensure that no log in banners are displayed when ssh is
used to log in to the current node using an appropriate key:
touch ~/.hushlogin
EXempty
__ 13. Examine the PATH environment variable to make sure that it includes the
/usr/lpp/mmfs/bin directory. If the PATH environment variable does not include the
directory, then you need to add it.
There are a number of different methods that can be used to automatically update the PATH
environment variable with a custom setting. One method is to add the customization of the
PATH environment variable to the end of the /root/.bashrc file. Remember to source the
file after adding the PATH customization to update the current environment.
__ 14. Verify that the shared disks that will be configured in the Spectrum Scale cluster are
available on the current node. The commands to verify the disks depend on the type of
shared disk technology being used, and the particular operating system being used on the
current node. The typical lab environment for this course uses iSCSI technology to
implement the shared disk configuration.
__ a. Use the command shown below to display the iSCSI configuration for the current node.
The output should indicate that the node has access to eight iSCSI disks, labeled as
sde, sdf, sdg, sdh, sdi, sdj, sdk, and sdl.
iscsiadm -m session -P 3
Note
Spectrum Scale does not require that each disk have the exact same device name on each node in
the cluster. However, it easier for us as humans to keep track of the disks if they do have the same
device name on each node. If sdb on one node is the same physical disk as sde on a different
node, the Spectrum Scale daemon is able to map the NSD ID properly. When you configure a disk
as an NSD, Spectrum Scale assigns a new NSD ID to the device and that information is placed in a
reserved area at the beginning of the disk. That header is read every time Spectrum Scale starts
and is used by the Spectrum Scale daemon when accessing and managing NSDs.
Important
All of the steps that are performed in Part 2, "Cluster node preparation" of this exercise must be
performed on all three of the nodes (vm01, vm02, and vm03) that will be configured in the
Spectrum Scale cluster in later exercises.
End of exercise
EXempty
Overview
This exercise covers the steps that are required to install IBM Spectrum Scale. The exercise also
covers the steps that are required for basic cluster configuration for a two node cluster.
Objectives
At the end of the exercise, you should be able to:
• Install the Spectrum Scale software
• Create a Spectrum Scale cluster
• Configure network shared disks (NSDs)
• Create a Spectrum Scale file system
Requirements
• This workbook
• Access to a set of nodes configured for this course
EXempty
Exercise instructions
Preface
• Two versions of these instructions are available: one with hints and one without. You can use
either version to complete this exercise. Also, do not hesitate to ask the instructor if you have
questions.
• All exercises in this chapter depend on the availability of specific equipment in your classroom.
• The typical lab environment for this course consists of set of virtual machines (VMs) that are
hosted in a cloud environment. Each student is provided with a URL that allows access to a set
of assigned VMs.
• The VM environment that is used for this course is a common configuration that is shared with a
number of other courses. This course does not use all of the assigned VMs in the lab exercises.
__ d. If the Windows VM is suspended, click the Environment VMs button on the left side of
the Skytap menu bar at the top of the screen, then select View All VMs from the list.
EXempty
__ 2. VMs in the cloud environment that is used for this course are placed in a suspended state
after a period of inactivity. Before you continue with the exercise, ensure that all of your VMs
are in the Running state.
__ a. If your assigned VMs are in the Suspended state, first resume Host-5 by clicking the
Run button for the VM, as described in the previous exercise. Next, when Host-5 is in
the Running state, resume the remaining VMs.
__ 3. When all VMs are in the Running state, select the Windows VM to connect to the graphical
interface.
__ 4. If the VMs were suspended, close any existing PuTTY sessions, and establish new ones to
each of your assigned VMs vm01, vm02, and vm03, and log in as the root user.
Note
Copy and paste functions as expected between applications that are running in the Windows VM
GUI. For example, to copy text from one PuTTY session to another:
• First, click the left mouse button and drag the cursor to highlight the text to be copied from the
source PuTTY session. Releasing the left mouse button copies the highlighted text to the
clipboard in the Windows VM.
• Next, place the cursor in the destination PuTTY session and click the right mouse button to
paste the text from the clipboard in the Windows VM.
EXempty
Note
You should observe that two new files are extracted. One of the files is the README file, and the
other file is the self-extracting installer package. If you run the self-extracting installer package script with -?
as an argument, it shows the syntax and possible options available.
By default, the self-extracting installer attempts to start a graphical version of the license acceptance process
tool. If your node does not have an X11 GUI, then you can use the --text-only argument to accept the
license agreement from a terminal session. Using the --silent argument starts the license acceptance
process tool in silent mode so that you don’t need to manually accept the licenses interactively as the installer
is running.
The name of the Spectrum Scale self-extracting installer package file is made up of multiple elements. The
different elements indicate the edition (Standard, Advanced, or Data Management), version, and operating
system and hardware platform combination that is supported by the images that are contained in the file.
EXempty
__ 8. Run the self-extracting installer package with the -? argument to view the different options
available for running this command.
EXempty
__ 9. Run the self-extracting shell script to extract the RPM package files. Use either the
--text-only or the --silent argument. If desired, you can run the installer on one node
with the --text-only argument to experience the process of manually accepting the
license. You can then use the --silent argument when running the script on the remaining
nodes.
EXempty
__ 10. By default the self-extracting package puts the Spectrum Scale product images files into a
directory hierarchy that is rooted at /usr/lpp/mmfs/5.0.0.0. Use the cd command to
change to the /usr/lpp/mmfs/5.0.0.0/gpfs_rpms directory, which contains the RPM
images suitable for Red Hat Linux.
__ 11. Use the rpm command to install the required RPM packages for Spectrum Scale Standard
Edition on Red Hat Linux:
- gpfs.base-5.0.*.rpm
- gpfs.gpl-5.0.*.noarch.rpm
- gpfs.msg.en_US-5.0.*.noarch.rpm
- gpfs.gskit-8.0.50*.rpm
- gpfs.license*.rpm
- gpfs.ext-5.0.*.rpm
- gpfs.compression-5.0.*.rpm
__ 12. The man pages for Spectrum Scale commands are supplied in a separate RPM, which is
not a required package. However, it is a good idea to install this RPM on at least one of your
nodes. Use the rpm command to install the documentation RPM package for Spectrum
Scale Standard Edition on Red Hat Linux:
- gpfs.docs-5.0.*.noarch.rpm
Note
The Linux operating system configuration that is used for the lab environment uses a LANG
environment setting of en_US.UTF-8. This setting appears to cause problems with the formatting of
Spectrum Scale man pages. If you set the LANG environment variable to a value of either en_US, or
C, the Spectrum Scale man pages are formatted correctly.
Setting the LANG environment variable can be performed as-needed when invoking the man
command to view a Spectrum Scale man page. For example: LANG=C man mmcrcluster
__ 13. Use the rpm command to list the Spectrum Scale packages that are installed on the node.
__ 14. Run the following command to build the GPFS Portability Layer (GPL) for Linux:
mmbuildgpl
Note
If you receive the message that is shown below when you run the mmbuildgpl command, then it
means that the /usr/lpp/mmfs/bin directory has not been added to the PATH environment
variable.
[root@vm02 gpfs_rpms]# mmbuildgpl
-bash: mmbuildgpl: command not found
EXempty
Revisit Step 13 on page 1-6 of the previous exercise to ensure that the PATH environment variable
is configured correctly.
Important
All of the steps that are performed in Part 2, "Install the Spectrum Scale software" of this exercise
must be performed on all three of the nodes (vm01, vm02, and vm03). The nodes vm01 and vm02
will be configured as a cluster in the next part of the exercise. Although vm03 is not added to the
cluster in this exercise, it is best to complete the configuration at this time since it will be added to
the cluster in a later exercise.
__ 21. Use the mmchlicense command to assign the proper license designation to the nodes in the
newly created cluster.
__ 22. Run the mmlslicense command again to confirm that there are no nodes that still require a
license designation.
EXempty
Note
Spectrum Scale requires that each node in the cluster is designated with the appropriate node
license. Spectrum Scale nodes that have a direct connection to the storage devices, nodes that
serve as quorum nodes, file system manager nodes, NSD server nodes, or nodes used to export
the Spectrum Scale file system data by using a network file sharing protocol such as HTTP, FTP, or
NFS require a server node license. Nodes that do not have direct connection to the storage are
considered client or consumer nodes, and as such can use the client node license.
__ 23. Use the mmlscluster command to display information about the cluster.
Note
Part 4: Start Spectrum Scale and verify the status of all nodes
__ 24. On vm01, use the mmgetstate command to check the current state of all the cluster nodes.
The current state is expected to be listed as down since Spectrum Scale has not been
started on either node yet.
__ 25. On vm01, start the Spectrum Scale daemon on all of the nodes in the cluster by using the
mmstartup command.
__ 26. When the cluster starts, use the mmgetstate command again to check the current state of
the cluster nodes and make sure that the nodes are active. It can take a few minutes for the
state of each node to show as active.
Note
If both nodes are in the active state, then the cluster is ready to use. If you have any status other
than active, then wait a few minutes and try the mmgetstate command again.
EXempty
Important
The Linux nodes configured for the class are running Red Hat Enterprise Linux 7.1. The default
configuration of RHEL 7.1 is to use the xfs file system type for the default file systems used to store
the operating system.
When GPFS starts on a node that uses xfs for the root file system, a problem is detected by the abrt
subsystem, and sent to the root user as an email message. The subject line of the email is [abrt]
full crash report. The first line of the backtrace section included in the email message is:
:WARNING: at fs/xfs/xfs_aops.c:989 xfs_vm_writepage+0x58e/0x5d0 [xfs]()
In addition to the email message, the user will be informed of the problem with a message that is
displayed at login. For example:
ABRT has detected 1 problem(s). For more info run: abrt-cli list --since 1491239313
If the abrt-cli list command is run, the output is similar to the following example:
[root@vm03 ~]# abrt-cli list
id 3e929fc2891999700b62ea24f911acc35bc261cb
reason: WARNING: at fs/xfs/xfs_aops.c:989 xfs_vm_writepage+0x58e/0x5d0 [xfs]()
time: Tue 04 Apr 2017 02:21:13 PM EST
cmdline: BOOT_IMAGE=/vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/rhel00-root ro
crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap rhgb quiet LANG=en_US.UTF-8
package: kernel
count: 3
Directory: /var/tmp/abrt/oops-2017-03-04-14:21:13-8533-0
Reported: cannot be reported
The warning is generated because of the interaction of GPFS with the Linux kernel memory
management layer. The message is not a kernel Oops, but a Warning. This is a known issue, and
can safely be ignored. It does not affect the operation or performance of GPFS. One way in which
this problem can be avoided is to use the ext4 file system type instead of the default xfs file system
type when installing the RHEL operating system.
EXempty
__ 27. Use vi or a similar editor to create an NSD stanza file called
/spectrum-scale-course/data/diskdesc.txt using the required stanza format, creating
one stanza entry for each disk device. Name the NSDs nsd1, nsd2, and so on. Example
stanza entries:
%nsd:
nsd=nsd1
device=/dev/sde
usage=dataAndMetadata
servers=vm01,vm02
%nsd:
nsd=nsd2
device=/dev/sdf
usage=dataAndMetadata
servers=vm01,vm02
%nsd:
nsd=nsd3
device=/dev/sdg
usage=dataAndMetadata
servers=vm02,vm01
%nsd:
nsd=nsd4
device=/dev/sdh
usage=dataAndMetadata
servers=vm02,vm01
- For sde and sdf, set the primary server to vm01, and the backup server to vm02.
- For sdg and sdh, set the primary server to vm02, and the backup server to vm01.
- Disk usage for all the devices is both data and metadata.
Note
If you do not specify a name for an NSD device in the stanza, the mmcrnsd command automatically
defines an NSD name for the device and updates the stanza in the file. Automatically assigned
names are of the form gpfs1nsd, gpfs2nsd, and so on.
It is recommended that you specify a server list for all NSDs. If you do not define a server list,
Spectrum Scale assumes that the disk is SAN-attached to all of the nodes in the cluster. In this
case, if a node loses the SAN connection it will not be able to use the NSD protocol to connect to
the storage by using a network connection.
You can have up to eight nodes in the servers list for each device. You should define a primary and
secondary NSD server as a minimum.
By default, when Spectrum Scale starts on a node, it discovers the NSDs that can be accessed by
using a direct SAN connection. If an NSD disk is direct SAN-attached to a node, Spectrum Scale
will use the local SAN path. If SAN access fails, Spectrum Scale can access the NSD device by
using the NSD protocol over the network. This can only be done if the NSD disk has a valid network
path defined.
EXempty
The usage clause of the stanza is ignored by the mmcrnsd command, and passed unchanged to the
output file produced by the mmcrnsd command.
__ 28. Create a backup copy of the descriptor file; you will need it later during another exercise.
cd /spectrum-scale-course/data/
cp diskdesc.txt diskdesc_bak.txt
__ 29. Now use the mmcrnsd command to create the NSDs using the stanza file that you created in
Step 27. This is the process where unique NSD identifiers are written to each disk. This
ensures that the NSD devices are available to be used for a Spectrum Scale file system.
Note
If you get an error similar to mmcrnsd: Disk device sde refers to an existing NSD, then that
means that the disk already contains NSD information and has been used as an NSD disk in
another cluster. You can use the -v no argument with the mmcrnsd command to specify that the
disks are to be formatted as NSDs regardless of their previous state or content. The default for this
argument is -v yes which means that if the disk has been used as an NSD in the past and still has
NSD information on it the operation fails. Using the -v no argument is something that should be
used with extreme caution on production systems to prevent damage to NSD disks and Spectrum
Scale file systems.
__ 30. Now use the cat command to look at the diskdesc.txt file. The mmcrnsd command
comments out the stanza of any device that encountered an error and could not be
configured. In addition, the stanza for any device that did not specify an NSD name in the
original file is updated to show the new assigned NSD name. Do you notice any changes in
the file?
__ 31. List the NSD configuration by using the mmlsnsd command. At this point, all of the NSDs are
marked as free; this allows them to be used to create Spectrum Scale cluster file systems.
EXempty
Part 6: Create a Spectrum Scale cluster file system
Now that a Spectrum Scale cluster and some NSD devices have been created, you can create a
cluster file system. In this part of the exercise, you use the four NSDs to create a new cluster file
system.
__ 32. Create a shared cluster file system with the attributes listed below by using the mmcrfs
command.
- Set the file system device name to be fs1
- Set the block size to 64 KB
- Set the file system mount point at /gpfs
- Use the NSDs listed in the stanza file /spectrum-scale-course/data/diskdesc.txt
- Set the file system to be automatically mounted when the mmfsd daemon is started
Note
If this operation fails, it is most likely because the disks have been used with a different Spectrum
Scale cluster file system in the past and still have old information that prevents them from being
used. Use the -v no argument at the end of the mmcrfs command to force the disks to be reused to
create the new file system.
__ 33. Use the mmmount command to mount the file system on all the nodes.
__ 34. Use the mmlsfs command to list the attributes of the newly created file system.
__ 35. Use the mmdf command to list the file system usage information.
__ 36. To query all disks in the fs1 file system with the number of blocks automatically scaled to an
easy-to-read value, run the mmdf command with the --block-size auto argument.
Note
One of the things you might notice in the mmdf output is that one of the four disks has a slightly
larger amount of free space than the other disks in fs1. This is because Spectrum Scale places a
file system descriptor file on some of the disks, but not all of the disks. This information will be
discussed in the next unit in more detail.
__ 37. How many inodes are currently used in the file system? ______________
__ 38. Use the df command to verify that the file system is mounted properly.
End of exercise
EXempty
Overview
In this exercise, you examine the IBM Spectrum Scale structure, and see where the cluster
information and tools are placed.
Objectives
At the end of this exercise, you should be able to:
• Document where Spectrum Scale configuration information is stored
• Make configuration changes to a Spectrum Scale cluster
• Add a node to an existing cluster
• Add NSDs to an existing file system
Requirements
• This workbook
• Access to a set of nodes configured for this course
• Exercise 1 and exercise 2 completed successfully
EXempty
Exercise instructions
Preface
• Two versions of these instructions are available: one with hints and one without. You can use
either version to complete this exercise. Also, do not hesitate to ask the instructor if you have
questions.
• All exercises in this chapter depend on the availability of specific equipment in your classroom.
• The typical lab environment for this course consists of set of virtual machines (VMs) that are
hosted in a cloud environment. Each student is provided with a URL that allows access to a set
of assigned VMs.
• The VM environment that is used for this course is a common configuration that is shared with a
number of other courses. This course does not use all of the assigned VMs in the lab exercises.
EXempty
________________________________________________________________________
Important
Do not ever edit the mmsdrfs file manually. The file should be backed up for disaster recovery
purposes.
EXempty
Part 2: Configuration changes: Adding a node
In this part of the exercise, you have an opportunity to change some configuration settings and see
what happens. You also add a third node (vm03) to your existing cluster.
__ 7. Open a PuTTY session to vm03 and log in as the root user.
__ 8. Make sure that the following commands can be run from vm03 without being prompted for a
password.
ssh vm01 date
ssh vm02 date
ssh vm03 date
If any of these commands prompt you for a password, return to Part 2, "Cluster node
preparation," on page 1-4 of Exercise 1 and complete the required configuration.
__ 9. On vm03, use the rpm -qa |grep gpfs command to verify that Spectrum Scale was
properly installed. If Spectrum Scale was not properly installed, return to Part 2, "Install the
Spectrum Scale software," on page 2-3 of Exercise 2 and complete steps required for
Spectrum Scale installation.
__ 10. On vm03, use the echo $PATH command to verify that the /usr/lpp/mmfs/bin directory is
properly defined in the PATH. If this directory is not in the path, then you will not be able to
run any Spectrum Scale commands.
__ 11. The lab environment that is used for this course is shared by a number of other courses.
Currently, vm03 has direct access to the same set of shared disks already being used by
vm01 and vm02. In this course, vm03 is to be configured as an NSD client, where the node
ignores any direct attachment to NSD devices, and instead sends all Spectrum Scale block
I/O over the TCP/IP network to the NSD servers vm01 and vm02. The easiest way to do this
is to create a script that does not produce a device list. This causes Spectrum Scale to stop
looking for locally attached devices.
On vm03, create the file /var/mmfs/etc/nsddevices that contains the following two lines:
#!/bin/ksh
exit 0
When Spectrum Scale is started on vm03, it runs this script to look for direct attached NSD
devices. The exit 0 indicates that the script completed successfully, and that Spectrum
Scale should not continue to detect locally attached devices.
__ 12. On vm03, make sure that the /var/mmfs/etc/nsddevices script is executable.
chmod +x /var/mmfs/etc/nsddevices
__ 13. On vm01, use the mmaddnode command to add vm03 to your Spectrum Scale cluster. Use a
node designation of nonquorum-client. A client designation provides a lower license cost
and from an application point of view, the Spectrum Scale file system behaves the same as
on the other nodes. Since you are adding a single node, it is easier to use the command line
interface to provide the node designation rather than creating a node file.
__ 14. Use the mmlslicense command to view the cluster license designations. Do any of your
nodes require license designations?
EXempty
__ 15. Use the mmchlicense command to assign the client license designation to the newly added
node.
EXempty
__ 16. Use the mmlslicense command again to verify that vm03 now has the cluster license
designation of client.
__ 17. Use the mmlsnode and the mmlscluster commands to list all the nodes in your cluster and
their designations.
EXempty
__ 18. Use the mmgetstate command to check to see whether the Spectrum Scale mmfsd daemon
is active on all three nodes. If the mmfsd daemon is not currently active on the newly added
node, use the mmstartup command to activate it.
Note
If all three nodes are in the active state, then the cluster and all cluster nodes are ready to use. If
any nodes have a status other than active, then wait for 3 - 5 minutes and try the mmgetstate
command again.
__ 19. On vm03, use the df command to verify that the node has access to the /gpfs file system.
EXempty
__ 20. Run the mmlsdisk fs1 -m command on vm01, vm02, and vm03. Compare the results.
What do you notice?
_______________________________________________________________________
__ 21. Now that vm03 has been added to the cluster, you can use it to run cluster management
commands if you so desire. For these next lab steps, the author of these materials chose to
use vm03 to run the commands, but you can instead use vm01 or vm02.
__ a. Use the mmlsmgr command to view the file system manager for the file system fs1.
__ 22. Use the mmchmgr command to change the file system manager to vm02, and then verify that
the change was successful.
__ 23. Can vm03 become the file system manager for fs1?
__ 24. Use the mmchmgr command to restore the file system manager role for fs1 back to vm01.
EXempty
__ 25. Use the mmlsmgr -c command to see which node is acting as the cluster manager.
Note
The mmchmgr -c command can be used to configure a different node to act as the cluster manager.
Note
The mmlsconfig output shows only certain parameters that have been changed from the default
value, or set by Spectrum Scale. In the next step, you will see a method to view a full list of
parameters and their current values.
__ 30. Use the mmfsadm dump config command to view all of the Spectrum Scale parameters.
The output can be long so you might want to pipe the output to more or pg so that you can
look through it.
__ 31. What is the value of pagepool parameter? ____________________
__ 32. Use the mmchconfig command to change the pagepool value to 800 MB, and have the
change take effect immediately. Confirm the change by running the mmfsadm command
again.
Note
This step is just an example of how to dynamically change the pagepool size to an arbitrary value,
which in this case is 800 MB. Typically this value would be adjusted only to meet file system activity
needs.
The default pagepool value is either one-third of the physical memory on the node or 1 GB,
whichever value is smaller.
For more information about tuning the pagepool size, see the mmchconfig man pages and the
Spectrum Scale WIKI page:
https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/General%20Parallel
%20File%20System%20%28GPFS%29/page/Tuning%20Parameters
EXempty
Part 3: Add NSDs to an active cluster file system
Spectrum Scale does not use a Logical Volume Manager. However, the size of an existing file
system can be dynamically changed by adding or removing NSD disks. If you need more disk
space on active and mounted file systems, you must add SAN LUNs defined as NSDs.
Note
Spectrum Scale does not support the dynamic resizing of an existing Spectrum Scale NSD disk by
a storage subsystem. If the size of the underlying structure (LUN) of an NSD is changed, it
damages the structure of the NSD and you lose all of the data on that NSD.
EXempty
__ 36. Display the contents of both the adddisk.txt file and the adddisk_bak.txt file. What
differences do you observe?
_____________________________________________________________________
Note
In the previous exercise, you manually assigned a name of the form nsdN for each NSD in the
configuration file before running the mmcrnsd command. In this exercise, you allowed the mmcrnsd
command to automatically generate a name for each of the new NSDs (resulting in names of the
form gpfsNnsd). In a production environment, the administrator will choose one method of naming
(manual or automatic name assignment) when configuring NSDs at initial cluster creation. The
administrator typically continues to use the selected method when adding any additional NSDs.
__ 37. Verify that the NSD disks have been created by using the mmlsnsd command.
__ 38. Before you add the new NSDs to a file system, use the mmlsdisk command to list the disks
that are currently configured for fs1.
__ 39. Use the command that is shown below to create a large file in the fs1 file system. This file is
being placed there so that you can observe the data striping behavior of Spectrum Scale,
and to observe the behavior when extra space is added to a file system. It should take less
than 2 minutes for the command to complete.
dd if=/dev/zero of=/gpfs/bigfile bs=1M count=2048
__ 40. Use the mmdf command to examine the current capacity of the fs1 file system.
__ 41. Use the mmadddisk command to add the new NSDs to the fs1 file system.
__ 42. Use the mmlsdisk command to display the current configuration and state of the disks in the
fs1 file system, and to verify that the two NSDs have been properly added.
__ 43. Use the mmdf command to display the current capacity of the fs1 file system. You should
note that none of the space in the newly assigned disks is being used to store data.
Note
Spectrum Scale automatically spreads the file system data across all of the NSD disks that are
configured in the file system. Suppose that your file system is almost full and you add an additional
NSD to increase the file system size. When you add an NSD disk, that NSD disk is empty and the
existing disks in the file system are full, or at least contain data. As new files are created in the file
system the new space is allocated mainly from the new empty disk. This can lead to unbalanced I/O
for this file system.
You can restripe the file system to rebalance the spread of data across all of the NSDs in the file
system. The mmrestripefs command can be used to rebalance the data. You should consider the
necessity and benefits of restriping the data, and also consider the current demands on the system
before running this command. Restriping a large file system requires many insert and delete
EXempty
operations, and may affect system performance. In a production environment, this operation should
be done when the system demands are low.
__ 44. Use the mmrestripefs command to rebalance the existing data in the fs1 file system. It
may take a few minutes for the command to complete.
__ 45. After the mmrestripefs command completes, use the mmdf command again to display the
capacity of the fs1 file system. Now you should note that the data has been rebalanced
across all of the NSDs in the file system.
Note
The -a option indicates asynchronous rebalancing should be used. Use the mmlsdisk and mmlsnsd
commands to verify the successful removal of the disks. If replication was implemented, then the -r
option can be used to preserve the data and metadata replication factors.
The disks to be deleted by the mmdeldisk command must be up and running for the command to
succeed. You can verify this by using the mmlsdisk command. If you need to delete a damaged
disk, you must use the -p option with the mmdeldisk command so it can delete a stopped disk.
__ 47. Use the mmdf command again to verify that the two recently added NSDs have been
successfully removed from the file system.
End of exercise
EXempty
Overview
This exercise covers the implementation of IBM Spectrum Scale storage pools (tiered disks within a
file system) and the usage of storage pools. This exercise also covers the implementation (creation,
linking, and population) of Spectrum Scale filesets (file system subtrees). Lastly, the exercise also
covers the usage of the Spectrum Scale policy engine in the placement (ingestion) and migration of
data among the Spectrum Scale storage pools.
Objectives
At the end of the exercise, you should be able to:
• Create storage pools
• Create filesets
• Implement a placement policy
• Define and apply a file management policy
Requirements
• This workbook
• Access to a set of nodes configured for this course
• Exercises 1, 2, and 3 completed successfully
EXempty
Exercise instructions
• Two versions of these instructions are available: one with hints and one without. You can use
either version to complete this exercise. Also, do not hesitate to ask the instructor if you have
questions.
• All exercises in this chapter depend on the availability of specific equipment in your classroom.
• The typical lab environment for this course consists of set of virtual machines (VMs) that are
hosted in a cloud environment. Each student is provided with a URL that allows access to a set
of assigned VMs.
• The VM environment that is used for this course is a common configuration that is shared with a
number of other courses. This course does not use all of the assigned VMs in the lab exercises.
EXempty
__ 7. Use vi or a similar editor to modify the pooldesc.txt file. The file should have the following
modifications:
- Add information to the stanzas for the nsd1 and nsd2 NSDs to place them in the system
storage pool.
- Modify the stanzas for the nsd3 and nsd4 devices to place them in a storage pool that is
labeled poolA
- Modify the stanzas for the nsd3 and nsd4 devices so that they are used only for data
storage.
__ 8. Use the mmcrfs command to create a file system by using the pooldesc.txt descriptor file
with the following attributes.
- Set the file system device name to be fs1
- Set the block size to 64 KB
- Set the file system mount point at /gpfs
- Use the NSDs listed in the stanza file /spectrum-scale-course/data/diskdesc.txt
- Set the file system to be automatically mounted when the mmfsd daemon is started
EXempty
__ 9. Verify that the file system was created correctly by using the mmlsfs command.
__ 10. Mount the file system on all nodes using the mmmount command.
EXempty
__ 11. Verify that the file system is mounted using the df command.
__ 12. Verify the storage pool configuration using the mmdf command.
EXempty
__ 17. Use the mmlinkfileset command to link each of the new filesets into the file system at a
junction path location under /gpfs with the same name as the fileset. For example, link the
fileset fileset1 to the junction path location /gpfs/fileset1.
__ 18. Verify that the filesets were linked using the mmlsfileset command.
Part 5: Verify that the policy was properly installed using the mmlspolicy command.Test the
placement policies
In this part of the exercise you run some experiments to see how policies work. Use the table below
to track the results. You can determine the amount of free space by using the mmdf fs1 command.
Use the “Free KB in full blocks” column.
Table 1. Storage pool free space
Experiment system pool (free KB) poolA (free KB)
Pool usage before the start of the activity
After bigfile1 is created
After bigfile1.dat file is created
After bigfile2 file is created
After Migrate/delete policy is applied
__ 21. Before you create any files in the file system, use the mmdf command to determine the
amount of free space in each storage pool, and record the results in the table above.
EXempty
__ 22. Use the command that is shown below to create a 50 MB file in /gpfs/fileset1 called
bigfile1.
dd if=/dev/zero of=/gpfs/fileset1/bigfile1 bs=1M count=50
__ 23. After you create the file (bigfile1), use the mmdf command to determine the amount of free
space in each storage pool, and record the results in Table 1.
__ 24. Use the command that is shown below to create a second 50 MB file located in
/gpfs/fileset2 called bigfile1.dat.
dd if=/dev/zero of=/gpfs/fileset2/bigfile1.dat bs=1M count=50
__ 25. After you create the file (bigfile1.dat), use the mmdf command to determine the amount of
free space in each storage pool, and record the results in Table 1.
__ 26. Use the dd command to create a 50 MB file in /gpfs/fileset5 called bigfile2.
dd if=/dev/zero of=/gpfs/fileset5/bigfile2 bs=1M count=50
__ 27. After you create the file (bigfile2), use the mmdf command to determine the amount of free
space in each storage pool, and record the results in Table 1.
__ 28. Based on the information you recorded, use the blanks to list the storage pool used to store
each of the files you created.
bigfile1 ______________
bigfile1.dat ______________
bigfile2 ______________
Note
You can use the mmlsattr -L [full pathname of filename] command to validate your answers.
For example:
# mmlsattr -L /gpfs/fileset1/bigfile1
EXempty
__ 29. Run the following command sequence to create two more 50 MB files that will be used in
subsequent steps:
dd if=/dev/zero of=/gpfs/fileset3/bigfile3 bs=1M count=50
dd if=/dev/zero of=/gpfs/fileset4/bigfile4 bs=1M count=50
__ 30. Use the mmlsattr -L command to determine which storage pool bigfile3 and bigfile4 were
placed into.
Hint
If you run the mmapplypolicy command with the -I test flag, it will show details of what would be
performed based on the specified policy, but will not perform the operations.
__ 32. Test the rule set by using the mmapplypolicy command with the -I test flag.
EXempty
__ 33. Apply the policy using the mmapplypolicy command.
__ 34. Review the output of the mmapplypolicy command to answer these questions:
__ a. How many files were deleted?
__ b. How many files were migrated?
__ c. How many KB of data was migrated?
»
__ 35. Use the mmdf fs1 command to check the new free space values for both pools and record
the information in Table 1 on page 4-6.
__ 36. The example below shows a table that is completed using values from the cluster that was
used to create these materials. The numbers you obtain may be slightly different if you
created smaller or larger files than the exercise steps indicate.
Experiment system pool (free KB) poolA (free KB)
Pool usage before the start of the activity 3661248 4062848
After bigfile1 file is created 3610048 4062848
After bigfile1.dat file is created 3610048 4011648
After bigfile2 file is created 3610048 3960448
After Migrate/delete policy is applied 3661184 3858048
End of exercise
EXempty
__ 39. Now use vi or a similar editor to create the file
/spectrum-scale-course/data/listrule1.txt with the following contents:
RULE EXTERNAL POOL 'externalpoolA' EXEC '/usr/local/bin/expool1.ksh'
RULE 'MigToExt' MIGRATE TO POOL 'externalpoolA' WHERE FILE_SIZE > 2
__ 40. Use the mmapplypolicy command to run the external pool migration and then examine the
report placed into the /tmp directory.
EXempty
Overview
In this exercise, you gain experience with Spectrum Scale replication and snapshots.
Objectives
At the end of this exercise, you should be able to:
• Enable data and metadata replication
• Change and verify a file's replication status
• Create a file system snapshot
• Restore a file from a snapshot
• Restore an entire file system from a snapshot
Requirements
• This workbook
• Access to a set of nodes configured for this course
• Exercises 1, 2, 3, and 4 completed successfully
EXempty
Exercise instructions
• Two versions of these instructions are available: one with hints and one without. You can use
either version to complete this exercise. Also, do not hesitate to ask the instructor if you have
questions.
• All exercises in this chapter depend on the availability of specific equipment in your classroom.
• The typical lab environment for this course consists of set of virtual machines (VMs) that are
hosted in a cloud environment. Each student is provided with a URL that allows access to a set
of assigned VMs.
• The VM environment that is used for this course is a common configuration that is shared with a
number of other courses. This course does not use all of the assigned VMs in the lab exercises.
Preface
• Overview: Spectrum Scale can be configured in such a way as to maintain availability even
when storage subsystem failures occur. This level of protection requires at least double the
storage space and uses a mirroring-like concept Spectrum Scale calls replication.
• Multiple copies of metadata and data can be kept on separate storage subsystems for
availability purposes. Data and metadata can be replicated separately. Replication can be done
in a local cluster for local availability, or in a multi-site cluster for disaster recovery. The
Spectrum Scale documentation has more details on both configurations.
• The Shared Nothing cluster model with File Placement Optimizer supports up to three copies of
the data and metadata. The other cluster models support a maximum of two copies.
Note
If the maximum number of data and metadata replicas are not set to 2, you need to re-create the file
system or go back and complete exercise 4.
EXempty
Note
The failure group should currently be set to a value of -1 (default) for all the NSDs. This value
indicates that the disk is not part of a failure group.
__ 4. Change the failure group value of each NSD in the fs1 file system to be a unique number.
Recall that the scope of replication is the storage pool, which means that the NSDs that are
part of a storage pool must belong to one of two different failure groups in order to
implement replication.
__ a. Change directory to /spectrum-scale-course/data.
__ b. Use vi or a similar editor to modify the pooldesc.txt stanza file that was used to create
the file system in the previous exercise. Add a failureGroup attribute to each stanza.
Use a failure group value of 1 for nsd1, 2 for nsd2, and so on.
__ c. Use the mmchdisk command to change the failure group values using the stanza file.
__ 5. Verify the changes by using the mmlsdisk command.
Note
No data has been moved. The output of the mmlsdisk command indicates that the file system is no
longer properly replicated. This is because the default replication level is still set to 1, which
effectively disables replication.
Note
If the size of the file is large, you might notice that this command takes a few moments to run. As
you change the replication status of a file, the data is copied before the command completes,
unless you use the –I defer option.
__ 9. Now use the mmlsattr command again to check the replication status of the file bigfile10.
EXempty
__ 10. Did you see a change in the replication status of the file?
EXempty
__ 13. Use the mmchfs command to change the default replication status for fs1 so that both data
and metadata are replicated.
__ 14. Use the mmlsattr command to check the replication status of the file bigfile11.
__ 15. Has the replication status of bigfile11 changed? _________________
__ 16. The replication status of existing files does not change until mmrestripefs is run. Any new
files are created by using the new replication values. To test this, create a new 50 MB file in
/gpfs/fileset1 called bigfile12.
__ 17. Use the mmlsattr command to check the replication status of the file bigfile12.
__ 18. Is the file bigfile12 file replicated?
__ 19. Replicate the existing files in the file system by using the mmrestripefs command.
__ 20. Use the mmlsattr command to check the replication status of the file bigfile11.
__ 21. Is the file replicated?
EXempty
__ 29. What directories do you see? _____________________
__ 30. Compare the contents of the snapfile1 file that is stored in each snapshot image.
[root@vm01 .snapshots]# cat snap1/fileset1/snapfile1
Hello World:snap1
[root@vm01 .snapshots]# cat snap2/fileset1/snapfile1
__ 31. Hello World:snap2Are the file contents the same? _______________.
__ 32. Copy the deleted test file back to its original location from the snap2 snapshot.
EXempty
__ 41. Use the cd command to change directory to /gpfs/fileset1, then use the mmclone snap
command to create a read-only snapshot called snap1 of the file called file1.
__ 42. Use the mmclone copy command to create a writable clone called file2 of the read-only
snapshot called snap1 that you created in the previous step.
__ 43. Use the mmclone show command to show information about the file1 and file2 files.
For more information about file clones, see Chapter 27. Creating and managing file clones of the
IBM Spectrum Scale Administration Guide, which can be found online in the Knowledge Center.
End of exercise
backpg