lsm_volume_cache_info - Man Page

Query RAM cache information for the specified volume.

Synopsis

int lsm_volume_cache_info (lsm_connect *conn, lsm_volume *volume, uint32_t *write_cache_policy, uint32_t *write_cache_status, uint32_t *read_cache_policy, uint32_t *read_cache_status, uint32_t *physical_disk_cache, lsm_flag flags);

Arguments

conn

Valid connection.

volume

Pointer of lsm_volume.

write_cache_policy

uint32_t. The write cache policy. Valid values are: * LSM_VOLUME_WRITE_CACHE_POLICY_WRITE_BACK
  The storage system will use write back mode if cache hardware
  found. * LSM_VOLUME_WRITE_CACHE_POLICY_AUTO
  The controller will use write back mode when battery/capacitor
  is in good health, otherwise, write through mode. * LSM_VOLUME_WRITE_CACHE_POLICY_WRITE_THROUGH
  The storage system will use write through mode. * LSM_VOLUME_WRITE_CACHE_POLICY_UNKNOWN
  Plugin failed to detect this setting.

write_cache_status

uint32_t.  The status of write cache. Valid values are: * LSM_VOLUME_WRITE_CACHE_STATUS_WRITE_THROUGH * LSM_VOLUME_WRITE_CACHE_STATUS_WRITE_BACK * LSM_VOLUME_WRITE_CACHE_STATUS_UNKNOWN

read_cache_policy

uint32_t. The policy for read cache. Valid values are: * LSM_VOLUME_READ_CACHE_POLICY_ENABLED
  Read cache is enabled, when reading I/O on previous unchanged
  written I/O or read I/O in cache will be returned to I/O
  initiator immediately without checking backing store(normally
  disk). * LSM_VOLUME_READ_CACHE_POLICY_DISABLED
  Read cache is disabled. * LSM_VOLUME_READ_CACHE_POLICY_UNKNOWN
  Plugin failed to detect the read cache policy.

read_cache_status

uint32_t. The status of read cache. Valid values are: * LSM_VOLUME_READ_CACHE_STATUS_ENABLED * LSM_VOLUME_READ_CACHE_STATUS_DISABLED * LSM_VOLUME_READ_CACHE_STATUS_UNKNOWN

physical_disk_cache

Whether physical disk's cache is enabled or not. Please be advised, HDD's physical disk ram cache might not be protected by storage system's battery or capacitor on sudden power loss, you could lose data if a power failure occurs during a write process. For SSD's physical disk cache, please check with the vendor of your hardware RAID card and SSD disk. Valid values are: * LSM_VOLUME_PHYSICAL_DISK_CACHE_ENABLED
   Physical disk cache enabled. * LSM_VOLUME_PHYSICAL_DISK_CACHE_DISABLED
   Physical disk cache disabled. * LSM_VOLUME_PHYSICAL_DISK_CACHE_USE_DISK_SETTING
   Physical disk cache is determined by the disk vendor via
   physical disks' SCSI caching mode page(0x08 page). It is
   strongly suggested to change this value to
   LSM_VOLUME_PHYSICAL_DISK_CACHE_ENABLED or
   LSM_VOLUME_PHYSICAL_DISK_CACHE_DISABLED * LSM_VOLUME_PHYSICAL_DISK_CACHE_UNKNOWN
   Plugin failed to detect the physical disk status.

flags

Reserved for future use, must be LSM_CLIENT_FLAG_RSVD.

Version

1.3.

Description

Query RAM cache settings for the specified volume.

Capability

LSM_CAP_VOLUME_CACHE_INFO

Return

Error code as enumerated by 'lsm_error_number'.
   * LSM_ERR_OK
       On success.
   * LSM_ERR_NOT_FOUND_VOLUME
       When volume not found.
   * LSM_ERR_INVALID_ARGUMENT
       When any argument is NULL or invalid flags.
   * LSM_ERR_NO_SUPPORT
       Not supported.

Info

March 2021 Libstoragemgmt C API Manual