29.01.2013 Views

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1. Create a snapshot using the mmcrsnapshot comm<strong>and</strong>. For more information on snapshots, see<br />

General Parallel File System: Advanced <strong>Administration</strong> Guide.<br />

2. Open an inode scan on the snapshot using the gpfs_open_inodescan() subroutine.<br />

3. Retrieve inodes using the gpfs_next_inode() subroutine.<br />

4. Read the file data:<br />

a. Open the file using the gpfs_iopen() subroutine.<br />

b. Read the file using the gpfs_iread(), gpfs_ireadx(), or gpfs_ireaddir() subroutines.<br />

c. Close the file using the gpfs_iclose() subroutine.<br />

The gpfs_ireadx() subroutine is more efficient than read() or gpfs_iread() for sparse files <strong>and</strong> for<br />

incremental backups. The gpfs_ireaddir() subroutine is more efficient than readdir(), because it returns<br />

file type information. There are also subroutines for reading symbolic links, gpfs_ireadlink() <strong>and</strong> for<br />

accessing file attributes, gpfs_igetattrs().<br />

IBM has supplied a backup application program, tsbackup.C, to serve as an example. This example is<br />

located in /usr/lpp/mmfs/samples/util <strong>and</strong> consists of these files:<br />

v tsbackup.C - A utility for backing up a <strong>GPFS</strong> file system to a TSM server using TSM clients.<br />

v tsbackup.h - A header file containing necessary declarations.<br />

The tsbackup sample application is invoked by the mmbackup script in /usr/lpp/mmfs/bin, <strong>and</strong> it invokes<br />

the mmexectsmcmd script in that same directory to drive TSM clients. These scripts may also be<br />

examined as examples.<br />

Chapter 3. Managing file systems 25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!