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.

  1. Set the fast tier range with immediate repair.
    mmchattr --fast-tier-range 5M -I yes /gpfs/fs1/myfile

    The following actions occur:

    1. gpfs.DataTiering extended attribute is updated with 5MB threshold.
    2. Repair job starts immediately.
    3. Blocks 0 to (nFastTierBlocks - 1) are migrated to the fast tier pool, where nFastTierBlocks is calculated as (dataTieringRange + blockSize - 1) / blockSize.
    4. Blocks N+1 to end (offset >= 5MB) are migrated to default pool.
    5. Block migration completes before command returns.

    File blocks are in correct pools when the command finishes.

  2. Set the fast tier range with deferred repair.
    mmchattr --fast-tier-range 5M -I defer /gpfs/fs1/myfile

    The following actions occur:

    1. gpfs.DataTiering extended attribute is updated with 5MB threshold
    2. File is marked with IF_ILL_PLACED flag
    3. No immediate block migration occurs
    4. Blocks remain in current pools until repair is triggered later

    The file is marked for later repair using mmrestripefile or mmrestripefs.

  3. Set the fast tier range to 0 to disable data tiering.
    mmchattr --fast-tier-range 0 -I yes /gpfs/fs1/myfile
    All blocks will be migrated to the default pool.
  4. Verify the data tiering configuration.
    mmlsattr -L gpfs.DataTiering /gpfs/fs1/myfile

    Sample output:

    file name:            /gpfs/fs1/myfile
    metadata replication: 1 max 2
    data replication:     1 max 2
    immutable:            no
    appendOnly:           no
    flags:
    storage pool name:    capacity
    fileset name:         root
    snapshot name:
    creation time:        Mon Jan 15 10:30:45 2024
    Windows attributes:   ARCHIVE
    gpfs.DataTiering:     5242880

    The value 5242880 represents 5MB in bytes.

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 flags field displays illplaced when deferred migration is used, indicating that the data blocks are not yet in the correct storage pools.
  • The fast tier range value is displayed in bytes (10485760 bytes = 10MB).
  • The gpfs.DataTiering extended attribute contains the fast tier configuration.
  • The data remains illplaced until the mmrestripefile -p command is executed to migrate the blocks to the appropriate storage pools.