InfoScale™ 9.0 Veritas File System Programmer's Reference Guide - Solaris

Last Published:
Product(s): InfoScale & Storage Foundation (9.0)
Platform: Solaris
  1. Veritas File System software developer's kit
    1.  
      About the software developer's kit
    2. File System software developer's kit features
      1.  
        API library interfaces
      2.  
        File Change Log
      3.  
        Multi-volume support
      4.  
        Veritas File System I/O
    3.  
      Software developer's kit packages
    4.  
      Required libraries and header files
    5. Compiling environment
      1.  
        Recompiling with a different compiler
  2. File Change Log
    1. About the File Change Log file
      1.  
        Recorded changes
      2. Using the File Change Log file
        1.  
          Space usage
        2.  
          Full system scan reductions
        3.  
          File history traces
      3.  
        File Change Log logging activation
      4. File Change Log file layout
        1.  
          File Change Log superblock
        2.  
          File Change Log record
    2. Record types
      1.  
        Special records
      2.  
        Typical record sequences
    3. File Change Log tunables
      1.  
        How tunables handle File Change Log growth size
    4. Application programming interface for File Change Log
      1.  
        Ease of use
      2.  
        Backward compatibility
      3. API functions
        1.  
          Functions for accessing File Change Log records
        2.  
          Functions for seeking offsets and time stamps in the File Change Log
        3. vxfs_fcl_open
          1.  
            Return value
        4. vxfs_fcl_close
          1.  
            Parameters
        5. vxfs_fcl_getinfo
          1.  
            Return values
        6. vxfs_fcl_read
          1.  
            Parameters
          2.  
            Input
          3.  
            Output
          4.  
            Return values
        7. vxfs_fcl_getcookie
          1.  
            Parameters
        8. vxfs_fcl_seek
          1.  
            Parameters
          2.  
            Return values
        9. vxfs_fcl_seektime
          1.  
            Parameters
          2.  
            Return values
        10. vxfs_fcl_sync
          1.  
            Parameters
      4. File Change Log record
        1.  
          Defines
        2.  
          fcl_iostats structure
        3.  
          fcl_acsinfo structure
        4.  
          Record structure fields
      5. Copying File Change Log records
        1.  
          Index maintenance application
        2. Computing a usage profile
          1.  
            Initial setup
          2.  
            Sample steps
          3.  
            Off host processing
      6. Veritas File System and File Change Log upgrade and downgrade
        1.  
          Converting File Change Log version 3 files to version 4
        2.  
          Downgrading Veritas File System versions
    5. Reverse path name lookup
      1.  
        Inodes
      2.  
        vxfs_inotopath_gen
  3. Multi-volume support
    1.  
      About multi-volume support
    2.  
      Uses for multi-volume support
    3. Volume application programming interfaces
      1.  
        Administering volume sets
      2.  
        Querying the volume set for a file system
      3.  
        Modifying a volume within a file system
      4.  
        Encapsulationg and de-encapsulating a volume
    4. Allocation policy application programming interfaces
      1.  
        Directing file allocations
      2.  
        Creating and assigning policies
      3.  
        Querying the defined policies
      4.  
        Enforcing a policy
    5.  
      Data structures
    6. Using policies and application programming interfaces
      1.  
        Defining and assigning allocation policies
      2.  
        Using volume application programming interfaces
  4. Named data streams
    1.  
      About named data streams
    2.  
      Uses for named data streams
    3.  
      Named data streams application programming interface
    4.  
      Listing named data streams
    5.  
      Namespace for named data streams
    6.  
      Behavior changes in other system calls
    7.  
      Querying named data streams
    8.  
      Application programming interface
    9.  
      Command reference
  5. Veritas File System I/O
    1.  
      About Veritas File System I/O
    2.  
      Freeze and thaw
    3. Caching advisories
      1.  
        Direct I/O
      2.  
        Concurrent I/O
      3.  
        Unbuffered I/O
      4.  
        Other advisories
    4. Extents
      1. Extent attributes
        1.  
          Attribute specifics
      2.  
        Reservation: preallocating space to a file
      3.  
        Fixed extent size
      4.  
        Application programming interface for extent attributes
      5. Allocation flags
        1.  
          Allocation flags with reservation
        2.  
          Reservation trimming
        3.  
          Non-persistent reservation
        4.  
          No write beyond reservation
        5.  
          Contiguous reservation
        6.  
          Include reservation in the file size
        7.  
          Reading the grown part of the file
      6.  
        Allocation flags with fixed extent size
      7.  
        How to use extent attribute APIs
      8.  
        Setting fixed extent size
  6. Thin Reclamation
    1.  
      About Thin Storage
    2.  
      About Thin Reclamation
    3. Thin Reclamation application programming interface
      1.  
        vxfs_ts_reclaim return values

