Open-CAS / open-cas-linux

Open CAS Linux
https://open-cas.com
BSD 3-Clause "New" or "Revised" License
223 stars 82 forks source link

Can open-cas be used with iscsi target backend #1585

Open boxerab opened 1 week ago

boxerab commented 1 week ago

Hello, I have been hunting for a good disk cache on linux for an iscsi initiator. I tried bcache, dm-cache. Nothing is suitable so far. Can an iscsi initiator use open-cas as a fast cache for read-only work flow ? I want an aggressive cache policy - every cache miss is cached on disk.

Many Thanks, Aaron

robertbaldyga commented 3 days ago

Hi @boxerab! Yes, Open CAS works with any block device. I don't see it very often as a cache on top of iscsi initiator, so I don't have much experience with that specific scenario, but it should work just fine. If you can describe your use case I can help with selecting the right cache parameters.

boxerab commented 3 days ago

@robertbaldyga thanks! I develop a codec for jpeg 2000, where images are large and often stored on network - iscsi is preferred method to access them. Currently I have a prefetch that reads blocks and they go into the page cache, but I also want a persistent layer that avoids network activity if blocks have already been read. So, this would be a read only work flow, and I would like every block read from remote to be cached on nvme or SSD. So, I suppose write-around would be the best strategy ?

Also, windows is also a target - my current idea is to run open cas on WSL2 instance on windows machine, and then connect from windows via SMB share.