VxFS SDK (RedHat Linux)
Veritas File System (VxFS) Software Developer’s Kit (SDK) provides developers with the information necessary to use the application programming interfaces (APIs) to modify and tune various features and components of the Veritas File System. These APIs are provided with the VxFS Software Developer’s Kit. Most of the APIs covered in this document are available in VxFS 4.0 and subsequent releases.
Created by: Storage Foundation development team
The SDK is for RedHat Linux and VxFS 5.0. However, the source code logic is extremely similar for all platforms and versions. For a different platform or version, look in the directory /opt/VRTSfssdk of any server that has VxFS 4.1 or later installed. Alternately, download the entire Storage Foundation tarball from the Symantec Trialware site, and pull out the package VRTSfssdk. The platform-version specific Reference Guide is in the VRTSfsmnd package, although documentation is similar on all platforms and versions.
This SDK for VxFS provides approximately 20 sample programs in source code. Some perform useful functions beyond just illustrating ‘how-to’. The SDK also includes makefiles and headers/libraries. The VxFS Programmer’s Reference Guide provides additional detail on all of these applications, but here is a brief summary:
Intrinsically useful programs:
fclmgr.c
This program reads the File Change Log (FCL) for a specified file system. The FCL records when each file in the file system is changed and the type of change – for example, file creation, deletion, overwrite, extending write, permissions change, etc. The FCL does not include the actual changed data. It can optionally record file access information, including user name, process name and access statistics. The FCL is thus useful for a number of applications, including incremental backup, Storage Resource Management (SRM), auditing, HSM and archiving, or replication. Indeed, any application that performs incremental file processing can benefit, since it is typically far faster to read the FCL than to scan the entire file system for changed files. The FCL is turned on and managed via the fcladm CLI. This FCL is a binary file for performance and space utilization benefits; the fclmgr.c application parses the FCL records and prints them (in text) to stdout or to a specified file; it then sleeps, periodically waking to parse/output any new records.
fcltest.c
Similar to fclmgr.c, but a bit simpler, with a menu interface and some record filtering options.
freeze_all.c
This application will freeze and thaw one or more file systems, which is useful in creating a consistent filesystem for backup. It is particularly useful when using array-based snapshots such as BCVs.
freeze.c
This application will freeze and thaw one file system. It is thus a degenerate case of freeze_all.c, but freeze_all does not work on some VxFS versions (pre-4.0).
inotopath.c
This application maps from an inode number to a file/filepath, which can be useful for developers of backup applications, or for interpreting the output of ncheck or of the File Change Log. The vxlsino CLI utility provides the same functionality in compiled form.
Primarily illustrative programs, aimed at application developers:
cache_advisory.c
This application shows how to tune VxFS cache behavior on a per IO basis, which can improve performance for certain applications. Note this is aimed at application development (ISV or homegrown), as the cache APIs are called within the application itself. To change the cache behavior on a per-filesystem basis via the command line, see the convosync and mincache options to mount_vxfs.
extent.c, reserve.c
These two applications show how to reserve and manage the extent layout of specific files, which can improve performance for certain applications. Note these are relevant for application development (ISV or homegrown), as the extent APIs are called within the application itself. To change the extent behavior via CLI, see getext and setext.
nattr_*.c
These show how applications can create & manage named attributes (aka “named streams” or “resource forks”), e.g., metadata not defined in a standard file format. VxFS uses named attributes to, for example, support NFSv4.
policy_*.c, volume_*.c
These two applications showcase the API interface into Dynamic Storage Tiering and multi-volume file system for application developers. Administrators will probably prefer the CLI (fsppadm, fsapadm, fsvoladm, fsdbencap) or the GUI.
To use, download the vxfs_sdk.zip file, and extract the VRTSfssdk-5.0.30.00-MP3_RHEL5.i686.rpm and vxfs_ref.pdf (Programmer's Reference Guide).
Comments
Created by: Storage
Created by: Storage Foundation Development Team. The SDK is for RedHat Linux and VxFS 5.0. However, the source code logic is extremely similar for all platforms and versions.
Thanks for participating in the community!
Would you like to reply?
Login or Register to post your comment.