Hi, I believe the best way is to use the udisks2 API. While it doesn't answer your question directly have a look here to see how to use udisks2 <https://gitlab.com/9898287/nixwriter/-/blob/master/src/aux/backend.rs>
- Get size of block device? xioren
- Get size of block device? MonkeeSage
- Get size of block device? MonkeeSage
- Get size of block device? xioren
- Get size of block device? adnan