lsm_volume_cache_info(3)
π NAME π
lsm_volume_cache_info β bestie, this is the libstoragemgmt C API function (from the Libstoragemgmt C API Manual, if you were wondering where it lives π) that queries the RAM cache info for a specific volume. Yes, that volume. The one you keep asking about. π
β¨ 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β a valid connection. Gotta have one, no cap. πvolumeβ pointer oflsm_volume. It's giving "the volume in question" πwrite_cache_policyβuint32_t. The write cache policy. Valid values, listen up bestie:LSM_VOLUME_WRITE_CACHE_POLICY_WRITE_BACKThe storage system will use write back mode if cache hardware found.LSM_VOLUME_WRITE_CACHE_POLICY_AUTOThe controller will use write back mode when battery/capacitor is in good health, otherwise, write through mode.LSM_VOLUME_WRITE_CACHE_POLICY_WRITE_THROUGHThe storage system will use write through mode.LSM_VOLUME_WRITE_CACHE_POLICY_UNKNOWNPlugin failed to detect this setting. π
write_cache_statusβuint32_t. The status of write cache. Valid values:LSM_VOLUME_WRITE_CACHE_STATUS_WRITE_THROUGHLSM_VOLUME_WRITE_CACHE_STATUS_WRITE_BACKLSM_VOLUME_WRITE_CACHE_STATUS_UNKNOWN
read_cache_policyβuint32_t. The policy for read cache. Valid values:LSM_VOLUME_READ_CACHE_POLICY_ENABLEDRead 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_DISABLEDRead cache is disabled.LSM_VOLUME_READ_CACHE_POLICY_UNKNOWNPlugin failed to detect the read cache policy. π
read_cache_statusβuint32_t. The status of read cache. Valid values:LSM_VOLUME_READ_CACHE_STATUS_ENABLEDLSM_VOLUME_READ_CACHE_STATUS_DISABLEDLSM_VOLUME_READ_CACHE_STATUS_UNKNOWN
physical_disk_cacheβ whether physical disk's cache is enabled or not.
π¨ OKAY PAUSE. Real talk, this is the important one. Please be advised: HDD's physical disk ram cache might not be protected by storage system's battery or capacitor on sudden power loss, and 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. Don't skip this part, bestie, I'm begging. π
Valid values:
LSM_VOLUME_PHYSICAL_DISK_CACHE_ENABLEDPhysical disk cache enabled.LSM_VOLUME_PHYSICAL_DISK_CACHE_DISABLEDPhysical disk cache disabled.LSM_VOLUME_PHYSICAL_DISK_CACHE_USE_DISK_SETTINGPhysical disk cache is determined by the disk vendor via physical disks' SCSI caching mode page (0x08page). It is strongly suggested to change this value toLSM_VOLUME_PHYSICAL_DISK_CACHE_ENABLEDorLSM_VOLUME_PHYSICAL_DISK_CACHE_DISABLED.LSM_VOLUME_PHYSICAL_DISK_CACHE_UNKNOWNPlugin failed to detect the physical disk status. π«
flagsβ Reserved for future use, must beLSM_CLIENT_FLAG_RSVD. Don't get creative with it. π«
π¦ VERSION π¦
1.3. β yeah, that's the whole vibe. β
π DESCRIPTION π
Query RAM cache settings for the specified volume. That's it, that's the function. Iconic, honestly. π
π CAPABILITY π
LSM_CAP_VOLUME_CACHE_INFO
π₯ RETURN π₯
Error code as enumerated by lsm_error_number. Here's the whole roster:
LSM_ERR_OKOn success. πLSM_ERR_NOT_FOUND_VOLUMEWhen volume not found. It's not there, babes. πLSM_ERR_INVALID_ARGUMENTWhen any argument isNULLor invalid flags.LSM_ERR_NO_SUPPORTNot supported. π₯²
And that's the whole page, bestie!! This was lsm_volume_cache_info from the Libstoragemgmt C API Manual, dropping February 2026, page lsm_volume_cache_info, manual lsm_volume_cache_info(3) β mwah, go check those cache settings, stay protected on power loss, and slay responsibly. π«Άβ¨π
π¦ where this page comes from
- fedora 43: libstoragemgmt-devel 1.10.3-1.fc43 Β· LGPL-2.1-or-later
- fedora 44: libstoragemgmt-devel 1.10.3-1.fc44 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms