Sunteți pe pagina 1din 83

IBM® Spectrum Archive™ Virtual Appliance

User Guide

Version 1.2
February 23, 2016

© IBM Corporation Page 1


Table of Contents

IBM® Spectrum Archive™ Virtual Appliance User Guide ................................................ 1


1. Introduction ............................................................................................................... 3
2. Requirements ........................................................................................................... 4
3. Installation ................................................................................................................ 5
4. Setup ...................................................................................................................... 12
5. Spectrum Archive features ..................................................................................... 17
5.1. Manual migration.............................................................................................. 17
5.2. Automatic migration ......................................................................................... 24
5.3. Reconciliation/Reclamation .............................................................................. 28
5.4. Export/Import.................................................................................................... 32
5.5. Bulk Recall ....................................................................................................... 36
5.6. Preserving file system objects on tape ............................................................. 41
5.7. Drive attributes ................................................................................................. 51
6. Migration policy rule variations................................................................................ 58
6.1. Exclude ............................................................................................................ 60
6.2. Include ............................................................................................................. 66
6.3. Timestamp and file size ................................................................................... 70
6.4. Controlling which external pool to migrate ....................................................... 75
7. How to stop/restart Spectrum Archive .................................................................... 79
7.1. Stopping Spectrum Archive .............................................................................. 80
7.2. Starting Spectrum Archive................................................................................ 80
8. How to re-format the tapes ..................................................................................... 80
9. Detail logs ............................................................................................................... 82
10. Other technical notes ............................................................................................ 82
11. More information on Spectrum Archive ................................................................. 82
12. Limitations ............................................................................................................ 83

© IBM Corporation Page 2


1. Introduction
IBM Spectrum Archive Enterprise Edition for the IBM TS4500, IBM TS3500, and IBM
TS3310 tape libraries provides seamless integration of LTFS (Linear Tape File
System™) with IBM Spectrum Scale™ by creating an LTFS tape tier. You can run any
application that is designed for disk files on tape by using Spectrum Archive. Spectrum
Archive can play a major role in reducing the cost of storage for data that does not need
the access performance of primary disk.
More details about Spectrum Archive can be found in Service Management Connect -
IBM Spectrum Archive - Overview
This Spectrum Archive Virtual Appliance can be deployed in minutes and you can try
key features of Spectrum Archive Enterprise Edition easily along with this user guide.
The virtual machine has a pre-configured Spectrum Scale and a virtual tape library that
allows to quickly test the Spectrum Archive features without connecting to a physical
tape library. The trial VM is provided as a VirtualBox template image and you can
create your own instance of the trial VM by importing the ova file.
Figure 3-1 shows the overview of Spectrum Archive Virtual Appliance.

Figure 3-1. Overview of Spectrum Archive Virtual Appliance

© IBM Corporation Page 3


In this paper we will show you how to set up a virtual appliance and typical use-cases
with step-by-step instructions so that you can try them by yourself. Here’s what you can
learn by reading this document:
 How to migrate files from disk to tape manually/automatically
 How recall operation that moves data from tape to disk transparently from user view
point
 How to perform basic tape operations like reconcile, reclaim, export/import, bulk
recall etc and how it works.
 Best practice for policy rules to enable automatic migration in Spectrum Archive
solution.

This version of the trial VM includes the following software:


 IBM Spectrum Archive Enterprise Edition 1.2
 IBM Spectrum Scale 4.2

Note:
 Because this virtual appliance uses the emulated tape library,
 Some of the command output can be slightly different from the physical tape
library.
 The capacity of each virtual tape cartridge is 2.5 GB which is significantly smaller
than the physical tape cartridges.
 The virtual appliance is not an appropriate environment for performance testing.
 Spectrum Scale protocol related service (NFS/CIFS/Object) is currently disabled by
default.

2. Requirements

Here’re the requirements to run the Spectrum Archive Virtual Appliance.

VM Host Platform Windows 7 Professional SP1


Mac OS 10.8.4
RHEL 7.1

© IBM Corporation Page 4


* Supports 64 bit only
Software Requirements Tested with VirtualBox 5.0.12
CPU Processor 1 Core
Virtual Appliance .OVA ~ 2.5GB
file Temporary Download
Space
Minimum System 4GB
Memory allocated to the
VM
System Disk Capacity 7GB ~ 40GB
Used by VM
* 40GB is consumed when all disk space
including GPFS and ten 2.5GB tapes are
full. For test cases described in this
document, 10GB should be enough.
Machine Virtualization Needs to be ENABLED.
Acceleration setup
IP Addresses Used 127.0.0.1
* You can connect the VM from the host
via ssh –p 2022 root@localhost.

3. Installation
This chapter describes how to install the Spectrum Archive Virtual Appliance.
At first, a Host-Only network needs to be configured. Click Preferences → Network →
Host-only Networks.
Make sure that there’s at least one host-only network with default setting as shows in
Figure 3-1.

© IBM Corporation Page 5


Figure 3-1. Host-only Networks setting

If not, click add button to create a new one (red box shown in Figure 3-2) and
remember the adapter name (used later).

© IBM Corporation Page 6


Figure 3-2. Create a new host-only network

And create your own instance of the trial VM. Click File → Import Appliance as shown
in Figure 3-3.

Figure 3-3. Import Appliance

© IBM Corporation Page 7


Select the ova file below:
OVA file name: SpectrumArchive_Trial_VM_GA_1.2.ova

During importing, don’t check ‘Reinitialize the MAC address of all network cards’
checkbox.

After the import, in Network setting of the trial VM, make sure that both adapter 2 and 3
are attached to adapters have been checked in Figure 3-1.
For Windows users: the ova file was exported on Max OS and its adapter names
match with Mac OS/Linux version VirtualBox. Because Windows uses a different
naming rule for adapter names, Windows users needs to correct the adapter settings
pre-configured in the ova. Follow the instruction below to change the adapter names.
Check the adapter names in the red box shown in Figure 3-4.

© IBM Corporation Page 8


Figure 3-4. Host-only networks connected to adapters

If these are wrong, change the setting by clicking Settings as shown in Figure 3-5. Here
are three Windows screen captures to follow, in case the adapter name needs to be
changed to "VirtualBox Host-Only Ethernet Adapter".

© IBM Corporation Page 9


Figure 3-5. Click Setting button

Then click Network tab and set correct adapter names for both adapter 2 and 3 as
shown in Figure 3-6.

© IBM Corporation Page 10


Figure 3-6. Correct adapter names

Here are the steps to change the adapter names:


1. Click Network
2. Click Adapter 2 tab
3. Change adapter name if needed
4. Select Adapter 3 tab to change the Adapter 3 name
5. Click OK

Then make sure that both adapter 2 and adapter 3 names are correct in main window
as shown in Figure 3-7.

© IBM Corporation Page 11


Figure 3-7. Correct adapter names are shown

4. Setup
This chapter describes how to perform initial setup for Spectrum Archive Virtual
Appliance after installation.
When the virtual machine has booted, as described in the “Spectrum Scale 4.2 Trial VM
Quick Start Guide” included in the Spectrum Scale Trial VM, login by:
User: root
Password: ibm
Then, Spectrum Archive can be configured by running the following initial setup. This
needs to be done every time the virtual machine has booted.
Make sure that the virtual machine is a member of a Spectrum Scale cluster.
[root@spectrumscale ~]# mmlscluster

© IBM Corporation Page 12


GPFS cluster information
========================
GPFS cluster name: democluster.spectrumscale
GPFS cluster id: 10588301405041815909
GPFS UID domain: democluster.spectrumscale
Remote shell command: /usr/bin/ssh
Remote file copy command: /usr/bin/scp
Repository type: CCR

Node Daemon node name IP address Admin node name Designation


------------------------------------------------------------------
1 spectrumscale 10.0.2.15 spectrumscale quorum-manager-perfmon

Make sure that the Spectrum Scale service has started and /gpfs/fs1 is mounted. It may
take about 5 minutes for fs1 to be mounted.
[root@spectrumscale ~]# mmgetstate

Node number Node name GPFS state


------------------------------------------
1 spectrumscale active

[root@spectrumscale ~]# df /gpfs/fs1


Filesystem 1K-blocks Used Available Use% Mounted on
/dev/fs1 8388608 1280256 7108352 16% /gpfs/fs1

