Ceph block snapshot
⚓ Rust 📅 2025-10-29 👤 surdeus 👁️ 2Good morning,
I'm VERY new to Rust, coming from Python, so I apologize in advance for some naive question or very obvious issue.
As my first real-world Rust application, I want to create a very simple script that lists all the images in a Ceph block pool and takes a snapshot of each one.
Basically just the equivalent of some "rbd ls", "rbd snap create" command.
I know that I could do everything by just wrapping the Ceph cli commands with std::process::Command but I'd rather use a more specific interface.
I'm trying to use librados-sys (librados_sys - Rust) and librbd-sys (librbd_sys - Rust) but I couldn't find any real documentation with examples on how to use them.
I'm completely stuck. So far, I haven't even been able to figure out how to create a connection to the Ceph cluster by passing the /etc/ceph/ceph.conf file to rados_connect() (I'm not even sure this is what I'm supposed to do, tbh).
Is there some better library that I could use? Or some example on how to use these?
Thanks a lot.
1 post - 1 participant
🏷️ Rust_feed