lsm_volume_cache_info(3)

πŸ“¦
version 1.10.3 Β· 3 versions
, in fedora 43, fedora 44

πŸ’– 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 of lsm_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_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:
    • 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:
    • 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:
    • 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.
🚨 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_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. 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_OK On success. πŸŽ‰
  • LSM_ERR_NOT_FOUND_VOLUME When volume not found. It's not there, babes. πŸ’€
  • LSM_ERR_INVALID_ARGUMENT When any argument is NULL or invalid flags.
  • LSM_ERR_NO_SUPPORT Not 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