Then configure and start Spectrum Archive by issuing the following commands.
[root@spectrumscale ~]# ltfs -o tape_backend=file -o changer_backend=file -o
changer_devname=/ltfs_vtape/library /ltfs
6562 LTFS14000I LTFS starting, LTFS version 2.1.6.0 (9601), log level 2
6562 LTFS14058I LTFS Format Specification version 2.2.0
6562 LTFS14104I Launched by "ltfs -o tape_backend=file -o changer_backend=file -o
changer_devname=/ltfs_vtape/library /ltfs"
6562 LTFS14105I This binary is built for Linux (x86_64)
6562 LTFS14106I GCC version is 4.8.3 20140911 (Red Hat 4.8.3-9)
6562 LTFS17087I Kernel version: Linux version 3.10.0-229.el7.x86_64
(builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP
Fri Mar 6 11:36:42 UTC 2015 i386

© IBM Corporation Page 13


6562 LTFS17089I Distribution: Red Hat Enterprise Linux Server release 7.1 (Maipo)
6562 LTFS17089I Distribution: NAME="CentOS Linux"
6562 LTFS17089I Distribution: Red Hat Enterprise Linux Server release 7.1 (Maipo)
6562 LTFS17089I Distribution: Red Hat Enterprise Linux Server release 7.1 (Maipo)
6562 LTFS14064I Sync type is "unmount"
6562 LTFS17085I Plugin: Loading "file" driver
6562 LTFS17085I Plugin: Loading "unified" iosched
6562 LTFS17085I Plugin: Loading "file" changer
6562 LTFS17085I Plugin: Loading "ondemand" dcache
6562 LTFS17085I Plugin: Loading "memory" crepos
6562 LTFS11593I LTFS starts with a product license version (20130412_2702)
6562 LTFS12267I Getting the device directory (/tmp/ltfs25954)
6562 LTFS12269I Scanning the devices directory (/ltfs_vtape/library)
6562 LTFS11578I Inactivating all drives (Skip to scan devices)
6562 LTFS16500I Cartridge repository plugin is initialized (memory,
/gpfs/fs1/.ltfsee/meta/0000VLIBRARY_LL0)
6562 LTFS11545I Rebuilding the cartridge inventory
6562 LTFS11627I Getting Inventory - 0000VLIBRARY_LL0
6562 LTFS11629I Aqcuireing MoveLock - 0000VLIBRARY_LL0
6562 LTFS11630I Aqcuired Move Lock (9) - 0000VLIBRARY_LL0
6562 LTFS11628I Got Inventory - 0000VLIBRARY_LL0
6562 LTFS11720I Built the cartridge inventory (0)
6562 LTFS14708I LTFS admin server version 2 is starting on port 7600
6562 LTFS14111I Initial setup completed successfully
6562 LTFS14112I Invoke 'mount' command to check the result of final setup
6562 LTFS14113I Specified mount point is listed if succeeded

[root@spectrumscale ~]# ltfsee start


Library name: lib1, library id: 0000VLIBRARY_LL0, control node (MMM) IP address: 127.0.0.1.
GLESM401I(00253): Loaded the global configuration.
GLESM402I(00264): Created the Global Resource Manager.
GLESM403I(00279): Fetched the node groups from the Global Resource Manager.
GLESM404I(00287): Detected the IP address of the MMM (127.0.0.1).
GLESM405I(00298): Configured the node group (G0).
GLESM406I(00307): Created the unassigned list of the library resources.
GLESL536I(00074): Started the Spectrum Archive EE service (MMM) for library lib1.

© IBM Corporation Page 14


The following commands can be issued to verify the status of Spectrum Archive.
[root@spectrumscale ~]# df /ltfs
Filesystem 1K-blocks Used Available Use% Mounted on
ltfs:/ltfs_vtape/library 2199023255040 0 2199023255040 0% /ltfs

[root@spectrumscale ~]# ltfsee status


Ctrl Node Status PID Library
127.0.0.1 Active 27616 lib1

[root@spectrumscale ~]# ltfsee info libraries


Library Name Status Model Serial Number Ctrl Node
lib1 Inactive 0000VLIBRARY_LL0 127.0.0.1

[root@spectrumscale ~]# ltfsee info drives


Drive S/N Status Type Role Library Address Node ID Tape Node Group
VDRIVE0000 Not mounted LTO5 mrg lib1 256 1 - G0
VDRIVE0001 Not mounted LTO5 mrg lib1 257 1 - G0
VDRIVE0002 Not mounted LTO5 mrg lib1 258 1 - G0
VDRIVE0003 Not mounted LTO5 mrg lib1 259 1 - G0

[root@spectrumscale ~]# ltfsee info tapes


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE9L5 Unavailable LTO5 0 0 0 - lib1 4105 -
VTAPE8L5 Unavailable LTO5 0 0 0 - lib1 4104 -
VTAPE7L5 Unavailable LTO5 0 0 0 - lib1 4103 -
VTAPE6L5 Unavailable LTO5 0 0 0 - lib1 4102 -
VTAPE5L5 Unavailable LTO5 0 0 0 - lib1 4101 -
VTAPE4L5 Unavailable LTO5 0 0 0 - lib1 4100 -
VTAPE3L5 Unavailable LTO5 0 0 0 - lib1 4099 -
VTAPE2L5 Unavailable LTO5 0 0 0 - lib1 4098 -
VTAPE1L5 Unavailable LTO5 0 0 0 - lib1 4097 -
VTAPE0L5 Unavailable LTO5 0 0 0 - lib1 4096 -

© IBM Corporation Page 15


A virtual tape library "lib1" with 4 virtual tape drives "VDRIVE0000" to "VDRIVE0003"
with 10 virtual tape cartridges (2.5GB capacity for each) VTAPE0L5 to VTAPE9L5 are
attached. All of these are pre-configured.

Create a tape pool for data migration. This is required only once when the virtual
appliance is initially created and setup.

[root@spectrumscale ~]# ltfsee pool create pool1

[root@spectrumscale ~]# ltfsee pool add -p pool1 -t VTAPE0L5 -t VTAPE1L5 -t VTAPE2L5 -e


GLESL042I(00640): Adding tape VTAPE0L5 to storage pool pool1.
GLESL042I(00640): Adding tape VTAPE1L5 to storage pool pool1.
GLESL042I(00640): Adding tape VTAPE2L5 to storage pool pool1.
Tape VTAPE0L5 successfully formatted.
Added tape VTAPE0L5 to pool pool1 successfully.
ltTape VTAPE1L5 successfully formatted.
Added tape VTAPE1L5 to pool pool1 successfully.
Tape VTAPE2L5 successfully formatted.
Added tape VTAPE2L5 to pool pool1 successfully.

[root@spectrumscale ~]# ltfsee info pools


Pool Name Total(TiB) Free(TiB) Unref(TiB) Tapes Type Library Node Group
pool1 0.0 0.0 0.0 3 LTO lib1 G0

[root@spectrumscale ~]# ltfsee info tapes


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE2L5 Valid LTO5 2 2 0 pool1 lib1 4098 -
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 4097 -
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 4096 -
VTAPE9L5 Unavailable LTO5 0 0 0 - lib1 4105 -
VTAPE8L5 Unavailable LTO5 0 0 0 - lib1 4104 -
VTAPE7L5 Unavailable LTO5 0 0 0 - lib1 4103 -
VTAPE6L5 Unavailable LTO5 0 0 0 - lib1 4102 -
VTAPE5L5 Unavailable LTO5 0 0 0 - lib1 4101 -
VTAPE4L5 Unavailable LTO5 0 0 0 - lib1 4100 -
VTAPE3L5 Unavailable LTO5 0 0 0 - lib1 4099 -

© IBM Corporation Page 16


5. Spectrum Archive features

In this chapter, basic operations for Spectrum Archive are described. You can try each
section independently and learn how to perform an operation and how it works.

5.1. Manual migration


Objectives:
 Check the file status to see if the file data is located on disk or tape
 Understand the migration policy rule file
 Manually execute the migration policy and verify the file data has been migrated

Steps:

Create test files under a test directory /gpfs/fs1/archive.


[root@spectrumscale ~]# mkdir /gpfs/fs1/archive
[root@spectrumscale ~]# cd /gpfs/fs1/archive
[root@spectrumscale archive]# dd if=/dev/urandom of=10Mfile_1 count=1 bs=10M
[root@spectrumscale archive]# for i in $(seq 2 3); do cp 10Mfile_1 10Mfile_$i; done
[root@spectrumscale archive]# yes 'This is test' | dd of=text bs=2M count=1
[root@spectrumscale archive]# ls -la
total 32768
-rw-r--r--. 1 root root 10485760 Feb 3 00:43 10Mfile_1
-rw-r--r--. 1 root root 10485760 Feb 3 00:43 10Mfile_2
-rw-r--r--. 1 root root 10485760 Feb 3 00:43 10Mfile_3
-rw-r--r--. 1 root root 2097152 Feb 3 00:47 text

To see if a file data resides on disk or tape, the dsmls command or ltfsee info files
command can be used.
[root@spectrumscale archive]# dsmls
IBM Tivoli Storage Manager
Command Line Space Management Client Interface
Client Version 7, Release 1, Level 4.80

© IBM Corporation Page 17


Client date/time: 02/03/2016 00:48:05
(c) Copyright by IBM Corporation and other(s) 1990, 2015. All Rights Reserved.

ActS ResS ResB FSt Prvd FName

/gpfs/fs1/archive:
10485760 10485760 10240 r - 10Mfile_1
10485760 10485760 10240 r - 10Mfile_2
10485760 10485760 10240 r - 10Mfile_3
2097152 2097152 2048 r - text

In the above dsmls output, the "r" means the files are resident (on disk). The file data
exists only on disk.
[root@spectrumscale archive]# ltfsee info files /gpfs/fs1/archive/*
Name: /gpfs/fs1/archive/10Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/10Mfile_2
Tape id:- Status: resident
Name: /gpfs/fs1/archive/10Mfile_3
Tape id:- Status: resident
Name: /gpfs/fs1/archive/text
Tape id:- Status: resident

Other file status are


 premigrated (p, data exists on both disk and tape)
 migrated (m, data exists only on tape)

Now, a manual policy execution will be done to migrate these test files to tapes.
Policy file is located at: /root/policy/policy_migArchiveDir.
The contents of the policy file are:
define(
exclude_list,
PATH_NAME LIKE '/gpfs/fs1/.ltfsee/%'

© IBM Corporation Page 18


OR PATH_NAME LIKE '/gpfs/fs1/.SpaceMan/%'
OR PATH_NAME LIKE '/gpfs/fs1/.snapshots/%'
)

define(
is_migrated,
MISC_ATTRIBUTES LIKE '%V%'
)

RULE EXTERNAL POOL 'Archive_files'


EXEC '/opt/ibm/ltfsee/bin/ltfsee'
OPTS '-p pool1@lib1'

RULE 'Mig-test' MIGRATE FROM POOL 'system'


TO POOL 'Archive_files'
WHERE (
PATH_NAME LIKE '/gpfs/fs1/archive/%'
AND NOT (exclude_list)
AND NOT (is_migrated)
AND (KB_ALLOCATED > 1024)
)

When this policy is executed, it will migrate all the resident/pre-migrated files under
/gpfs/fs1/archive directory from disk to tape.

Note: Files less than 1 MB in size are excluded from migration for best practice.
Refer to chapter 6 Migration policy rule variations for more information about the
policy.

Run mmapplypolicy to execute the policy.


[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -P /root/policy/policy_migArchiveDir
[I] GPFS Current Data Pool Utilization in KB and %
Pool_Name KB_Occupied KB_Total Percent_Occupied
system 1394432 8388608 16.622924805%
[I] 4580 of 699072 inodes used: 0.655154%.
[I] Loaded policy rules from /root/policy/policy_migArchiveDir.

© IBM Corporation Page 19


Evaluating policy rules with CURRENT_TIMESTAMP = 2016-02-03@05:52:51 UTC
Parsed 2 policy rules.

RULE EXTERNAL POOL 'Archive_files'


EXEC '/opt/ibm/ltfsee/bin/ltfsee'
OPTS '-p pool1@lib1'

RULE 'Mig-test' MIGRATE FROM POOL 'system'


TO POOL 'Archive_files'
WHERE (
PATH_NAME LIKE '/gpfs/fs1/archive/%'
AND NOT (PATH_NAME LIKE '/gpfs/fs1/.ltfsee/%'
OR PATH_NAME LIKE '/gpfs/fs1/.SpaceMan/%'
OR PATH_NAME LIKE '/gpfs/fs1/.snapshots/%'
)
AND NOT (MISC_ATTRIBUTES LIKE '%V%'
)
AND (KB_ALLOCATED > 1024)
)
[I] 2016-02-03@05:52:51.576 Directory entries scanned: 5.
[I] Directories scan: 4 files, 1 directories, 0 other objects, 0 'skipped' files and/or errors.
[I] 2016-02-03@05:52:51.578 Sorting 5 file list records.
[I] Inodes scan: 4 files, 1 directories, 0 other objects, 0 'skipped' files and/or errors.
[I] 2016-02-03@05:52:51.586 Policy evaluation. 5 files scanned.
[I] 2016-02-03@05:52:51.590 Sorting 4 candidate file list records.
[I] 2016-02-03@05:52:51.590 Choosing candidate files. 4 records scanned.
[I] Summary of Rule Applicability and File Choices:
Rule# Hit_Cnt KB_Hit Chosen KB_Chosen KB_Ill Rule
0 4 32768 4 32768 0 RULE
'Mig-test' MIGRATE FROM POOL 'system' TO POOL 'Archive_files' WHERE(.)

[I] Filesystem objects with no applicable rules: 1.

[I] GPFS Policy Decisions and File Choice Totals:

© IBM Corporation Page 20


Chose to migrate 32768KB: 4 of 4 candidates;
Predicted Data Pool Utilization in KB and %:
Pool_Name KB_Occupied KB_Total Percent_Occupied
system 1361664 8388608 16.232299805%
GLESL167I(00509): A list of files to be migrated has been sent to LTFS EE using scan id
2511602689.
GLESL038I(00555): Migration result: 4 succeeded, 0 failed, 0 duplicate, 0 duplicate wrong pool, 0
not found, 0 too small to qualify for migration.
[I] 2016-02-03@05:53:02.390 Policy execution. 4 files dispatched.
[I] A total of 4 files have been migrated, deleted or processed by an EXTERNAL EXEC/script;
0 'skipped' files and/or errors.

When the mmapplypolicy completes, the files should be migrated to tapes.


[root@spectrumscale ~]# dsmls /gpfs/fs1/archive
IBM Tivoli Storage Manager
Command Line Space Management Client Interface
Client Version 7, Release 1, Level 4.80
Client date/time: 02/03/2016 00:54:22
(c) Copyright by IBM Corporation and other(s) 1990, 2015. All Rights Reserved.

ActS ResS ResB FSt Prvd FName


<dir> 4096 0 - archive/

/gpfs/fs1/archive:
10485760 0 0 m ltfs 10Mfile_1
10485760 0 0 m ltfs 10Mfile_2
10485760 0 0 m ltfs 10Mfile_3
2097152 0 0 m ltfs text

[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/archive/*


Name: /gpfs/fs1/archive/10Mfile_1
Tape id:VTAPE2L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_2
Tape id:VTAPE2L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_3
Tape id:VTAPE2L5@lib1 Status: migrated

© IBM Corporation Page 21


Name: /gpfs/fs1/archive/text
Tape id:VTAPE2L5@lib1 Status: migrated

If you read the files, they will be recalled from the tapes.

[root@spectrumscale ~]# tail -5 /gpfs/fs1/archive/text


This is test
This is test
This is test
This is test
This

[root@spectrumscale ~]# dsmls /gpfs/fs1/archive/text


IBM Tivoli Storage Manager
Command Line Space Management Client Interface
Client Version 7, Release 1, Level 4.80
Client date/time: 02/03/2016 00:56:17
(c) Copyright by IBM Corporation and other(s) 1990, 2015. All Rights Reserved.

ActS ResS ResB FSt Prvd FName


2097152 2097152 2048 p ltfs text

[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/archive/text


Name: /gpfs/fs1/archive/text
Tape id:VTAPE2L5@lib1 Status: premigrated

Notice the file status is p (premigrated). After a read of the migrated file, the data will be
recalled on to disks but also the data on the tape is still valid.

If you modify the migrated (or premigrated) file, the status will be resident.
[root@spectrumscale archive]# echo aaa >>10Mfile_2

[root@spectrumscale ~]# dsmls /gpfs/fs1/archive/10Mfile_2


IBM Tivoli Storage Manager
Command Line Space Management Client Interface

© IBM Corporation Page 22


Client Version 7, Release 1, Level 4.80
Client date/time: 02/03/2016 00:57:59
(c) Copyright by IBM Corporation and other(s) 1990, 2015. All Rights Reserved.

ActS ResS ResB FSt Prvd FName


10485764 10485764 10248 r - 10Mfile_2

[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/archive/10Mfile_2


Name: /gpfs/fs1/archive/10Mfile_2
Tape id:- Status: resident

Cleanup the test environment.


[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

© IBM Corporation Page 23


5.2. Automatic migration
Objectives:
 Understand the policy rule for automatic migration
 Configure the automatic migration

Steps:

Create test files under a test directory /gpfs/fs1/archive and run manual migration. Make
sure all test files are migrated by running the dsmls command.
[root@spectrumscale ~]# mkdir /gpfs/fs1/archive
[root@spectrumscale ~]# cd /gpfs/fs1/archive
[root@spectrumscale archive]# dd if=/dev/urandom of=10Mfile_1 count=1 bs=10M
[root@spectrumscale archive]# for i in $(seq 2 3); do cp 10Mfile_1 10Mfile_$i; done
[root@spectrumscale archive]# mmapplypolicy /gpfs/fs1/archive -P
/root/policy/policy_migArchiveDir

Add a callback to GPFS as follows.


[root@spectrumscale ~]# mmaddcallback MIGRATION --command /usr/lpp/mmfs/bin/mmstartpolicy --event
lowDiskSpace --parms "%eventName %fsName --single-instance"

[root@spectrumscale ~]# mmlscallback MIGRATION


MIGRATION
command = /usr/lpp/mmfs/bin/mmstartpolicy
event = lowDiskSpace
parms = %eventName %fsName --single-instance

The policy file for auto migration is located at: /root/policy/policy_migAuto. Unlike the
policy_migArchiveDir, note that the policy_migAuto does not pick up files in premigrate
state. THRESHOLD statement is described later in this section.
define(
exclude_list,
PATH_NAME LIKE '/gpfs/fs1/.ltfsee/%'
OR PATH_NAME LIKE '/gpfs/fs1/.SpaceMan/%'
OR PATH_NAME LIKE '/gpfs/fs1/.snapshots/%'

© IBM Corporation Page 24


)

define(
is_premigrated,
MISC_ATTRIBUTES LIKE '%M%' AND MISC_ATTRIBUTES NOT LIKE '%V%'
)

define(
is_migrated,
MISC_ATTRIBUTES LIKE '%V%'
)

RULE 'SYSTEM_POOL_PLACEMENT_RULE' SET POOL 'system'

RULE EXTERNAL POOL 'Archive_files'


EXEC '/opt/ibm/ltfsee/bin/ltfsee'
OPTS '-p pool1@lib1'

RULE 'ARCHIVE_FILES' MIGRATE FROM POOL 'system'


TO POOL 'Archive_files'
THRESHOLD (0, 0)
WHERE (
PATH_NAME LIKE '/gpfs/fs1/archive/%'
AND NOT (exclude_list)
AND NOT (is_migrated)
AND NOT (is_premigrated)
AND (KB_ALLOCATED > 1024)
)

This time, apply the policy by mmchpolicy command.


[root@spectrumscale archive]# mmchpolicy fs1 /root/policy/policy_migAuto -t "System policy for
LTFS"
Validated policy `System policy for LTFS': Parsed 3 policy rules.
Policy `System policy for LTFS' installed and broadcast to all nodes.

Create a new test file under /gpfs/fs1/archive by copying a test file.

© IBM Corporation Page 25


[root@spectrumscale archive]# cp 10Mfile_1 10Mfile_AutoMigTest

[root@spectrumscale archive]# dsmls


IBM Tivoli Storage Manager
Command Line Space Management Client Interface
Client Version 7, Release 1, Level 4.80
Client date/time: 02/03/2016 01:03:29
(c) Copyright by IBM Corporation and other(s) 1990, 2015. All Rights Reserved.

ActS ResS ResB FSt Prvd FName

/gpfs/fs1/archive:
10485760 10485760 10240 p ltfs 10Mfile_1
10485760 0 0 m ltfs 10Mfile_2
10485760 0 0 m ltfs 10Mfile_3
10485760 10485760 10240 r - 10Mfile_AutoMigTest

The migration will be invoked for the newly created files after 2 minutes at most.

The file status has changed from resident to migrated.


[root@spectrumscale archive]# dsmls
...
ActS ResS ResB FSt Prvd FName
...
10485760 0 0 m ltfs 10Mfile_AutoMigTest

Notice that premigrated file is not migrated as defined in the policy.


The policy rule used for this test had THRESHOLD(0, 0) in the RULE MIGRATE
statement so that the lowDiskSpace event would always occur regardless of the disk
space. These values can be adjusted such as THRESHOLD (80, 60) when deploying at
customer systems so that the migration would occur only when 80% or more disk space
is being used and the migration will continue to run until the consumed disk space
lowers 60%.

© IBM Corporation Page 26


Furthermore, WEIGHT can be used to control the order of files to migrate. For example,
WEIGHT(CURRENT_TIMESTAMP - ACCESS_TIME) will make the migration to run
from the files with the oldest POSIX atime. See details at 6.3
The IBM red book "IBM Linear Tape File System Enterprise Edition V1.1.1.2 Installation
and Configuration Guide" has the detail description.

For cleaning up, delete the callback, set a default policy and delete test files.

[root@spectrumscale ~]# mmdelcallback MIGRATION


[root@spectrumscale ~]# mmchpolicy fs1 DEFAULT

[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive


[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

© IBM Corporation Page 27


5.3. Reconciliation/Reclamation
Objectives:
 See how GPFS and tape filesystem (LTFS) can be out of sync
 Run ltfsee reconcile command to synchronize LTFS and GPFS
 Run ltfsee reclaim command to defrag a tape

Steps:

Create test files under a test directory /gpfs/fs1/archive and run manual migration. Make
sure all test files are migrated.
[root@spectrumscale ~]# mkdir /gpfs/fs1/archive
[root@spectrumscale ~]# cd /gpfs/fs1/archive
[root@spectrumscale archive]# dd if=/dev/urandom of=10Mfile_1 count=1 bs=10M
[root@spectrumscale archive]# for i in $(seq 2 3); do cp 10Mfile_1 10Mfile_$i; done
[root@spectrumscale archive]# mmapplypolicy /gpfs/fs1/archive -P
/root/policy/policy_migArchiveDir

For this test, we want to delete a migrated file.


First, check the tape ID of a migrated file.

[root@spectrumscale archive]# ltfsee info files /gpfs/fs1/archive/10Mfile_1


Name: /gpfs/fs1/archive/10Mfile_1
Tape id:VTAPE1L5@lib1 Status: migrated

In this case the 10Mfile_1 file data is in Tape VTAPE1L5. The tape ID can be different
on each virtual machine.
Now, delete the file.
[root@spectrumscale ~]# rm -f /gpfs/fs1/archive/10Mfile_1

Check the files in tape by looking at /ltfs/<tape id>. It is expected that the file 10Mfile_1
still exists in the corresponding tape. The actual output may differ in each test
environment.
[root@spectrumscale archive]# ls -l /ltfs/VTAPE1L5/gpfs/fs1/archive

© IBM Corporation Page 28


total 0
lrwxrwxrwx. 1 root root 81 Feb 3 01:13 10Mfile_1 -> ../../../.LTFSEE_DATA/10588301405041815909-
9471713600281378826-1782146295-58432-0
lrwxrwxrwx. 1 root root 81 Feb 3 01:13 10Mfile_2 -> ../../../.LTFSEE_DATA/10588301405041815909-
9471713600281378826-1484274349-58412-0
lrwxrwxrwx. 1 root root 81 Feb 3 01:13 10Mfile_3 -> ../../../.LTFSEE_DATA/10588301405041815909-
9471713600281378826-1722631287-58396-0

Run the reconcile command. This will synchronize the tape and the disk. The deleted
files in gpfs are also deleted in /ltfs.

[root@spectrumscale archive]# ltfsee reconcile -p pool1 -l lib1 -t VTAPE1L5


GLESS016I(00178): Reconciliation requested.
GLESM401I(00188): Loaded the global configuration.
GLESS049I(00821): Tapes to reconcile: VTAPE1L5 .
GLESS050I(00833): GPFS file systems involved: /gpfs/fs1 .
GLESS134I(00887): Reserving tapes for reconciliation.
GLESS135I(00920): Reserved tapes: VTAPE1L5 .
GLESS054I(01002): Creating GPFS snapshots:
GLESS055I(01009): Creating GPFS snapshot for /gpfs/fs1 ( /dev/fs1 ).
GLESS056I(01035): Scanning GPFS snapshots:
GLESS057I(01041): Scanning GPFS snapshot of /gpfs/fs1 ( /dev/fs1 ).
GLESS060I(01087): Processing scan results:
GLESS061I(01093): Processing scan results for /gpfs/fs1 ( /dev/fs1 ).
GLESS141I(01108): Removing stale DMAPI attributes:
GLESS142I(01114): Removing stale DMAPI attributes for /gpfs/fs1 ( /dev/fs1 ).
GLESS063I(01153): Reconciling the tapes:
GLESS001I(01214): Reconciling tape VTAPE1L5 has been requested.
GLESS002I(01243): Reconciling tape VTAPE1L5 complete.
GLESS137I(01365): Removing tape reservations.
GLESS058I(02304): Removing GPFS snapshots:
GLESS059I(02310): Removing GPFS snapshot of /gpfs/fs1 ( /dev/fs1 ).
GLESL172I(00152): Synchronizing LTFS EE tapes information.

[root@spectrumscale archive]# ls -l /ltfs/VTAPE1L5/gpfs/fs1/archive


total 0
lrwxrwxrwx. 1 root root 81 Feb 3 01:16 10Mfile_2 -> ../../../.LTFSEE_DATA/10588301405041815909-

© IBM Corporation Page 29


9471713600281378826-1484274349-58412-0
lrwxrwxrwx. 1 root root 81 Feb 3 01:16 10Mfile_3 -> ../../../.LTFSEE_DATA/10588301405041815909-
9471713600281378826-1722631287-58396-0

Furthermore, run the reclaim command. This will copy the data in the specified tape to a
separate tape and the data will be non-fragmented. The tape is automatically removed
from pool1.
[root@spectrumscale archive]# ltfsee reclaim -p pool1 -t VTAPE1L5
Start reclaiming the following 1 tapes:
VTAPE1L5 .
GLESL372I(00638): Validating tape VTAPE1L5 in pool pool1
Tape VTAPE1L5 is unmounted because it is inserted into the drive.
Tape VTAPE1L5 successfully reclaimed, formatted, and removed from storage pool pool1.
Reclamation complete. 1 tapes reclaimed, 1 tapes removed from the storage pool.

[root@spectrumscale archive]# ltfsee info tapes


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE2L5 Valid LTO5 2 2 0 pool1 lib1 259
VDRIVE0003
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 257
VDRIVE0001
VTAPE9L5 Unavailable LTO5 0 0 0 - lib1 4105 -
VTAPE8L5 Unavailable LTO5 0 0 0 - lib1 4104 -
VTAPE7L5 Unavailable LTO5 0 0 0 - lib1 4103 -
VTAPE6L5 Unavailable LTO5 0 0 0 - lib1 4102 -
VTAPE5L5 Unavailable LTO5 0 0 0 - lib1 4101 -
VTAPE4L5 Unavailable LTO5 0 0 0 - lib1 4100 -
VTAPE3L5 Unavailable LTO5 0 0 0 - lib1 4099 -
VTAPE1L5 Unavailable LTO5 0 0 0 - lib1 4097 -

[root@spectrumscale archive]# ls -l /gpfs/fs1/archive


total 0
-rw-r--r--. 1 root root 10485760 Feb 3 01:11 10Mfile_2
-rw-r--r--. 1 root root 10485760 Feb 3 01:11 10Mfile_3

[root@spectrumscale archive]# ls -l /gpfs/VTAPE1L5


ls: cannot access /gpfs/VTAPE1L5: No such file or directory

© IBM Corporation Page 30


Putting back the reclaimed tape to the pool. The tape is formatted as a completely new
LTFS tape and added to the pool.
[root@spectrumscale archive]# ltfsee pool add -p pool1 -t VTAPE1L5 –e

[root@spectrumscale archive]# ltfsee info tapes


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 4097 -
VTAPE2L5 Valid LTO5 2 2 0 pool1 lib1 259
VDRIVE0003
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 257
VDRIVE0001
VTAPE9L5 Unavailable LTO5 0 0 0 - lib1 4105 -
VTAPE8L5 Unavailable LTO5 0 0 0 - lib1 4104 -
VTAPE7L5 Unavailable LTO5 0 0 0 - lib1 4103 -
VTAPE6L5 Unavailable LTO5 0 0 0 - lib1 4102 -
VTAPE5L5 Unavailable LTO5 0 0 0 - lib1 4101 -
VTAPE4L5 Unavailable LTO5 0 0 0 - lib1 4100 -
VTAPE3L5 Unavailable LTO5 0 0 0 - lib1 4099 -

Cleanup the test environment.


[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

© IBM Corporation Page 31


5.4. Export/Import
Objectives:
 Run ltfsee export command to export a LTFS tape.
 Run ltfsee import command to import a LTFS tape. Verify how imported files/dirs
appear in the file system.

Steps:

Create test files under a test directory /gpfs/fs1/archive and run manual migration. Make
sure all test files are migrated.
(22:05:39) localhost:~ # mkdir /gpfs/fs1/archive
(22:05:46) localhost:~ # cd /gpfs/fs1/archive
(22:05:46) localhost:/gpfs/fs1/archive # dd if=/dev/urandom of=10Mfile_1 count=1 bs=10M
(22:05:47) localhost:/gpfs/fs1/archive # for i in $(seq 2 3); do cp 10Mfile_1 10Mfile_$i; done

(22:05:49) localhost:/gpfs/fs1/archive # mmapplypolicy /gpfs/fs1/archive -P


/root/policy/policy_migArchiveDir

Check tape ID that contains one or more files by running ltfsee info files command. Here,
use the tape VTAPE2L5 that includes 3 files for export/import test.

[root@spectrumscale archive]# find /gpfs/fs1/archive -type f | xargs ltfsee info files


Name: /gpfs/fs1/archive/10Mfile_1
Tape id:VTAPE2L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_2
Tape id:VTAPE2L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_3
Tape id:VTAPE2L5@lib1 Status: migrated

Run the export of the tape that contains the test files.
[root@spectrumscale archive]# ltfsee export -p pool1 -t VTAPE2L5
GLESS016I(00178): Reconciliation requested.
GLESM401I(00188): Loaded the global configuration.

© IBM Corporation Page 32


GLESS049I(00821): Tapes to reconcile: VTAPE2L5 .
GLESS050I(00833): GPFS file systems involved: /gpfs/fs1 .
GLESS134I(00887): Reserving tapes for reconciliation.
GLESS135I(00920): Reserved tapes: VTAPE2L5 .
GLESS054I(01002): Creating GPFS snapshots:
GLESS055I(01009): Creating GPFS snapshot for /gpfs/fs1 ( /dev/fs1 ).
GLESS056I(01035): Scanning GPFS snapshots:
GLESS057I(01041): Scanning GPFS snapshot of /gpfs/fs1 ( /dev/fs1 ).
GLESS060I(01087): Processing scan results:
GLESS061I(01093): Processing scan results for /gpfs/fs1 ( /dev/fs1 ).
GLESS141I(01108): Removing stale DMAPI attributes:
GLESS142I(01114): Removing stale DMAPI attributes for /gpfs/fs1 ( /dev/fs1 ).
GLESS063I(01153): Reconciling the tapes:
GLESS086I(01169): Reconcile is skipped for tape VTAPE2L5 because it is already reconciled.
GLESS137I(01365): Removing tape reservations.
GLESS058I(02304): Removing GPFS snapshots:
GLESS059I(02310): Removing GPFS snapshot of /gpfs/fs1 ( /dev/fs1 ).
Export of tape VTAPE2L5 has been requested...
Export of tape VTAPE2L5 complete.
GLESL372I(00638): Validating tape VTAPE2L5 in pool pool1
Tape VTAPE2L5 is unmounted because it is inserted into the drive.
Removing tape VTAPE2L5 from storage pool pool1.

When the export is done, the test files should be deleted from GPFS and the tape
should be removed from pool. Furthermore, in this case, the /gpfs/fs1/archive does not
contain any file after export, the directory itself is removed from GPFS.
[root@spectrumscale ~]# ls -l /gpfs/fs1/archive
ls: cannot access /gpfs/fs1/archive: No such file or directory

[root@spectrumscale ~]# ltfsee info tapes


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 258
VDRIVE0002
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 257
VDRIVE0001
VTAPE9L5 Unavailable LTO5 0 0 0 - lib1 4105 -
VTAPE8L5 Unavailable LTO5 0 0 0 - lib1 4104 -

© IBM Corporation Page 33


VTAPE7L5 Unavailable LTO5 0 0 0 - lib1 4103 -
VTAPE6L5 Unavailable LTO5 0 0 0 - lib1 4102 -
VTAPE5L5 Unavailable LTO5 0 0 0 - lib1 4101 -
VTAPE4L5 Unavailable LTO5 0 0 0 - lib1 4100 -
VTAPE3L5 Unavailable LTO5 0 0 0 - lib1 4099 -
VTAPE2L5 Exported LTO5 0 0 0 - lib1 4098 -

Now, running the import. When the import is done, the files in the imported tape will be
visible under IMPORT directory. The status will be "migrated".
[root@spectrumscale ~]# ltfsee import -p pool1 -t VTAPE2L5
GLESL042I(00640): Adding tape VTAPE2L5 to storage pool pool1.
Tape VTAPE2L5 successfully checked.
Added tape VTAPE2L5 to pool pool1 successfully.
Import of tape VTAPE2L5 has been requested.
Import of tape VTAPE2L5 complete.

[root@spectrumscale ~]# find /gpfs/fs1/IMPORT


/gpfs/fs1/IMPORT
/gpfs/fs1/IMPORT/VTAPE2L5
/gpfs/fs1/IMPORT/VTAPE2L5/gpfs
/gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1
/gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive
/gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive/10Mfile_1
/gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive/10Mfile_2
/gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive/10Mfile_3

[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive/*


Name: /gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive/10Mfile_1
Tape id:VTAPE2L5@lib1 Status: migrated
Name: /gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive/10Mfile_2
Tape id:VTAPE2L5@lib1 Status: migrated
Name: /gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive/10Mfile_3
Tape id:VTAPE2L5@lib1 Status: migrated

If you read the file, a recall occurs and the status changes to premigrated.

© IBM Corporation Page 34


[root@spectrumscale ~]# cat /gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive/10Mfile_1 >/dev/null

[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive/10Mfile_1


Name: /gpfs/fs1/IMPORT/VTAPE2L5/gpfs/fs1/archive/10Mfile_1
Tape id:VTAPE2L5@lib1 Status: premigrated

Cleanup the test environment.


[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive /gpfs/fs1/IMPORT
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

© IBM Corporation Page 35


5.5. Bulk Recall
Objective:
 Run ltfsee recall command to execute selective recalls

The prior migration test cases demonstrated a transparent recall of a file by running "cat
<migrated file>". In addition to the transparent recall when a migrated file is read by a
system call, an explicit recall of a specified group of files can be executed in a
performance optimized manner (Referred to as selective bulk recall).

Steps:

Create test files.


[root@spectrumscale ~]# mkdir /gpfs/fs1/archive
[root@spectrumscale ~]# cd /gpfs/fs1/archive
[root@spectrumscale archive]# dd if=/dev/urandom of=10Mfile_1 count=1 bs=10M
[root@spectrumscale archive]# for i in $(seq 2 10); do cp 10Mfile_1 10Mfile_$i; done
[root@spectrumscale archive]# mmapplypolicy /gpfs/fs1/archive -P
/root/policy/policy_migArchiveDir

10 test files have been migrated.


[root@spectrumscale archive]# find /gpfs/fs1/archive -type f | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive/10Mfile_1
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_10
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_2
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_3
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_4
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_5
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_6

© IBM Corporation Page 36


Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_7
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_8
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/10Mfile_9
Tape id:VTAPE0L5@lib1 Status: migrated

Here, ltfsee recall command can be executed by passing the file names.
[root@spectrumscale archive]# find /gpfs/fs1/archive -type f | ltfsee recall
GLESL277I(00303): The ltfsee recall command is called without specifying an input file waiting
for standard input.
If necessary press ^D to exit.
GLESL268I(00142): 10 file name(s) have been provided to recall.
GLESL263I(00191): Recall result: 10 succeeded, 0 failed, 0 duplicate, 0 not migrated, 0 not
found.

[root@spectrumscale archive]# find /gpfs/fs1/archive -type f | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive/10Mfile_1
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_10
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_2
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_3
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_4
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_5
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_6
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_7
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_8
Tape id:VTAPE0L5@lib1 Status: premigrated

© IBM Corporation Page 37


Name: /gpfs/fs1/archive/10Mfile_9
Tape id:VTAPE0L5@lib1 Status: premigrated

Also, a file list can be passed.


For testing purpose, run the migration policy again and have 10 files in migrated state.
[root@spectrumscale archive]# mmapplypolicy /gpfs/fs1/archive -P
/root/policy/policy_migArchiveDir

This time, create a file list of these files and pass it to ltfsee recall command.
[root@spectrumscale archive]# find /gpfs/fs1/archive -type f -name "10Mfile*" >/tmp/file_list
[root@spectrumscale archive]# cat /tmp/file_list
/gpfs/fs1/archive/10Mfile_6
/gpfs/fs1/archive/10Mfile_7
/gpfs/fs1/archive/10Mfile_8
/gpfs/fs1/archive/10Mfile_10
/gpfs/fs1/archive/10Mfile_1
/gpfs/fs1/archive/10Mfile_4
/gpfs/fs1/archive/10Mfile_2
/gpfs/fs1/archive/10Mfile_3
/gpfs/fs1/archive/10Mfile_9
/gpfs/fs1/archive/10Mfile_5

[root@spectrumscale archive]# ltfsee recall -f /tmp/file_list


GLESL268I(00142): 10 file name(s) have been provided to recall.
GLESL263I(00191): Recall result: 10 succeeded, 0 failed, 0 duplicate, 0 not migrated, 0 not
found.

[root@spectrumscale archive]# find /gpfs/fs1/archive -type f | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive/10Mfile_1
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_10
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_2
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_3
Tape id:VTAPE0L5@lib1 Status: premigrated

© IBM Corporation Page 38


Name: /gpfs/fs1/archive/10Mfile_4
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_5
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_6
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_7
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_8
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_9
Tape id:VTAPE0L5@lib1 Status: premigrated

Lastly, if a customer has millions of files to migrate, the find command can be slow. The
mmapplypolicy would be much faster to generate the file list. The following policy can
be used to let mmapplypolicy find the files and invoke ltfsee recall.
/root/policy/policy_recallArchiveDir
RULE EXTERNAL POOL 'pool1'
EXEC '/opt/ibm/ltfsee/bin/ltfsee'

RULE 'ee_recall' MIGRATE FROM POOL 'pool1' TO POOL 'system'


WHERE
(
PATH_NAME LIKE '/gpfs/fs1/archive/%'
)

Note that the rule ee_recall indicating data movement from pool1 (LTFS/tape) to system
(GPFS/disk).

Run a manual migration to migrate all test files.


(08:44:14) localhost:~ # mmapplypolicy /gpfs/fs1/archive -P /root/policy/policy_migArchiveDir

Run the policy and verify the status.


[root@spectrumscale archive]# mmapplypolicy /gpfs/fs1/archive -L 6 -P

© IBM Corporation Page 39


/root/policy/policy_recallArchiveDir

[root@spectrumscale archive]# find /gpfs/fs1/archive -type f | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive/10Mfile_1
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_10
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_2
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_3
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_4
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_5
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_6
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_7
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_8
Tape id:VTAPE0L5@lib1 Status: premigrated
Name: /gpfs/fs1/archive/10Mfile_9
Tape id:VTAPE0L5@lib1 Status: premigrated

Cleanup the test environment.


[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

© IBM Corporation Page 40


5.6. Preserving file system objects on tape
Objectives:
 Run a policy to save symbolic links and empty directories on a tape
 Run ltfsee rebuild or ltfsee import to restore the file system objects from the tape to
the file system

Symbolic links, empty regular files, and empty directories are some file system objects
that do not contain data or content. These can not be migrated to tapes by the ltfsee
migrate command.
The policy rules that have been used in this guide excludes directories and symbolic
links by default. Also, (KB_ALLOCATED > 1024) statement excludes the empty file.
(Note that non-empty directories are saved in tapes).
While this is OK for pure space management purpose, a customer may want to use
tapes in the following ways:
 Use tape export/import to replicate the entire file system from one system to another
 Use tape as a complete backup of the file system so that if the file system is
corrupted, it can be recovered from the tape
For these needs, the ltfsee save command is provided.

Steps:
First, a simple file list will be created and used for saving the data.
Create the test files.
[root@spectrumscale archive]# mkdir dir emptydir
[root@spectrumscale archive]# cd dir
[root@spectrumscale dir]# cp ../10Mfile_1 .
[root@spectrumscale dir]# touch emptyFile
[root@spectrumscale dir]# ln -s 10Mfile_1 sln_10Mfile_1
[root@spectrumscale dir]# ls -lR /gpfs/fs1/archive^C
[root@spectrumscale dir]# cd

[root@spectrumscale ~]# ls -lR /gpfs/fs1/archive


/gpfs/fs1/archive:
total 10240
-rw-r--r--. 1 root root 10485760 Feb 3 02:17 10Mfile_1

© IBM Corporation Page 41


drwxr-xr-x. 2 root root 4096 Feb 3 02:17 dir
drwxr-xr-x. 2 root root 4096 Feb 3 02:17 emptydir

/gpfs/fs1/archive/dir:
total 10240
-rw-r--r--. 1 root root 10485760 Feb 3 02:17 10Mfile_1
-rw-r--r--. 1 root root 0 Feb 3 02:17 emptyFile
lrwxrwxrwx. 1 root root 9 Feb 3 02:17 sln_10Mfile_1 -> 10Mfile_1

/gpfs/fs1/archive/emptydir:
total 0

[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/archive/emptydir/


Name: /gpfs/fs1/archive/emptydir/
Tape id:- Status: resident

[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/archive/dir/sln_10Mfile_1


Name: /gpfs/fs1/archive/dir/sln_10Mfile_1
Tape id:- Status: resident

Then, create a following file list.


[root@spectrumscale ~]# cat /tmp/savelist
/gpfs/fs1/archive/emptydir
pool1

/gpfs/fs1/archive/dir/sln_10Mfile_1
pool1

[root@spectrumscale ~]#

Attention: Each entry must consist of 3 lines, the last line being blank.

Then, execute
[root@spectrumscale ~]# ltfsee save -f /tmp/savelist
GLESL279I(01252): Save result: 2 succeeded, 0 failed, 0 duplicate, 0 duplicate wrong pool, 0 not
found, 0 skipped.

© IBM Corporation Page 42


After completion, the ltfsee info files command can be used to verify the status. The
output below shows that the saved data is stored in VTAPE2L5.
[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/archive/emptydir/
Name: /gpfs/fs1/archive/emptydir/
Tape id:(VTAPE1L5@lib1) Status: unknown

[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/archive/dir/sln_10Mfile_1


Name: /gpfs/fs1/archive/dir/sln_10Mfile_1
Tape id:(VTAPE1L5@lib1) Status: unknown

In the above example the Status result is unknown. In that case, the tape needs to be
unmounted first by ltfsee tape move homeslot command and then the ltfsee info files
command can be re-run.

[root@spectrumscale ~]# ltfsee tape move homeslot -t VTAPE1L5 -p pool1 -l lib1


Tape VTAPE1L5 is skipped to move because it is already in the target slot.

[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/archive/emptydir/


Name: /gpfs/fs1/archive/emptydir/
Tape id:VTAPE1L5@lib1 Status: saved

[root@spectrumscale ~]# ltfsee info files /gpfs/fs1/archive/dir/sln_10Mfile_1


Name: /gpfs/fs1/archive/dir/sln_10Mfile_1
Tape id:VTAPE1L5@lib1 Status: saved

Next, in case there are a huge number of such objects, mmapplypolicy can be used.
/root/policy/policy_save
/*
Sample policy rules to save
symbolic links,
empty directories and
empty regular files
*/

© IBM Corporation Page 43


RULE
EXTERNAL LIST 'emptyobjects'
EXEC '/opt/ibm/ltfsee/bin/ltfseesave'
OPTS 'pool1'

define(DISP_XATTR,
CASE
WHEN XATTR($1) IS NULL
THEN '_NULL_'
ELSE XATTR($1)
END
)

RULE 'symoliclinks'
LIST 'emptyobjects'
DIRECTORIES_PLUS
/*
SHOW ('mode=' || SUBSTR(MODE,1,1) ||
' stime=' || DISP_XATTR('dmapi.IBMSTIME') ||
' ctime=' || VARCHAR(CHANGE_TIME) ||
' spath=' || DISP_XATTR('dmapi.IBMSPATH'))
*/
WHERE
( /* if the object is a symbolic link */
MISC_ATTRIBUTES LIKE '%L%'
)
AND
(
PATH_NAME NOT LIKE '%/.SpaceMan/%'
)
AND
(
( /* if the object has not been saved yet */
XATTR('dmapi.IBMSTIME') IS NULL
AND
XATTR('dmapi.IBMSPATH') IS NULL

© IBM Corporation Page 44


)
OR
( /* if the object is modified or renamed after it was saved */
TIMESTAMP(XATTR('dmapi.IBMSTIME')) < TIMESTAMP(CHANGE_TIME)
OR
XATTR('dmapi.IBMSPATH') != PATH_NAME
)
)

RULE 'directories'
LIST 'emptyobjects'
DIRECTORIES_PLUS
/*
SHOW ('mode=' || SUBSTR(MODE,1,1) ||
' stime=' || DISP_XATTR('dmapi.IBMSTIME') ||
' ctime=' || VARCHAR(CHANGE_TIME) ||
' spath=' || DISP_XATTR('dmapi.IBMSPATH'))
*/
WHERE
( /* if the object is a directory */
MISC_ATTRIBUTES LIKE '%D%'
)
AND
(
PATH_NAME NOT LIKE '%/.SpaceMan'
AND
PATH_NAME NOT LIKE '%/.SpaceMan/%'
)
AND
(
( /* directory's emptiness is checked in the later processing */
/* if the object has not been saved yet */
XATTR('dmapi.IBMSTIME') IS NULL
AND
XATTR('dmapi.IBMSPATH') IS NULL
)

© IBM Corporation Page 45


OR
( /* if the object is modified or renamed after it was saved */
TIMESTAMP(XATTR('dmapi.IBMSTIME')) < TIMESTAMP(CHANGE_TIME)
OR
XATTR('dmapi.IBMSPATH') != PATH_NAME
)
)

RULE 'emptyregularfiles'
LIST 'emptyobjects'
/*
SHOW ('mode=' || SUBSTR(MODE,1,1) ||
' stime=' || DISP_XATTR('dmapi.IBMSTIME') ||
' ctime=' || VARCHAR(CHANGE_TIME) ||
' spath=' || DISP_XATTR('dmapi.IBMSPATH'))
*/
WHERE
( /* if the object is a regular file */
MISC_ATTRIBUTES LIKE '%F%'
)
AND
(
PATH_NAME NOT LIKE '%/.SpaceMan/%'
)
AND
(
( /* if the size = 0 and the object has not been saved yet */
FILE_SIZE = 0
AND
XATTR('dmapi.IBMSTIME') IS NULL
AND
XATTR('dmapi.IBMSPATH') IS NULL
)
OR
( /* if the object is modified or renamed after it was saved */
FILE_SIZE = 0

© IBM Corporation Page 46


AND
(
TIMESTAMP(XATTR('dmapi.IBMSTIME')) < TIMESTAMP(CHANGE_TIME)
OR
XATTR('dmapi.IBMSPATH') != PATH_NAME
)
)
)

When executed, this policy will select


 directories that are not saved yet
 symbolic links that are not saved yet
 empty files that are not saved yet

At this point, the test file status is as follows:


[root@spectrumscale ~]# find /gpfs/fs1/archive | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive
Tape id:- Status: resident
Name: /gpfs/fs1/archive/10Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/dir
Tape id:- Status: resident
Name: /gpfs/fs1/archive/dir/10Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/dir/emptyFile
Tape id:- Status: resident
Name: /gpfs/fs1/archive/dir/sln_10Mfile_1
Tape id:VTAPE1L5@lib1 Status: saved
Name: /gpfs/fs1/archive/emptydir
Tape id:VTAPE1L5@lib1 Status: saved

So only 3 hits (1 empty file and 2 directories) are expected.


Execute the dry-run of the policy and verify.
[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -I test -L 6 -P /root/policy/policy_save

© IBM Corporation Page 47


...
[I] 2016-02-03@07:41:00.789 Policy evaluation. 7 files scanned.
[I] 2016-02-03@07:41:00.793 Sorting 3 candidate file list records.
WEIGHT(inf) LIST 'emptyobjects' /gpfs/fs1/archive/dir/emptyFile SHOW()d. \.......
WEIGHT(inf) LIST 'emptyobjects' /gpfs/fs1/archive SHOW()
WEIGHT(inf) LIST 'emptyobjects' /gpfs/fs1/archive/dir SHOW()
[I] 2016-02-03@07:41:00.793 Choosing candidate files. 3 records scanned.
...

When this is actually executed, the directory emptiness will be checked after the scan.
Since the 2 directories are not empty, only the empty file will be saved in a tape.
[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -P /root/policy/policy_save
...
[I] A total of 3 files have been migrated, deleted or processed by an EXTERNAL EXEC/script;
0 'skipped' files and/or errors.

Verify that the only emptyFile has been saved


[root@spectrumscale ~]# find /gpfs/fs1/archive | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive
Tape id:- Status: resident
Name: /gpfs/fs1/archive/10Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/dir
Tape id:- Status: resident
Name: /gpfs/fs1/archive/dir/10Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/dir/emptyFile
Tape id:(VTAPE2L5@lib1) Status: unknown
Name: /gpfs/fs1/archive/dir/sln_10Mfile_1
Tape id:VTAPE1L5@lib1 Status: saved
Name: /gpfs/fs1/archive/emptydir
Tape id:VTAPE1L5@lib1 Status: saved

If needed, unmount VTAPE2L5 to refresh the status.


[root@spectrumscale ~]# ltfsee tape move homeslot -t VTAPE2L5 -p pool1 -l lib1

© IBM Corporation Page 48


There are 2 ways to restore the filesystem from tapes, import or rebuild.
Since the tape export/import has already been demonstrated, ltfsee rebuild is shown
here.
[root@spectrumscale ~]# ltfsee rebuild -P /gpfs/fs1/restore -p pool1 -l lib1 -t VTAPE2L5
GLESL249I(00122): Rebuild of a file system into path /gpfs/fs1/restore is started by importing
tapes.
Import of tape VTAPE2L5 has been requested.
Import of tape VTAPE2L5 complete.
GLESL250I(00202): Rebuild of a file system into path /gpfs/fs1/restore is finished.

[root@spectrumscale ~]# find /gpfs/fs1/archive


/gpfs/fs1/archive
/gpfs/fs1/archive/emptydir
/gpfs/fs1/archive/10Mfile_1
/gpfs/fs1/archive/dir
/gpfs/fs1/archive/dir/sln_10Mfile_1
/gpfs/fs1/archive/dir/emptyFile
/gpfs/fs1/archive/dir/10Mfile_1

[root@spectrumscale ~]# find /gpfs/fs1/restore


/gpfs/fs1/restore
/gpfs/fs1/restore/gpfs
/gpfs/fs1/restore/gpfs/fs1
/gpfs/fs1/restore/gpfs/fs1/archive
/gpfs/fs1/restore/gpfs/fs1/archive/emptydir
/gpfs/fs1/restore/gpfs/fs1/archive/dir
/gpfs/fs1/restore/gpfs/fs1/archive/dir/sln_10Mfile_1
/gpfs/fs1/restore/gpfs/fs1/archive/dir/emptyFile

Cleanup the test environment.


[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive /gpfs/fs1/restore
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

© IBM Corporation Page 49


© IBM Corporation Page 50
5.7. Drive attributes
Objective:
 Assign a custom attribute to a drive.

A drive attribute can be assigned to each drive independently to limit tape related
operation that a drive can perform. Drive attributes can be assigned when a drive is
added to a library (ltfsee drive add command). To change attributes for a drive, the drive
needs to be removed once and added again with a new attributes.

There’s three attributes are defined and each is represented as a decimal value:
 Migration (4) – indicates a drive is allowed to perform migration job.
 Recall (2) – indicates a drive is allowed to perform recall job.
 Generic (1) – indicates a drive is allowed to perform other generic jobs that includes
formatting, reconciliation and reclamation etc.

By default all these three attributes are enabled when a drive is added. A custom
attribute can be assigned to a drive using the logical OR of decimal numeric values
corresponding to attributes to be enabled. For example, a logical OR value 6 can be
used if Migration and Recall should be assigned but Generic is not.

Run “ltfsee drive add” to see more details.

Steps:

Assuming that the pool1 already exists with three tapes.


[root@spectrumscale ~]# ltfsee info tapes
Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE2L5 Valid LTO5 2 2 0 pool1 lib1 258
VDRIVE0002
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 257
VDRIVE0001
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 259
VDRIVE0003
VTAPE9L5 Unavailable LTO5 0 0 0 - lib1 4105 -
VTAPE8L5 Unavailable LTO5 0 0 0 - lib1 4104 -

© IBM Corporation Page 51


VTAPE7L5 Unavailable LTO5 0 0 0 - lib1 4103 -
VTAPE6L5 Unavailable LTO5 0 0 0 - lib1 4102 -
VTAPE5L5 Unavailable LTO5 0 0 0 - lib1 4101 -
VTAPE4L5 Unavailable LTO5 0 0 0 - lib1 4100 -
VTAPE3L5 Unavailable LTO5 0 0 0 - lib1 4099 -

Remove one tape from the pool1 so that two tapes are assigned to it. If needed, the
tape needs to be unmounted.

[root@spectrumscale ~]# ltfsee pool remove -p pool1 -t VTAPE2L5


GLESL043I(00832): Removing tape VTAPE2L5 from storage pool pool1.
GLESL355E(00862): Tape VTAPE2L5 is in a drive or IE slot. Move the tape to the home slot before
it is removed.

[root@spectrumscale ~]# ltfsee tape move homeslot -p pool1 -t VTAPE2L5


GLESL373I(00636): Moving tape VTAPE2L5
Tape VTAPE2L5 is unmounted because it is inserted into the drive.
Tape VTAPE2L5 is moved successfully.

[root@spectrumscale ~]# ltfsee pool remove -p pool1 -t VTAPE2L5


GLESL043I(00832): Removing tape VTAPE2L5 from storage pool pool1.
Removed tape VTAPE2L5 from pool pool1 successfully.

Unmounts all the tapes from drives. Make sure that both tapes are not mounted in any
drive using ltfsee info tapes command (See ‘Drive’ column).

[root@spectrumscale ~]# ltfsee tape move homeslot -p pool1 -t VTAPE0L5


[root@spectrumscale ~]# ltfsee tape move homeslot -p pool1 -t VTAPE1L5

[root@spectrumscale ~]# ltfsee info tapes


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 4097 -
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 4096 -
VTAPE9L5 Unavailable LTO5 0 0 0 - lib1 4105 -
VTAPE8L5 Unavailable LTO5 0 0 0 - lib1 4104 -
VTAPE7L5 Unavailable LTO5 0 0 0 - lib1 4103 -

© IBM Corporation Page 52


VTAPE6L5 Unavailable LTO5 0 0 0 - lib1 4102 -
VTAPE5L5 Unavailable LTO5 0 0 0 - lib1 4101 -
VTAPE4L5 Unavailable LTO5 0 0 0 - lib1 4100 -
VTAPE3L5 Unavailable LTO5 0 0 0 - lib1 4099 -
VTAPE2L5 Unavailable LTO5 0 0 0 - lib1 4098 -

Create a test file.


[root@spectrumscale ~]# mkdir -p /gpfs/fs1/archive
[root@spectrumscale ~]# dd if=/dev/urandom of=/gpfs/fs1/archive/file1 count=1 bs=10M

By default all the four drives attached to the virtual appliance has all m(igration), r(ecall)
and g(eneric) attributes.

[root@spectrumscale ~]# ltfsee info drives


Drive S/N Status Type Role Library Address Node ID Tape Node Group
VDRIVE0000 Mounted LTO5 mrg lib1 256 1 VTAPE9L5 G0
VDRIVE0001 Mounted LTO5 mrg lib1 257 1 VTAPE2L5 G0
VDRIVE0002 Mounted LTO5 mrg lib1 258 1 VTAPE0L5 G0
VDRIVE0003 Mounted LTO5 mrg lib1 259 1 VTAPE1L5 G0
(00:34:54) localhost:~ #

Now do a migration. When it completes, see which drives has been used for that job. In
this case, VDRIVE0000 was used.

[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -P /root/policy/policy_migArchiveDir

[root@spectrumscale ~]# ltfsee info tapes | head -3


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 256
VDRIVE0000
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 4096 -

Then do a recall and see which drive was used. Since the tape cartridge that contains
the test data is already mounted by VDRIVE0000, the recall job will be done using the
same drive to avoid the cartridge movement.

© IBM Corporation Page 53


[root@spectrumscale ~]# cat /gpfs/fs1/archive/file1 >/dev/null

[root@spectrumscale ~]# ltfsee info tapes | head -3


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 256
VDRIVE0000
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 4096 -

Then also do a reconciliation and reclamation, verify which drives have been used.

[root@spectrumscale ~]# rm -f /gpfs/fs1/archive/file1


[root@spectrumscale ~]# ltfsee reconcile -p pool1
[root@spectrumscale ~]# ltfsee reclaim -p pool1

[root@spectrumscale ~]# ltfsee info tapes | head -3


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 256
VDRIVE0000
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 257
VDRIVE0001

As shown above if all attributes are assigned to all drives equally, tape exchanges are
avoided as much as possible.
For the next test, delete the pool1 once and also remove the drives from LTFS EE.

[root@spectrumscale ~]# ltfsee tape move homeslot -p pool1 -t VTAPE0L5 -t VTAPE1L5


[root@spectrumscale ~]# ltfsee pool remove -p pool1 -t VTAPE0L5 -t VTAPE1L5
[root@spectrumscale ~]# ltfsee pool delete -p pool1
[root@spectrumscale ~]# ltfsee drive remove -d VDRIVE0000
[root@spectrumscale ~]# ltfsee drive remove -d VDRIVE0001
[root@spectrumscale ~]# ltfsee drive remove -d VDRIVE0002
[root@spectrumscale ~]# ltfsee drive remove -d VDRIVE0003

[root@spectrumscale ~]# ltfsee info pools


Pool Name Total(TiB) Free(TiB) Unref(TiB) Tapes Type Library Node Group

© IBM Corporation Page 54


[root@spectrumscale ~]# ltfsee info drives
Drive S/N Status Type Role Library Address Node ID Tape Node Group
VDRIVE0003 Stock UNKNOWN --- lib1 259 - - -
VDRIVE0002 Stock UNKNOWN --- lib1 258 - - -
VDRIVE0001 Stock UNKNOWN --- lib1 257 - - -
VDRIVE0000 Stock UNKNOWN --- lib1 256 - - -

At this point all four drives are still virtually attached to the virtual machine but these
need to be added into LTFS EE drive list. ltfsee drive add command can be used and a
drive attribute can be given with each drive serial. In this case, assign the following
attribute to each tape drive:
 VDRIVE0000 – 4 (Migration)
 VDRIVE0001 – 2 (Recall)
 VDRIVE0002 – 1 (Generic)
 VDRIVE0003 – 1 (Generic)

[root@spectrumscale ~]# ltfsee drive add -d VDRIVE0000:4 -n 1


GLESL119I(00174): Drive VDRIVE0000:4 added successfully.
GLESL342W(00079): No drives can handle a recall job. It is recommended to set the recall drive
attribute (r) on at least one drive.
GLESL343W(00083): No drives can handle a generic job. It is recommended to set the generic drive
attribute (g) on at least one drive.

[root@spectrumscale ~]# ltfsee drive add -d VDRIVE0001:2 -n 1


GLESL119I(00174): Drive VDRIVE0001:2 added successfully.
GLESL343W(00083): No drives can handle a generic job. It is recommended to set the generic drive
attribute (g) on at least one drive.

[root@spectrumscale ~]# ltfsee drive add -d VDRIVE0002:1 -n 1


GLESL119I(00174): Drive VDRIVE0002:1 added successfully.

[root@spectrumscale ~]# ltfsee drive add -d VDRIVE0003:1 -n 1


GLESL119I(00174): Drive VDRIVE0003:1 added successfully.

[root@spectrumscale ~]# ltfsee info drives

© IBM Corporation Page 55


Drive S/N Status Type Role Library Address Node ID Tape Node Group
VDRIVE0000 Not mounted LTO5 m-- lib1 256 1 - G0
VDRIVE0001 Not mounted LTO5 -r- lib1 257 1 - G0
VDRIVE0002 Not mounted LTO5 --g lib1 258 1 - G0
VDRIVE0003 Not mounted LTO5 --g lib1 259 1 - G0

Now create the pool1 again with two tapes and create a test file.

[root@spectrumscale ~]# ltfsee pool create pool1


[root@spectrumscale ~]# ltfsee pool add -p pool1 -t VTAPE0L5 -t VTAPE1L5 -e

[root@spectrumscale ~]# mkdir -p /gpfs/fs1/archive


[root@spectrumscale ~]# dd if=/dev/urandom of=/gpfs/fs1/archive/file1 count=1 bs=10M

Do a migration in the same way. VDRIVE0000 will be used because it is the only drive
that can perform the migration job.
[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -P /root/policy/policy_migArchiveDir

[root@spectrumscale ~]# ltfsee info tapes | head -3


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 256
VDRIVE0000
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 4096 -

Then do a recall. Unlike the prior test case that used the default drive attributes, this
time, the tape drive that the recall role was assigned to will be used instead of the
migration drive.

[root@spectrumscale ~]# cat /gpfs/fs1/archive/file1 >/dev/null

[root@spectrumscale ~]# ltfsee info tapes | head -3


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 257
VDRIVE0001
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 4096 -

© IBM Corporation Page 56


Do a reconciliation and reclamation. Verify that the drives assigned with the Generic job
are used.

[root@spectrumscale ~]# rm -f /gpfs/fs1/archive/file1


[root@spectrumscale ~]# ltfsee reconcile -p pool1
[root@spectrumscale ~]# ltfsee reclaim -p pool1

[root@spectrumscale ~]# ltfsee info tapes | head -3


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 259
VDRIVE0003
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 258
VDRIVE0002

Cleanup the test environment. Assign the original ‘mrg’ attributes to all drives and
assign one tape to pool1 so that pool1 has three tapes in total.

[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive


[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

[root@spectrumscale ~]# ltfsee pool add -p pool1 -t VTAPE2L5 -e


[root@spectrumscale ~]# for i in 0 1 2 3; do ltfsee drive remove -d VDRIVE000$i; done
[root@spectrumscale ~]# for i in 0 1 2 3; do ltfsee drive add -d VDRIVE000$i -n 1; done

[root@spectrumscale ~]# ltfsee info drives


Drive S/N Status Type Role Library Address Node ID Tape Node Group
VDRIVE0000 Not mounted LTO5 mrg lib1 256 1 - G0
VDRIVE0001 Not mounted LTO5 mrg lib1 257 1 - G0
VDRIVE0002 Not mounted LTO5 mrg lib1 258 1 - G0
VDRIVE0003 Not mounted LTO5 mrg lib1 259 1 - G0

[root@spectrumscale ~]# ltfsee info pools


Pool Name Total(TiB) Free(TiB) Unref(TiB) Tapes Type Library Node Group
pool1 0.0 0.0 0.0 3 LTO lib1 G0

© IBM Corporation Page 57


[root@spectrumscale ~]# ltfsee info tapes
Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE2L5 Valid LTO5 2 2 0 pool1 lib1 4098 -
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 4097 -
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 4096 -
VTAPE9L5 Unavailable LTO5 0 0 0 - lib1 4105 -
VTAPE8L5 Unavailable LTO5 0 0 0 - lib1 4104 -
VTAPE7L5 Unavailable LTO5 0 0 0 - lib1 4103 -
VTAPE6L5 Unavailable LTO5 0 0 0 - lib1 4102 -
VTAPE5L5 Unavailable LTO5 0 0 0 - lib1 4101 -
VTAPE4L5 Unavailable LTO5 0 0 0 - lib1 4100 -
VTAPE3L5 Unavailable LTO5 0 0 0 - lib1 4099 -

6. Migration policy rule variations

This chapter describes best practices about policy rules when you configure automatic
migration for Spectrum Archive.

The policy rule file is a powerful interface provided by Spectrum Scale. Various
parameters can be used in the rule to specify which files get migrated to which external
pool. The detail syntax and the built-in features are described in Knowledge Center.
In this chapter, some basic/typical rules are introduced to explain how the policy rules
can be modified.
Also, aside from the test policy rules, a few template rule files with recommended
defines and comments are prepared under /root/policy/template directory. These can be
used to adjust to the physical Spectrum Archive environment.

The recommendations / best practice for creating a migration policy for Spectrum
Archive are as follows:
 Exclude Spectrum Archive internal directories (<mount point>/.ltfsee and <mount
point>/.SpaceMan)
 Exclude snapshot directories (.snapshots). The path can differ depending on the file
system configuration.

© IBM Corporation Page 58


 Exclude empty files. If empty files are not excluded by the policy rule, ltfsee migrate
command will show errors.
 Exclude small files (under 1 MB). Unless the file size is 0, the ltfsee migrate will
functionally work for the small files. However, having many small files in tapes adds
over head without reducing much spaces. It is highly recommended to exclude
small files.

These recommendations are included in the template policy files.

© IBM Corporation Page 59


6.1. Exclude
Objectives:
 Understand how to exclude specific file from policy scan result
 See how to test and debug policies

Files/dirs can be excluded from the migration by defining the exclude_list and using it in
the RULE <name> MIGRATE FROM POOL statement.
define(
exclude_list,
PATH_NAME LIKE '/gpfs/fs1/.ltfsee/%'
OR PATH_NAME LIKE '/gpfs/fs1/.SpaceMan/%'
OR PATH_NAME LIKE '/gpfs/fs1/.snapshots/%'
)
...
RULE 'ARCHIVE_FILES' MIGRATE FROM POOL 'system'
TO POOL 'Archive_files'
...
WHERE (
...
AND NOT (exclude_list)
)

The excluded files are:


 Spectrum Archive internal directories (all files under <mount point>/.ltfsee/, <mount
point>/.SpaceMan/),
 GPFS snapshot files (all files under <mount point>/.snapshots/)

Note:
Please note that these are highly recommended to be excluded.
The RULE statement used in the test had WHERE clause with PATH_NAME
LIKE '/gpfs/fs1/archive/%'. This means any files under /gpfs/fs1/archive are
subject to migration. Therefore, technically speaking, the Spectrum Archive
internal directories such as /gpfs/fs1/.ltfsee did not need to be explicitly specified
to be excluded. The sample policy still had the define for best practice.

© IBM Corporation Page 60


For this test case, one additional user data directory "<mount point>/archive/excludeme"
will be excluded.

Steps:
Locate a policy rule file /root/policy/policy_migExclude.
define(
exclude_list,
PATH_NAME LIKE '/gpfs/fs1/.ltfsee/%'
OR PATH_NAME LIKE '/gpfs/fs1/.SpaceMan/%'
OR PATH_NAME LIKE '/gpfs/fs1/.snapshots/%'
OR PATH_NAME LIKE '/gpfs/fs1/archive/excludeme/%'
)

define(
is_premigrated,
MISC_ATTRIBUTES LIKE '%M%' AND MISC_ATTRIBUTES NOT LIKE '%V%'
)

define(
is_migrated,
MISC_ATTRIBUTES LIKE '%V%'
)

RULE EXTERNAL POOL 'Archive_files'


EXEC '/opt/ibm/ltfsee/bin/ltfsee'
OPTS '-p pool1@lib1'

RULE 'Mig-test' MIGRATE FROM POOL 'system'


TO POOL 'Archive_files'
WHERE (
PATH_NAME LIKE '/gpfs/fs1/archive/%'
AND NOT (exclude_list)
AND NOT (is_migrated)
AND NOT (is_premigrated)

© IBM Corporation Page 61


AND (KB_ALLOCATED > 1024)
)

Now, create a few test files. For testing purpose 10 files will be created under
/gpfs/fs1/archive/excludeme and 1 file under /gpfs/fs1/archive/dir1
[root@spectrumscale ~]# mkdir -p /gpfs/fs1/archive/excludeme /gpfs/fs1/archive/dir1
[root@spectrumscale ~]# dd if=/dev/urandom of=/gpfs/fs1/archive/excludeme/10Mfile_1 bs=10M
count=1
[root@spectrumscale ~]# for i in $(seq 2 10); do cp /gpfs/fs1/archive/excludeme/10Mfile_1
/gpfs/fs1/archive/excludeme/10Mfile_$i; done
[root@spectrumscale ~]# cp /gpfs/fs1/archive/excludeme/10Mfile_1 /gpfs/fs1/archive/dir1/

So in this test case, there are 10 resident files under /gpfs/fs1/archive/excludeme and 1
under /gpfs/fs1/archive/dir1.
[root@spectrumscale ~]# dsmls /gpfs/fs1/archive/*
IBM Tivoli Storage Manager
Command Line Space Management Client Interface
Client Version 7, Release 1, Level 4.80
Client date/time: 02/03/2016 01:31:08
(c) Copyright by IBM Corporation and other(s) 1990, 2015. All Rights Reserved.

ActS ResS ResB FSt Prvd FName


<dir> 4096 0 - dir1/
<dir> 4096 0 - excludeme/

/gpfs/fs1/archive/dir1:
10485760 10485760 10240 r - 10Mfile_1

/gpfs/fs1/archive/excludeme:
10485760 10485760 10240 r - 10Mfile_1
10485760 10485760 10240 r - 10Mfile_10
10485760 10485760 10240 r - 10Mfile_2
10485760 10485760 10240 r - 10Mfile_3
10485760 10485760 10240 r - 10Mfile_4
10485760 10485760 10240 r - 10Mfile_5
10485760 10485760 10240 r - 10Mfile_6

© IBM Corporation Page 62


10485760 10485760 10240 r - 10Mfile_7
10485760 10485760 10240 r - 10Mfile_8
10485760 10485760 10240 r - 10Mfile_9

There is a dry-run option of the policy so that the specified policy rule syntax can be
verified before actually running.
[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -I test -P /root/policy/policy_migExclude
...
[I] 2016-02-03@06:31:39.709 Directory entries scanned: 14.
[I] Directories scan: 11 files, 3 directories, 0 other objects, 0 'skipped' files and/or errors.
[I] 2016-02-03@06:31:39.711 Sorting 14 file list records.
[I] Inodes scan: 11 files, 3 directories, 0 other objects, 0 'skipped' files and/or errors.
[I] 2016-02-03@06:31:39.731 Policy evaluation. 14 files scanned.
[I] 2016-02-03@06:31:39.734 Sorting 1 candidate file list records.
[I] 2016-02-03@06:31:39.735 Choosing candidate files. 1 records scanned.
[I] Summary of Rule Applicability and File Choices:
Rule# Hit_Cnt KB_Hit Chosen KB_Chosen KB_Ill Rule
0 1 10240 1 10240 0 RULE
'Mig-test' MIGRATE FROM POOL 'system' TO POOL 'Archive_files' WHERE(.)

[I] Filesystem objects with no applicable rules: 13.


...

The actual migration is not executed yet.


As shown, the policy syntax detected 11 files and 3 directories. Only 1 file (under dir1)
matched the given condition (shown by ‘Hit_Cnt’) while the other 10 files and 3
directories did not match (shown as ‘objects with no applicable rules’). The files were
excluded because they are placed under the excludeme directory. The directories were
excluded because all the directories are always determined to be not applicable for
migration. These results match the expected results when the migration policy is
actually run on the test environment.
If desired, -L <debug level, 3 - 6> can be specified to verify the exact file names.
For example,
[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -I test -L 3 -P
/root/policy/policy_migExclude
...

© IBM Corporation Page 63


WEIGHT(inf) MIGRATE /gpfs/fs1/archive/dir1/10Mfile_1 TO POOL Archive_files SHOW().
...

After the policy has been verified, the actual migration can be executed.
[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -P /root/policy/policy_migExclude
...
[I] Summary of Rule Applicability and File Choices:
Rule# Hit_Cnt KB_Hit Chosen KB_Chosen KB_Ill Rule
0 1 10240 1 10240 0 RULE
'Mig-test' MIGRATE FROM POOL 'system' TO POOL 'Archive_files' WHERE(.)
...
GLESL038I(00555): Migration result: 1 succeeded, 0 failed, 0 duplicate, 0 duplicate wrong pool, 0
not found, 0 too small to qualify for migration.
...

As expected, all files placed under excludeme are not migrated.


[root@spectrumscale ~]# find /gpfs/fs1/archive -type f | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive/dir1/10Mfile_1
Tape id:VTAPE1L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/excludeme/10Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_10
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_2
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_3
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_4
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_5
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_6
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_7
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_8

© IBM Corporation Page 64


Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_9
Tape id:- Status: resident

Cleanup the test environment.


[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

© IBM Corporation Page 65


6.2. Include
Objectives:
 Understand how to include specific file while parent of the file is excluded from
policy scan result

Sometimes, a customer may want to exclude a top directory but want to migrate a small
sub-directory under that top directory.
Similar to exclude, such case can be specified in the policy rule.
Locate /root/policy/policy_migInclude
define(
exclude_list,
PATH_NAME LIKE '/gpfs/fs1/.ltfsee/%'
OR PATH_NAME LIKE '/gpfs/fs1/.SpaceMan/%'
OR PATH_NAME LIKE '/gpfs/fs1/.snapshots/%'
OR PATH_NAME LIKE '/gpfs/fs1/archive/excludeme/%'
)

define(
include_list,
PATH_NAME LIKE '/gpfs/fs1/archive/excludeme/includeme/%'
)

define(
is_premigrated,
MISC_ATTRIBUTES LIKE '%M%' AND MISC_ATTRIBUTES NOT LIKE '%V%'
)

define(
is_migrated,
MISC_ATTRIBUTES LIKE '%V%'
)

RULE EXTERNAL POOL 'Archive_files'


EXEC '/opt/ibm/ltfsee/bin/ltfsee'
OPTS '-p pool1@lib1'

© IBM Corporation Page 66


RULE 'Mig-test' MIGRATE FROM POOL 'system'
TO POOL 'Archive_files'
WHERE (
PATH_NAME LIKE '/gpfs/fs1/archive/%'
AND (NOT (exclude_list) OR (include_list))
AND NOT (is_migrated)
AND NOT (is_premigrated)
AND (KB_ALLOCATED > 1024)
)

Steps:
Create the test environment:
[root@spectrumscale ~]# mkdir -p /gpfs/fs1/archive/excludeme
[root@spectrumscale ~]# dd if=/dev/urandom of=/gpfs/fs1/archive/excludeme/10Mfile_1 bs=10M
[root@spectrumscale ~]# for i in $(seq 2 10); do cp /gpfs/fs1/archive/excludeme/10Mfile_1
/gpfs/fs1/archive/excludeme/10Mfile_$i; done
[root@spectrumscale ~]# mkdir /gpfs/fs1/archive/excludeme/includeme
[root@spectrumscale ~]# cp /gpfs/fs1/archive/excludeme/10Mfile_1
/gpfs/fs1/archive/excludeme/includeme/10Mfile_1

There are 10 resident files in /gpfs/fs1/archive/excludeme and also 1 resident file in a


subdirectory /gpfs/fs1/archive/excludeme/includeme
[root@spectrumscale ~]# find /gpfs/fs1/archive -type f | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive/excludeme/10Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_10
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_2
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_3
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_4
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_5
Tape id:- Status: resident

© IBM Corporation Page 67


Name: /gpfs/fs1/archive/excludeme/10Mfile_6
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_7
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_8
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_9
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/includeme/10Mfile_1
Tape id:- Status: resident

It is a good practice to always execute mmapplypolicy dry-run first.


The expected results are that files in /gpfs/fs1/archive/excludeme are all excluded
except for the one in /gpfs/fs1/archive/excludeme/includeme/ directory.
[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -I test -L 3 -P
/root/policy/policy_migInclude
...
WEIGHT(inf) MIGRATE /gpfs/fs1/archive/excludeme/includeme/10Mfile_1 TO POOL Archive_files SHOW()
...
[I] Summary of Rule Applicability and File Choices:
Rule# Hit_Cnt KB_Hit Chosen KB_Chosen KB_Ill Rule
0 1 10240 1 10240 0 RULE
'Mig-test' MIGRATE FROM POOL 'system' TO POOL 'Archive_files' WHERE(.)
...

The hit count and the hit file names look correct.
Execute the policy.
(07:33:46) localhost:~ # mmapplypolicy /gpfs/fs1/archive -P /root/policy/policy_migInclude

Verify the intended file has been migrated.


[root@spectrumscale ~]# find /gpfs/fs1/archive -type f | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive/excludeme/10Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_10
Tape id:- Status: resident

© IBM Corporation Page 68


Name: /gpfs/fs1/archive/excludeme/10Mfile_2
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_3
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_4
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_5
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_6
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_7
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_8
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/10Mfile_9
Tape id:- Status: resident
Name: /gpfs/fs1/archive/excludeme/includeme/10Mfile_1
Tape id:VTAPE0L5@lib1 Status: migrated

Cleanup the test environment.


[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

© IBM Corporation Page 69


6.3. Timestamp and file size
Objectives:
 Understand how to exclude/include files based on file size and changes the order of
process based on last access time.

As listed in the Knowledge Center, various file attributes can be used in the policy rule.
Following is a sample to migrate files that are larger than 10MB and the order is based
on the access time. A file with the oldest access time gets migrated first.
/root/policy/pocliy_migTimeSize
define(
exclude_list,
PATH_NAME LIKE '/gpfs/fs1/.ltfsee/%'
OR PATH_NAME LIKE '/gpfs/fs1/.SpaceMan/%'
OR PATH_NAME LIKE '/gpfs/fs1/.snapshots/%'
)

define(
is_migrated,
MISC_ATTRIBUTES LIKE '%V%'
)

RULE EXTERNAL POOL 'Archive_files'


EXEC '/opt/ibm/ltfsee/bin/ltfsee'
OPTS '-p pool1@lib1'

RULE 'Mig-test' MIGRATE FROM POOL 'system'


WEIGHT (CURRENT_TIMESTAMP - ACCESS_TIME)
TO POOL 'Archive_files'
WHERE (
PATH_NAME LIKE '/gpfs/fs1/archive/%'
AND NOT (exclude_list)
AND NOT (is_migrated)
AND (KB_ALLOCATED > 10240)
)

© IBM Corporation Page 70


Steps:

Create the test environment.


[root@spectrumscale ~]# mkdir -p /gpfs/fs1/archive/atime
[root@spectrumscale ~]# dd if=/dev/urandom of=/gpfs/fs1/archive/atime/10Mfile_1 bs=10M count=1
[root@spectrumscale ~]# dd if=/dev/urandom of=/gpfs/fs1/archive/atime/20Mfile_1 bs=10M count=2
[root@spectrumscale ~]# for i in $(seq 2 5); do cp /gpfs/fs1/archive/atime/20Mfile_1
/gpfs/fs1/archive/atime/20Mfile_$i; done

There are five 20MB files and one 10MB file.


[root@spectrumscale ~]# ls -l /gpfs/fs1/archive/atime
total 112640
-rw-r--r--. 1 root root 10485760 Feb 3 01:42 10Mfile_1
-rw-r--r--. 1 root root 20971520 Feb 3 01:42 20Mfile_1
-rw-r--r--. 1 root root 20971520 Feb 3 01:42 20Mfile_2
-rw-r--r--. 1 root root 20971520 Feb 3 01:42 20Mfile_3
-rw-r--r--. 1 root root 20971520 Feb 3 01:42 20Mfile_4
-rw-r--r--. 1 root root 20971520 Feb 3 01:42 20Mfile_5

[root@spectrumscale ~]# find /gpfs/fs1/archive -type f | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive/atime/10Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/atime/20Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/atime/20Mfile_2
Tape id:- Status: resident
Name: /gpfs/fs1/archive/atime/20Mfile_3
Tape id:- Status: resident
Name: /gpfs/fs1/archive/atime/20Mfile_4
Tape id:- Status: resident
Name: /gpfs/fs1/archive/atime/20Mfile_5
Tape id:- Status: resident

Intentionally modify the timestamp of the test files as follows.


[root@spectrumscale ~]# for i in $(seq 5 -1 1); do touch /gpfs/fs1/archive/atime/20Mfile_$i;

© IBM Corporation Page 71


sleep 2; done

Now, the 10Mfile_5 has the oldest timeout (atime) and 10Mfile_1 has the latest.
[root@spectrumscale ~]# stat /gpfs/fs1/archive/atime/20Mfile_* --printf "%n: atime => %x\n"
/gpfs/fs1/archive/atime/20Mfile_1: atime => 2016-02-03 01:45:44.996571992 -0500
/gpfs/fs1/archive/atime/20Mfile_2: atime => 2016-02-03 01:45:42.993572001 -0500
/gpfs/fs1/archive/atime/20Mfile_3: atime => 2016-02-03 01:45:40.991572011 -0500
/gpfs/fs1/archive/atime/20Mfile_4: atime => 2016-02-03 01:45:38.990572020 -0500
/gpfs/fs1/archive/atime/20Mfile_5: atime => 2016-02-03 01:45:36.987572029 -0500

Run mmsync command to really flush GPFS cache.


[root@spectrumscale ~]# find /gpfs/fs1/archive -type f | xargs mmsync

Now execute dry-run of the policy. Only 20MB files should be selected and also the
order should be based on the timestamp.
[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -I test -L 4 -P
/root/policy/policy_migTimeSize
...
[I] 2016-02-03@06:46:38.490 Sorting 8 file list records.
/gpfs/fs1/archive/atime/20Mfile_1y evalu RULE 'Mig-test' MIGRATE FROM POOL 'system' TO POOL
'Archive_files' WEIGHT(52.003429)
/gpfs/fs1/archive/atime/20Mfile_3 RULE 'Mig-test' MIGRATE FROM POOL 'system' TO POOL
'Archive_files' WEIGHT(56.008428)
/gpfs/fs1/archive/atime/20Mfile_5 RULE 'Mig-test' MIGRATE FROM POOL 'system' TO POOL
'Archive_files' WEIGHT(100.012428)
/gpfs/fs1/archive/atime/20Mfile_4 RULE 'Mig-test' MIGRATE FROM POOL 'system' TO POOL
'Archive_files' WEIGHT(58.009428)
/gpfs/fs1/archive/atime/20Mfile_2 RULE 'Mig-test' MIGRATE FROM POOL 'system' TO POOL
'Archive_files' WEIGHT(54.006428)
...
[I] 2016-02-03@06:46:38.515 Sorting 5 candidate file list records.
WEIGHT(100.012428) MIGRATE /gpfs/fs1/archive/atime/20Mfile_5 TO POOL Archive_files SHOW()
WEIGHT(58.009428) MIGRATE /gpfs/fs1/archive/atime/20Mfile_4 TO POOL Archive_files SHOW()
WEIGHT(56.008428) MIGRATE /gpfs/fs1/archive/atime/20Mfile_3 TO POOL Archive_files SHOW()
WEIGHT(54.006428) MIGRATE /gpfs/fs1/archive/atime/20Mfile_2 TO POOL Archive_files SHOW()
WEIGHT(52.003429) MIGRATE /gpfs/fs1/archive/atime/20Mfile_1 TO POOL Archive_files SHOW()
...

© IBM Corporation Page 72


When the actual mmapplypolicy is executed, the files will be migrated in this order.
[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -P /root/policy/policy_migTimeSize

[root@spectrumscale ~]# find /gpfs/fs1/archive -type f | sort | xargs ltfsee info files
Name: /gpfs/fs1/archive/atime/10Mfile_1
Tape id:- Status: resident
Name: /gpfs/fs1/archive/atime/20Mfile_1
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/atime/20Mfile_2
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/atime/20Mfile_3
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/atime/20Mfile_4
Tape id:VTAPE0L5@lib1 Status: migrated
Name: /gpfs/fs1/archive/atime/20Mfile_5
Tape id:VTAPE0L5@lib1 Status: migrated

As shown in the Automatic migration section, THRESHOLD(xx, xx) can be added to this
to give a further control of amount of capacity to migrate.

Furthermore, there is an option to only create the file list and not run the mmapplypolicy
by using -I defer -f <file> option.

[root@spectrumscale ~]# for i in $(seq 5 -1 1); do cat /gpfs/fs1/archive/atime/20Mfile_$i


>/dev/null; sleep 2; done
[root@spectrumscale ~]# touch /gpfs/fs1/archive/atime/20Mfile_3

[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -I defer -L 4 -f /tmp/policy.out -P


/root/policy/policy_migTimeSize

[root@spectrumscale ~]# cat /tmp/policy.out.migrate.Archive_files


58432 1782146304 0 -- /gpfs/fs1/archive/atime/20Mfile_5
58438 353833901 0 -- /gpfs/fs1/archive/atime/20Mfile_4
58450 374400150 0 -- /gpfs/fs1/archive/atime/20Mfile_2
58398 460722042 0 -- /gpfs/fs1/archive/atime/20Mfile_1

© IBM Corporation Page 73


58428 526834321 0 -- /gpfs/fs1/archive/atime/20Mfile_3

The order is according to the WEIGHT.


If no WEIGHT is specified, the default order is inode number.

Cleanup the test environment.


[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

© IBM Corporation Page 74


6.4. Controlling which external pool to migrate
Objectives:
 Understand how to specify external pools for migration

Which external pool to migrate the data to can also be specified in the policy rule.
/root/policy/policy_migPool
define(
exclude_list,
PATH_NAME LIKE '/gpfs/fs1/.ltfsee/%'
OR PATH_NAME LIKE '/gpfs/fs1/.SpaceMan/%'
OR PATH_NAME LIKE '/gpfs/fs1/.snapshots/%'
)

define(
is_premigrated,
MISC_ATTRIBUTES LIKE '%M%' AND MISC_ATTRIBUTES NOT LIKE '%V%'
)

define(
is_migrated,
MISC_ATTRIBUTES LIKE '%V%'
)

RULE EXTERNAL POOL 'Archive_files1'


EXEC '/opt/ibm/ltfsee/bin/ltfsee'
OPTS '-p pool1@lib1'

RULE EXTERNAL POOL 'Archive_files2'


EXEC '/opt/ibm/ltfsee/bin/ltfsee'
OPTS '-p pool2@lib1'

RULE 'Mig-test' MIGRATE FROM POOL 'system'


TO POOL 'Archive_files1'
WHERE (
PATH_NAME LIKE '/gpfs/fs1/archive/archive1/%'

© IBM Corporation Page 75


NOT (exclude_list)
AND NOT (is_migrated)
AND NOT (is_premigrated)
AND (KB_ALLOCATED > 1024)
)

RULE 'Mig-test' MIGRATE FROM POOL 'system'


TO POOL 'Archive_files2'
WHERE (
PATH_NAME LIKE '/gpfs/fs1/archive/archive2/%'
AND NOT (exclude_list)
AND NOT (is_migrated)
AND NOT (is_premigrated)
AND (KB_ALLOCATED > 1024)
)

Steps:
First, another pool (pool2) needs to be created.
[root@spectrumscale ~]# ltfsee pool create pool2
[root@spectrumscale ~]# ltfsee pool add -p pool2 -t VTAPE3L5 -t VTAPE4L5 -t VTAPE5L5 -e

[root@spectrumscale ~]# ltfsee info pools


Pool Name Total(TiB) Free(TiB) Unref(TiB) Tapes Type Library Node Group
pool2 0.0 0.0 0.0 3 LTO lib1 G0
pool1 0.0 0.0 0.0 3 LTO lib1 G0

[root@spectrumscale ~]# ltfsee info tapes


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE5L5 Valid LTO5 2 2 0 pool2 lib1 4101 -
VTAPE4L5 Valid LTO5 2 2 0 pool2 lib1 4100 -
VTAPE3L5 Valid LTO5 2 2 0 pool2 lib1 4099 -
VTAPE2L5 Valid LTO5 2 2 0 pool1 lib1 4098 -
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 4097 -
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 4096 -
VTAPE9L5 Unavailable LTO5 0 0 0 - lib1 4105 -
VTAPE8L5 Unavailable LTO5 0 0 0 - lib1 4104 -

© IBM Corporation Page 76


VTAPE7L5 Unavailable LTO5 0 0 0 - lib1 4103 -
VTAPE6L5 Unavailable LTO5 0 0 0 - lib1 4102 -

Create /gpfs/fs1/archive/archive1 and /gpfs/fs1/archive/archive2 and test files.


[root@spectrumscale ~]# TDIR=/gpfs/fs1/archive
[root@spectrumscale ~]# mkdir -p $TDIR/archive1 $TDIR/archive2
[root@spectrumscale ~]# dd if=/dev/urandom of=$TDIR/archive1/10Mfile_1 bs=10M count=1
[root@spectrumscale ~]# for i in $(seq 2 5); do cp $TDIR/archive1/10Mfile_1
$TDIR/archive1/10Mfile_$i; done
[root@spectrumscale ~]# for i in $(seq 1 5); do cp $TDIR/archive1/10Mfile_1
$TDIR/archive2/10Mfile_$i; done

[root@spectrumscale ~]# dsmls /gpfs/fs1/archive/*


...
/gpfs/fs1/archive/archive1:
10485760 10485760 10240 r - 10Mfile_1
10485760 10485760 10240 r - 10Mfile_2
10485760 10485760 10240 r - 10Mfile_3
10485760 10485760 10240 r - 10Mfile_4
10485760 10485760 10240 r - 10Mfile_5

/gpfs/fs1/archive/archive2:
10485760 10485760 10240 r - 10Mfile_1
10485760 10485760 10240 r - 10Mfile_2
10485760 10485760 10240 r - 10Mfile_3
10485760 10485760 10240 r - 10Mfile_4
10485760 10485760 10240 r - 10Mfile_5

Execute the dry-run of the policy and verify archive1 will be migrated to pool1 while
archive2 will be migrated to pool2.
[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -I test -L 4 -P
/root/policy/policy_migPool
...
WEIGHT(inf) MIGRATE /gpfs/fs1/archive/archive1/10Mfile_1 TO POOL Archive_files1 SHOW()
WEIGHT(inf) MIGRATE /gpfs/fs1/archive/archive1/10Mfile_2 TO POOL Archive_files1 SHOW()
WEIGHT(inf) MIGRATE /gpfs/fs1/archive/archive1/10Mfile_3 TO POOL Archive_files1 SHOW()
WEIGHT(inf) MIGRATE /gpfs/fs1/archive/archive1/10Mfile_4 TO POOL Archive_files1 SHOW()

© IBM Corporation Page 77


WEIGHT(inf) MIGRATE /gpfs/fs1/archive/archive1/10Mfile_5 TO POOL Archive_files1 SHOW()
WEIGHT(inf) MIGRATE /gpfs/fs1/archive/archive2/10Mfile_1 TO POOL Archive_files2 SHOW()
WEIGHT(inf) MIGRATE /gpfs/fs1/archive/archive2/10Mfile_2 TO POOL Archive_files2 SHOW()
WEIGHT(inf) MIGRATE /gpfs/fs1/archive/archive2/10Mfile_3 TO POOL Archive_files2 SHOW()
WEIGHT(inf) MIGRATE /gpfs/fs1/archive/archive2/10Mfile_4 TO POOL Archive_files2 SHOW()
WEIGHT(inf) MIGRATE /gpfs/fs1/archive/archive2/10Mfile_5 TO POOL Archive_files2 SHOW()
...

Execute the policy and verify.


[root@spectrumscale ~]# mmapplypolicy /gpfs/fs1/archive -P /root/policy/policy_migPool
...

(08:02:09) localhost:~ # mmapplypolicy /gpfs/fs1/archive -P /root/policy/policy_migPool


...
[I] Summary of Rule Applicability and File Choices:
Rule# Hit_Cnt KB_Hit Chosen KB_Chosen KB_Ill Rule
0 5 51200 5 51200 0 RULE
'Mig-test' MIGRATE FROM POOL 'system' TO POOL 'Archive_files1' WHERE(.)
1 5 51200 5 51200 0 RULE
'Mig-test' MIGRATE FROM POOL 'system' TO POOL 'Archive_files2' WHERE(.)
...
GLESL167I(00509): A list of files to be migrated has been sent to LTFS EE using scan id
2772400641.
GLESL038I(00555): Migration result: 5 succeeded, 0 failed, 0 duplicate, 0 duplicate wrong pool, 0
not found, 0 too small to qualify for migration.
GLESL167I(00509): A list of files to be migrated has been sent to LTFS EE using scan id
2772597761.
GLESL038I(00555): Migration result: 5 succeeded, 0 failed, 0 duplicate, 0 duplicate wrong pool, 0
not found, 0 too small to qualify for migration.
...
[I] A total of 10 files have been migrated, deleted or processed by an EXTERNAL EXEC/script;
...

Cleanup the test environment.


Before deleting the pool2, all tapes assigned to the pool2 needs to be removed. If a
tape is mounted to a drive, it needs to be moved to homeslot (ltfsee tape move
homeslot command) before removing.

© IBM Corporation Page 78


[root@spectrumscale ~]# rm -rf /gpfs/fs1/archive
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

[root@spectrumscale ~]# ltfsee pool remove -p pool2 -t VTAPE3L5


[root@spectrumscale ~]# ltfsee pool remove -p pool2 -t VTAPE4L5
[root@spectrumscale ~]# ltfsee pool remove -p pool2 -t VTAPE5L5
GLESL043I(00832): Removing tape VTAPE5L5 from storage pool pool2.
GLESL355E(00862): Tape VTAPE5L5 is in a drive or IE slot. Move the tape to the home slot before
it is removed.

[root@spectrumscale ~]# ltfsee tape move homeslot -p pool2 -t VTAPE5L5


GLESL373I(00636): Moving tape VTAPE5L5
Tape VTAPE5L5 is unmounted because it is inserted into the drive.
Tape VTAPE5L5 is moved successfully.
[root@spectrumscale ~]# ltfsee pool remove -p pool2 -t VTAPE5L5
GLESL043I(00832): Removing tape VTAPE5L5 from storage pool pool2.
Removed tape VTAPE5L5 from pool pool2 successfully.

[root@spectrumscale ~]# ltfsee pool delete pool2

[root@spectrumscale ~]# ltfsee info pools


Pool Name Total(TiB) Free(TiB) Unref(TiB) Tapes Type Library Node Group
pool1 0.0 0.0 0.0 3 LTO lib1 G0

Here GLESL355E message indicates an error that it cannot remove a tape from the
pool. Note that last character E of this message ID indicates an ‘E’rror.

7. How to stop/restart Spectrum Archive

© IBM Corporation Page 79


This chapter describes how to stop/restart Spectrum Archive. This may help if any issue
can be seen in your instance of the Virtual Appliance. In this doesn’t help, you can
quickly recreate new instance as described in the Chapter 3.

7.1. Stopping Spectrum Archive


 ltfsee reconcile -p <pool> -l <library>
 ltfsee stop
 umount /ltfs

Issue "ps aux | grep ltfs" to make sure the ltfs -o tape_backend=file ... process has
exited.

7.2. Starting Spectrum Archive


 ltfs -o tape_backend=file -o changer_backend=file -o
changer_devname=/ltfs_vtape/library /ltfs
 ltfsee start

8. How to re-format the tapes


After running migration tests for some time, you might experience tapes being full
especially since the virtual tapes are much smaller in size than the physical tapes.
As shown in the Reconciliation/Reclamation section, a reconciliation/reclamation can be
executed on a tape. As long as there is enough capacity in the other tapes in the same
pool, running a reclaim will copy the data from the specified tape to the other tapes in a
non-fragmented manner and removes the tape from the pool. The tape can be added
back to the pool by specifying -e format option (See Reconciliation/Reclamation section).
This will keep the migrated data.

For testing using this virtual appliance, If all tapes are full, the data needs to be deleted.
The steps to clean up the test files and tapes are:
 Delete the gpfs test files.
 Run the reconcile specifying the pool and the library.
 Run the reclaim specifying the pool. This will reclaim and format each tapes in the
pool. The tapes will remain in the pool.
For example,
[root@spectrumscale ~]# df /ltfs_vtape
Filesystem 1K-blocks Used Available Use% Mounted on

© IBM Corporation Page 80


/dev/sde1 52402180 25705664 26696516 50% /ltfs_vtape

[root@spectrumscale ~]# ltfsee info tapes


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE9L5 Valid LTO5 2 0 0 pool1 lib1 4105 -
VTAPE8L5 Valid LTO5 2 0 0 pool1 lib1 4104 -
VTAPE7L5 Valid LTO5 2 0 0 pool1 lib1 4103 -
VTAPE6L5 Valid LTO5 2 0 0 pool1 lib1 4102 -
VTAPE5L5 Valid LTO5 2 0 0 pool1 lib1 256 VDRIVE0000
VTAPE4L5 Valid LTO5 2 0 0 pool1 lib1 4100 -
VTAPE3L5 Valid LTO5 2 0 0 pool1 lib1 4099 -
VTAPE2L5 Valid LTO5 2 0 0 pool1 lib1 257 VDRIVE0001
VTAPE1L5 Valid LTO5 2 0 0 pool1 lib1 259 VDRIVE0003
VTAPE0L5 Valid LTO5 2 0 0 pool1 lib1 258 VDRIVE0002

[root@spectrumscale ~]# # rm -rf /gpfs/fs1/archive


[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reconcile -p %
[root@spectrumscale ~]# ltfsee info pools | sed -e '1d' | awk '{print $1}' | xargs -I% ltfsee
reclaim -p %

[root@spectrumscale ~]# df /ltfs_vtape


Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sde1 52402180 34228 52367952 1% /ltfs_vtape

[root@spectrumscale ~]# ltfsee info tapes


Tape ID Status Type Capacity(GiB) Free(GiB) Unref(GiB) Pool Library Address Drive
VTAPE9L5 Valid LTO5 2 2 0 pool1 lib1 256 VDRIVE0000
VTAPE8L5 Valid LTO5 2 2 0 pool1 lib1 4104 -
VTAPE7L5 Valid LTO5 2 2 0 pool1 lib1 4103 -
VTAPE6L5 Valid LTO5 2 2 0 pool1 lib1 4102 -
VTAPE5L5 Valid LTO5 2 2 0 pool1 lib1 4101 -
VTAPE4L5 Valid LTO5 2 2 0 pool1 lib1 4100 -
VTAPE3L5 Valid LTO5 2 2 0 pool1 lib1 4099 -
VTAPE2L5 Valid LTO5 2 2 0 pool1 lib1 257 VDRIVE0001
VTAPE1L5 Valid LTO5 2 2 0 pool1 lib1 259 VDRIVE0003
VTAPE0L5 Valid LTO5 2 2 0 pool1 lib1 258 VDRIVE0002

© IBM Corporation Page 81


Lastly, you can always create a fresh virtual appliance by re-doing the Virtual Box import
of the Spectrum Archive .ova file.

9. Detail logs
The following files contain detailed messages and log information:
 /var/log/messages
 /var/log/ltfsee.log
Also, as demonstrated in the test cases, adding -L 6 to mmapplypolicy gives detail information
of the policy execution.

10. Other technical notes


Here are some generic technical notes:
 Other than the policy rule files used for the test cases, a few more policy rule files
have been prepared as templates under /root/policy/template directory. These have
defines and comments so that customers can easily use to adjust to their
environment.
 In the test cases, the "ltfsee info files" command is used to verify the migration
status of files. However, if the command is run against hundreds of files, it may take
a long time to complete. The recommendation is to use this command for relatively
small number of files (tens or so).

11. More information on Spectrum Archive


More detail information and samples are described in several IBM Redbooks
publications and Knowledge Center.
 IBM Knowledge Center:
http://www.ibm.com/support/knowledgecenter/ST9MBR_1.2.0/ltfs_ee_ichome.html
 IBM Redbooks "IBM Linear Tape File System Enterprise Edition V1.1.1.2 Installation
and Configuration Guide":
http://www.redbooks.ibm.com/abstracts/sg248143.html
 Please note that this Redbooks may contain information that is no longer valid for
1.2.0.0 version that is installed in the virtual appliance image.
 IBM Redbooks “Active Archive Implementation Guide with Spectrum Scale Object

© IBM Corporation Page 82


and Spectrum Archive”:
http://www.redbooks.ibm.com/abstracts/redp5237.html

12. Limitations
 Due to the virtual appliance usage, the virtual tapes mounted under /ltfs may show
duplicate entries. This can be ignored.
 The virtual appliance has Spectrum Archive 1.2 running on IBM Spectrum Scale 4.2.
However, Spectrum Scale 4.2 is not officially supported by Spectrum Archive 1.2.
 The virtual appliance has Spectrum Archive 1.2 running on CentOS. However,
CentOS is not officially supported by Spectrum Archive 1.2.This virtual appliance is
provided as is for demonstration/training purpose. No official support by IBM will be
provided for this virtual appliance.

© IBM Corporation Page 83

S-ar putea să vă placă și