gpfs_fssnap_handle_t structure

Contains a handle for a GPFS file system or snapshot.

Library

GPFS Library (libgpfs.a for AIX®, libgpfs.so for Linux®)

Structure

typedef struct gpfs_fssnap_handle gpfs_fssnap_handle_t;

Description

A file system or snapshot is uniquely identified by an fssnapId of type gpfs_fssnap_id_t. While the fssnapId is permanent and global, a shorter fssnapHandle is used by the backup application programming interface to identify the file system and snapshot being accessed. The fssnapHandle, like a POSIX file descriptor, is volatile and may be used only by the program that created it.

There are three ways to create a file system snapshot handle:
  1. By using the name of the file system and snapshot
  2. By specifying the path through the mount point
  3. By providing an existing file system snapshot ID

Additional subroutines are provided to obtain the permanent, global fssnapId from the fssnapHandle, or to obtain the path or the names for the file system and snapshot, if they are still available in the file system.

The file system must be mounted in order to use the backup programming application interface. If the fssnapHandle is created by the path name, the path may be relative and may specify any file or directory in the file system. Operations on a particular snapshot are indicated with a path to a file or directory within that snapshot. If the fssnapHandle is created by name, the file system's unique name may be specified (for example, fs1) or its device name may be provided (for example, /dev/fs1). To specify an operation on the active file system, the pointer to the snapshot's name should be set to NULL or a zero-length string provided.

The name of the directory under which all snapshots appear may be obtained by the gpfs_get_snapdirname() subroutine. By default this is .snapshots, but it can be changed using the mmsnapdir command. The gpfs_get_snapdirname() subroutine returns the currently set value, which is the one that was last set by the mmsnapdir command, or the default, if it was never changed.

Members

gpfs_fssnap_handle
File system snapshot handle

Examples

For an example using gpfs_fssnap_handle_t, see /usr/lpp/mmfs/samples/util/tsgetusage.c.

Location

/usr/lpp/mmfs/lib/libgpfs.a for AIX

/usr/lpp/mmfs/lib/libgpfs.so for Linux