Configuring data tiering using mmchattr command
Use the mmchattr command to set the fast tier range for individual files with immediate or deferred block migration.
Before configuring data tiering using mmchattr, ensure you have:
- Fast tier pool configured in the filesystem
- File must be a regular file (not a directory)
- Root authority or appropriate permissions
The mmchattr command allows you to set the data tiering range for individual files. You can choose to migrate blocks immediately or defer migration for later. The command sets the gpfs.DataTiering extended attribute on the file.
The data tiering configuration is applied to the file. Depending on the migration option chosen, blocks are either immediately migrated or marked for later repair.
Examples
Example 1: Set fast tier range using byte value with storage pool assignment
mmchattr --fast-tier-range 10485760 -P data1 /gpfs/fast/40Mfile
This command sets a 10MB (10485760 bytes) fast tier range for the file and assigns the data blocks to the data1 storage pool. The blocks are migrated immediately.
Example 2: Set fast tier range with units and deferred migration
mmchattr --fast-tier-range 10M -I defer /fast/20Mfile1.new
This command sets a 10MB fast tier range using unit notation and defers the allocation of blocks. The file is marked as illplaced until mmrestripefs or mmrestripefile are issued.
Example 3: Set 10MB fast tier range with immediate migration
mmchattr --fast-tier-range 10M -I yes /gpfs/fs1/database.db
This command sets a 10MB fast tier range for the database file and immediately migrates blocks to the appropriate pools.
Example 4: Set 100MB fast tier range with deferred migration
mmchattr --fast-tier-range 100M -I defer /gpfs/fs1/logfile.log
This command sets a 100MB fast tier range for the log file but defers block migration. The file is marked as illplaced and must be repaired later.
Example 5: Set 2GB fast tier range (default immediate migration)
mmchattr --fast-tier-range 2G /gpfs/fs1/video.mp4
This command sets a 2GB fast tier range for the video file. Since -I yes is the default, blocks are migrated immediately.
Example 6: Apply data tiering to multiple files
for file in /gpfs/fs1/data/*.db; do
mmchattr --fast-tier-range 50M -I defer "$file"
done
This script applies a 50MB fast tier range to all database files in a directory with deferred migration.
Example 7: Disable data tiering for a file
mmchattr --fast-tier-range 0 -I yes /gpfs/fs1/archive.dat
This command disables data tiering for the archive file by setting the fast tier range to 0.
Example 8: Verifying fast tier configuration with mmlsattr
Use the mmlsattr command with the -L and -d
options to display the current fast tier range value and fast tier extended attribute.
mmlsattr -L -d /fast/20Mfile1.new
Sample output:
file name: /fast/20Mfile1.new
metadata replication: 1 max 3
data replication: 3 max 3
immutable: no
appendOnly: no
flags: illplaced
storage pool name: data1
fileset name: root
snapshot name:
creation time: Thu May 21 16:51:42 2026
Misc attributes: ARCHIVE
Encrypted: no
fast tier range: 10485760
gpfs.DataTiering: 0x0000000000A00000
The output shows:
- The
flagsfield displaysillplacedwhen deferred migration is used, indicating that the data blocks are not yet in the correct storage pools. - The
fast tier rangevalue is displayed in bytes (10485760 bytes = 10MB). - The
gpfs.DataTieringextended attribute contains the fast tier configuration. - The data remains
illplaceduntil the mmrestripefile -p command is executed to migrate the blocks to the appropriate storage pools.