Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Open-CAS provide SCSI Device(e.g. LTO-9 tape device)? #1579

Open
CherryYang05 opened this issue Nov 1, 2024 · 5 comments
Open

Does Open-CAS provide SCSI Device(e.g. LTO-9 tape device)? #1579

CherryYang05 opened this issue Nov 1, 2024 · 5 comments
Labels
question Further information is requested

Comments

@CherryYang05
Copy link

Question

I want to add a SCSI device(LTO-9 tape device) on opencas to build a tape cache. Does opencas natively support the SCSI interface? If not, how much code needs to be modified? Will it be too complicated?

@CherryYang05 CherryYang05 added the question Further information is requested label Nov 1, 2024
@robertbaldyga
Copy link
Member

robertbaldyga commented Nov 5, 2024

Hi @CherryYang05! In theory it should work somehow, as LTO is a block device. To make it work reasonably good, however, it would need some smaller or bigger adaptations, depending on what is your target use case. Do you want it to be a write cache or read cache? If write cache, then do you need random (at least within some LBA range) writes or only sequential write buffer? If read cache, then what is your expected block size? Do you maybe need prefetcher?

Having more details on the use case will make it easier to estimate how many changes are required to support it.

@CherryYang05
Copy link
Author

Hi @CherryYang05! In theory it should work somehow, as LTO is a block device. To make it work reasonably good, however, it would need some smaller or bigger adaptations, depending on what is your target use case. Do you want it to be a write cache or read cache? If write cache, then do you need random (at least within some LBA range) writes or only sequential write buffer? If read cache, then what is your expected block size? Do you maybe need prefetcher?

Having more details on the use case will make it easier to estimate how many changes are required to support it.

@robertbaldyga Thank you very much for your reply. I am currently trying to add tape drive support to OpenCAS and build a hybrid storage system using SSD and tape. In fact, the tape drive is a SCSI sequential device. I hope that SSD can be used as a cache for tape (similar to the current SSD as a cache for HDD). Therefore, I am studying the architecture of OpenCAS and reading its source code. I wonder if there is a slightly more detailed usage document for OpenCAS that I can refer to. And thanks a lot for your reply again.

@robertbaldyga
Copy link
Member

You have user documentation of Open CAS here https://open-cas.com/. There is not much of a design level documentation, though.

Using SSD as a cache should be possible. The usage scenario of tape drives is, however, very different from usages of HDD, so the cache would need to be optimized for big block access and strong sequentiality guarantees. The seeks on HDD are bad for performance, but acceptable and expected during the normal workload. A SSD cache can reduce number of seeks on the HDD, but not eliminate them. The penalty of seek on a tape drive is extreme, so if you are thinking about supporting non-sequential reads/writes for such a hybrid storage, a transparent SSD cache will most likely be not enough.

Do you have any specific use case you your mind or you just want to explore the possibilities?

@CherryYang05
Copy link
Author

@robertbaldyga Thank you for your reply! I understand the difference between sequential devices like tape drives and block devices like HDDs. I currently have a basic design to support SSDs as a cache for tape drives, and I want to explore the possibility of implementing it on OpenCAS. At the moment I just need to be able to test the bandwidth and latency of a hybrid of SSD and tape under various workloads (expected to use fio for testing) without having to implement a file system etc on it.
And it's a pleasure to discuss this with you. I am reading the relevant source code and exploring the possibility of implementing tape devices. I will update it in time if there are new questions or progress.

@robertbaldyga
Copy link
Member

robertbaldyga commented Nov 12, 2024

@CherryYang05 Sure. Feel free to ask if you have a question. We did not explore LTO use case with Open CAS before, so any conclusions you have are also potentially very interesting for the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants