gpfsGetReplication_t structure

Obtains the replication factors of a file.

Library

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

Structure

typedef struct {
	int structLen;
	int structType;
	int metadataReplicas;
	int maxMetadataReplicas;
	int dataReplicas;
	int maxDataReplicas;
	int status;
	int reserved;
} gpfsGetReplication_t;

Description

The gpfsGetReplication_t structure is used to obtain a file's replication factors.

Members

structLen
Length of the gpfsGetReplication_t structure.
structType
Structure identifier GPFS_FCNTL_GET_REPLICATION.
metadataReplicas
Returns the current number of copies of indirect blocks for the file.
maxMetadataReplicas
Returns the maximum number of copies of indirect blocks for a file.
dataReplicas
Returns the current number of copies of the data blocks for a file.
maxDataReplicas
Returns the maximum number of copies of data blocks for a file.
status
Returns the status of the file.
reserved
Unused, but should be set to 0.

Error status

These values are returned in the status field:

GPFS_FCNTL_STATUS_EXPOSED
This file may have some data where the only replicas are on suspended disks; implies some data may be lost if suspended disks are removed.
GPFS_FCNTL_STATUS_ILLREPLICATE
This file may not be properly replicated; that is, some data may have fewer or more than the desired number of replicas, or some replicas may be on suspended disks.
GPFS_FCNTL_STATUS_UNBALANCED
This file may not be properly balanced.
GPFS_FCNTL_STATUS_DATAUPDATEMISS
This file has stale data blocks on at least one of the disks that are marked as unavailable or recovering.
GPFS_FCNTL_STATUS_METAUPDATEMISS
This file has stale indirect blocks on at least one unavailable or recovering disk.
GPFS_FCNTL_STATUS_ILLPLACED
This file may not be properly placed; that is, some data may be stored in an incorrect storage pool.

Location

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

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