• iSCSI & memory cache

    From Greg@3:633/10 to All on Friday, January 16, 2026 17:40:01
    hi there,

    I'm setting up an iSCSI server on Trixie. My plan is to export a block
    device with memory caching enabled for both reads and writes.
    Unfortunately, no matter what I try, targetcli always shows write-thru
    mode (for block devices). is there any way to change this? Different
    software?

    Thanks in advance for any help
    Greg

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From didier gaumet@3:633/10 to All on Friday, January 16, 2026 19:10:02
    Le 16/01/2026 … 17:34, Greg a ‚crit˙:
    hi there,

    I'm setting up an iSCSI server on Trixie. My plan is to export a block device with memory caching enabled for both reads and writes.
    Unfortunately, no matter what I try, targetcli always shows write-thru
    mode (for block devices). is there any way to change this? Different software?

    Thanks in advance for any help
    Greg

    Hello,

    I know nothing about iscsi, but the RedHat doc has a chapter showing how
    to create a read-only target: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/managing_storage_devices/configuring-an-iscsi-target_managing-storage-devices#creating-a-read-only-iscsi-lun_configuring-an-iscsi-target

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Greg@3:633/10 to All on Friday, January 16, 2026 20:50:01
    On 1/16/26 19:07, didier gaumet wrote:
    Le 16/01/2026 … 17:34, Greg a ‚crit˙:
    hi there,

    I'm setting up an iSCSI server on Trixie. My plan is to export a block
    device with memory caching enabled for both reads and writes.
    Unfortunately, no matter what I try, targetcli always shows write-thru
    mode (for block devices). is there any way to change this? Different
    software?

    Thanks in advance for any help
    Greg

    Hello,

    I know nothing about iscsi, but the RedHat doc has a chapter showing how
    to create a read-only target: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/ html/managing_storage_devices/configuring-an-iscsi-target_managing- storage-devices#creating-a-read-only-iscsi-lun_configuring-an-iscsi-target


    I'm not trying to make it read-only. I'm trying to turn on memory caching.

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From didier gaumet@3:633/10 to All on Friday, January 16, 2026 21:30:01
    Le 16/01/2026 … 20:44, Greg a ‚crit˙:

    I'm not trying to make it read-only. I'm trying to turn on memory caching.

    Sorry: I did not read your post carefully enough and I am kind of absent-minded :-(

    this other paragraph of the RedHat doc does not mention read caching but states that you can enable write caching by creating a fileio stortage
    object: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/managing_storage_devices/configuring-an-iscsi-target_managing-storage-devices#creating-a-fileio-storage-object_configuring-an-iscsi-target

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Greg@3:633/10 to All on Friday, January 16, 2026 21:40:02
    On 1/16/26 21:23, didier gaumet wrote:
    Le 16/01/2026 … 20:44, Greg a ‚crit˙:

    I'm not trying to make it read-only. I'm trying to turn on memory
    caching.

    Sorry: I did not read your post carefully enough and I am kind of absent-minded :-(

    this other paragraph of the RedHat doc does not mention read caching but states that you can enable write caching by creating a fileio stortage object:
    Yes but I don't like the extra layer (filesystem) in between, I prefer
    to export block device directly.

    Regards

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From debian-user@3:633/10 to All on Friday, January 16, 2026 22:00:01
    Greg <pld@sojka.co> wrote:
    hi there,

    I'm setting up an iSCSI server on Trixie. My plan is to export a
    block device with memory caching enabled for both reads and writes. Unfortunately, no matter what I try, targetcli always shows
    write-thru mode (for block devices). is there any way to change this? Different software?

    Additional memory caching on disk writes is generally discouraged since
    it adds to the risk of data loss. If you don't care about losing the
    data then you can store the data in memory instead of on a disk. Just
    use a tmpfs or other ramdisk.

    Thanks in advance for any help
    Greg

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Greg@3:633/10 to All on Sunday, January 18, 2026 10:00:01
    On 1/16/26 21:57, debian-user@howorth.org.uk wrote:
    Greg <pld@sojka.co> wrote:
    hi there,

    I'm setting up an iSCSI server on Trixie. My plan is to export a
    block device with memory caching enabled for both reads and writes.
    Unfortunately, no matter what I try, targetcli always shows
    write-thru mode (for block devices). is there any way to change this?
    Different software?

    Additional memory caching on disk writes is generally discouraged since
    it adds to the risk of data loss.

    When using appropriate hardware, the risk is really low.

    If you don't care about losing the
    data then you can store the data in memory instead of on a disk. Just
    use a tmpfs or other ramdisk.
    That's not an option for me. I need block storage, but with caching.

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Greg@3:633/10 to All on Friday, January 23, 2026 18:50:02
    On 1/16/26 17:34, Greg wrote:
    hi there,

    I'm setting up an iSCSI server on Trixie. My plan is to export a block device with memory caching enabled for both reads and writes.
    Unfortunately, no matter what I try, targetcli always shows write-thru
    mode (for block devices). is there any way to change this? Different software?

    Problem with LIO is that the block plugin does not support write-back. Fortunately backing-store plugin of tgtd does support caching. Moreover,
    it may be used to export both, block devices and disk images.

    Regards

    --- PyGate Linux v1.5.2
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)