-
Preparation: Log into the experimental server of IBM Storage Archive(Duration: 1 min)
ssh -p 2022 root@localhost
, and the login password is ibm.
-
Preparation: Check the configuration state of the experimental environment Storage Archive(Duration: 3 mins)
Check the mount point of Spectrum Archive: df /ltfs
.
Check node information to see that there is 1 node: eeadm node list
.
Check library information to see that there is 1 virtual tape library (lib1): eeadm library list
.
Check drive information to see that there are 4 virtual tape drives (VDRIVE0000-VDRIVE0003).
Check pool information to see that there is 1 storage pool (pool1): eeadm pool list
.
Check tape information to see that there are ten 10GB virtual tapes (VTAPE00L5-VTAPE09L5), in which VTAP00L5, VTAP01L5 and VTAP02L5 have been allocated to pool1: eeadm tape list
.
-
Preparation: Check the configuration state of the experimental environment Storage Scale(Duration: 2 mins)
Check cluster information about Spectrum Scale: mmlscluster
Check the state of Spectrum Scale: mmgetstate
Check the mount point of Spectrum Scale: df /ibm/fs1
-
Preparation: Check test files(Duration: 2 mins)
Enter directory /ibm/fs1/archive: cd /ibm/fs1/archive/
Check all files under this directory: ls -l
There are 4 test files under the directory /ibm/fs1/archive, in which, there are three 10MB random content files (10Mfile_1 - 10Mfile_3) and one 2MB text file (text).
Note: Please do not exit from this directory during the experiment; otherwise some commands will become invalid.
-
Preparation: Check the current location and migration state of files(Duration: 3 mins)
The following three commands can be used to check file migration state, and the third one will mainly be used to check file migration state.
Command 1:
dsmls
Command 2:
eeadm file state *
Command 3:
eeadm file state * -s
Where:
R=resident means that the files are on the disk and have not been migrated;
P=premigrated means that the files are on disk and have been migrated to a tape library;
M=migrated means the files have been migrated to tape.
Next, we will migrate these test files manually and automatically.
-
Manual migration - Migrate files manually based on the policy(Duration: 3 mins)
View the description of this manual migration policy: cat /root/policy/policy_migArchiveDir
, which means that all resident and premigrated files under directory /ibm/fs1/archive will be migrated from the disk to tape.
Apply this policy manually to migrate the files: mmapplypolicy /ibm/fs1/archive -P /root/policy/policy_migArchiveDir
.
Check file migration state: eeadm file state * -s
The state of all files changed to M (migrated), and the files were migrated to tape.
-
Manual migration - Trigger the recall mechanism after file reading(Duration: 3 mins)
Note: Recall is to transmit the files on the tape back to the disk.
Read the text of the text files with the "tail" command:
tail -5 /ibm/fs1/archive/text
Check the text migration state of text files:
eeadm file state text -s
The read command "tail" triggered the recall mechanism, so the text files were moved back to the disk, and the status changed from M (migrated) to P (premigrated).
-
Manual migration - Trigger the recall mechanism after file modification(Duration: 3 mins)
Use the "echo" command to modify random content file: 10Mfile_2:
echo aaa >> 10Mfile_2
Check the migration state of random content file 10Mfile_2:
eeadm file state 10Mfile_2 -s
The "echo" modification command triggered the recall mechanism, so 10Mfile_2 file was moved back to the disk, and its state was changed to R (resident).
Think: If you use the "echo" command to modify a text file in the state of P, what will happen to its state?
You may try it.
-
Manual migration - Execute a command manually to migrate files(Duration: 4 mins)
After 2 minutes of waiting, read all test files under the current directory with the "cat" command:
sleep 120;cat * >/dev/null
Check the migration state of all test files:
eeadm file state * -s
The state of these files is still R, or has been changed from M to P, indicating that the files are saved on the disk.
Migrate all test files under the current directory to the tape with the "eeadm migrate" command:
find . -type f | eeadm migrate -p pool1
Note: find. -type f means that all file-typed files under the current directory are to be found.
Check the migration state of all test files:
eeadm file state * -s
The state of these files was changed to M.
-
Manual migration - Execute the command to recall files manually(Duration: 3 mins)
Migrate all test files under the current directory to the disk with the "eeadm recall" command and parameter "--resident":
find. -type f | eeadm recall --resident
Check the migration state of all test files:
eeadm file state * -s
The state of these files was changed to R.
-
Automatic migration - Customize an event trigger mechanism(Duration: 3 mins)
When the disk space is below a certain threshold, the migration mechanism will be triggered with the "callback" command of Spectrum Scale:
mmaddcallback MIGRATION --command /usr/lpp/mmfs/bin/mmstartpolicy --event lowDiskSpace --parms "%eventName %fsName --single-instance"
Check the migration policy that has just been configured:
mmlscallback MIGRATION
-
Automatic migration - Apply an automatic policy to migrate files(Duration: 5 mins)
Check this automatic migration policy:
cat /root/policy/policy_migAuto
In order to achieve the experimental result, the THRESHOLD(0,0) in the strategy means that migration will be executed regardless of the disk space. In actual production, the threshold may be adjusted as the actual situation requires. For example, THRESHOLD(80,60) means that when the disk space usage rate exceeds 80%, migration is triggered, and such migration will stop until the disk space usage rate falls below 60%.
Apply this automatic policy:
mmchpolicy fs1 /root/policy/policy_migAuto -t "System policy for LTFS"
Duplicate 10Mfile_1 to generate 10Mfile_AutoMigTest:
cp 10Mfile_1 10Mfile_AutoMigTest
Due to such duplication, the disk space of fs1 changes, triggering the automatic migration policy.
Check file migration state:
eeadm file state * -s
After about 2 minutes, the state changed from R to M.
The experiment is basically completed, and you may also check information about all migration events with the next command.
-
Check historical information about migration events(Duration: 3 mins)
Check information about all migration tasks:
eeadm task list -c
Check the execution of migration-related tasks:
eeadm task show [TaskID]
Note: [TaskID] is the task number, such as 1010, which can be found through command "eeadm task list -c".