Backup and restore with storage pools

When you back up data or restore data to a storage pool, consider the following descriptions.

You can use the GPFS™ ILM tools to backup data for disaster recovery or data archival to an external storage manager such as the TSM Backup-Archive client. When backing up data, the external storage manager must preserve the file name, attributes, extended attributes, and the file data. Among other things, the extended attributes of the file also contain information about the assigned storage pool for the file. When you restore the file, this information is used to assign the storage pool for the file data.

The file data may be restored to the storage pool to which it was assigned when it was backed up or it may be restored to a pool selected by a restore or placement rule using the backed up attributes for the file. GPFS supplies three subroutines that support backup and restore functions with external pools:
  • gpfs_fgetattrs()
  • gpfs_fputattrs()
  • gpfs_fputattrswithpathname()

GPFS exports the extended attributes for a file, including its ACLs, using gpfs_fgetattrs(). Included in the extended attributes is the name of the storage pool to which the file has been assigned, as well as file attributes that are used for file placement. When the file is restored the extended attributes are restored using either gpfs_fputattrs() or gpfs_fputattrswithpathname().

When a backup application uses gpfs_fputattrs() to restore the file, GPFS assigns the restored file to the storage pool with the same name as when the file was backed up. Thus by default, restored files are assigned to the same storage pool they were in when they were backed up. If that pool is not available, GPFS tries to select a pool using the current file placement rules. If that fails, GPFS assigns the file to the system storage pool.

Note: If a backup application uses gpfs_fputattrs() to restore a file, it will omit the RESTORE RULE.

When a backup application restores the file using gpfs_fputattrswithpathname(), GPFS is able to access additional file attributes that may have been used by placement or migration policy rules to select the storage pool for the file. This information includes the UID and GID for the owner, the access time for the file, file modification time, file size, the amount of storage allocated, and the full path to the file. GPFS uses gpfs_fputattrswithpathname() to match this information with restore policy rules you define.

In other words, the RESTORE rule looks at saved file attributes rather than the current file attributes. The call to gpfs_fputattrswithpathname() tries to match the saved information to a RESTORE rule. If the RESTORE rules cannot match saved attributes, GPFS tries to restore the file to the same storage pool it was in when the file was backed up. If that pool is not available GPFS tries to select a pool by matching placement rules. If that fails, GPFS assigns the file to the system storage pool.
Note: When a RESTORE rule is used, and restoring the file to the specified pool would exceed the occupancy percentage defined for that pool, GPFS skips that rule and the policy engine looks for the next rule that matches. While testing for matching rules, GPFS takes into account the specified replication factor and the KB_ALLOCATED attribute of the file that is being restored.

The gpfs_fgetattrs(), gpfs_fputattrs(), and gpfs_fputattrswithpathname() subroutines have optional flags that further control the selection of storage pools. For more information, see the topics gpfs_fgetattrs() subroutine, gpfs_fputattrs() subroutine, and gpfs_fputattrswithpathname() subroutine in the IBM Spectrum Scale: Administration and Programming Reference.