Thin Reclamation application programming interface

You can use Thin Reclamation with the following API:

uint vxfs_ts_reclaim(char *mountpoint, uint64_t offset,
uint64_t length, int32_t volindex, uint64_t unit_size,
uint64_t *bytes_reclaimed, uint32_t flag)

This is a non-reentrant API. This API cannot be called when an instance of the fsadm command or a reorg of the file system is running.

mountpoint

The pathname of the VxFS file system that is mounted on a Veritas Volume Manager (VxVM) volume.

offset

The offset in bytes in the volume from which to start reclamation.

length

The length in bytes from offset, up to which to reclaim free storage.

volindex

The index of the volume in a volume set. When volindex has a value of -1, all the volumes in the file system ignore offset and length. On a non-multi-volume file system, volindex should be zero.

unit_size

The size in multiples by which the file system issues reclaim requests to VxVM. Each Thin Provisioning array supports reclamation by a factor of some unit size.

bytes_reclaimed

Returns the number of bytes that the file system attempted to reclaim. The value does not give an indication of the number of bytes actually reclaimed.

flag

Possible values for flag are:

  • VXFS_TS_RECLAIM_AGGRESSIVE - Perform an additional data and metadata reorganization to maximize free space reclamation. This operation might trigger additional space allocation from the underlying Thin Storage, which is released at the end of the operation. This operation can fragment existing large allocations.

    Aggressive reclamation is performed only if VxVM reports the volume as thinrclm. In case of multi−volume file systems, only the volumes that VxVM reports as thinrclm are considered.

    If the volindex argument has a value of −1, then the full file system is covered. The offset and length arguments are ignored. If you specify a value for the volindex argument, then the full volume is covered if both the offset argument and length argument have a value of 0. If you specify a value for the offset argument and length argument, vxfs_ts_reclaim() does not perform aggressive reclamation, but performs the default the default reclamation instead, regardless if you specified a value for the volindex argument.

  • VXFS_TS_RECLAIM_ANALYSE | VXFS_TS_RECLAIM_ANALYZE - Perform an analysis of the file system to recommend whether you should use Normal Reclaim or Aggressive Reclaim. You can use either reclaim policy regardless of the recommendation. Analyse reclamation is performed only if Veritas Volume Manager (VxVM) reports the volume as thinrclm. In the case of multi-volume file systems, the vxfs_ts_reclaim() API considers only the volumes that VxVM reports as thinrclm.

  • VXFS_TS_RECLAIM_AUTO - Perform an analysis of the file system determine which reclaim policy is suitable at this point and, depending upon the analysis, execute the policy on behalf of the user. Auto reclamation is performed only if VxVM reports the volume as thinrclm. In the case of multi-volume file systems, the vxfs_ts_reclaim() API considers only the volumes that VxVM reports as thinrclm.

VxFS may align the offset and length internally for correctness.

Note:

Thin Reclamation is a slow process and may take several hours to complete, depending on the file system size. Thin Reclamation is not guaranteed to reclaim 100% of the free space.