Skip to main content

🧊 blkcache

Userspace transparent block device cache.

⬇️ Deps

sudo apt install libnbd-bin nbdkit-plugin-python nbdfuse fuse3

ℹ️ Usage

uvx blkcache /dev/sr0 file.iso

Then point tools at file.iso instead of /dev/sr0.

How?

It uses nbdkit to create a Network Block Storage device in Python, mounts it using fuse, then creates a mmapped disk cache of sectors as they're read.

Why?

Say you're archiving CDs, DVDs, floppy disks or hard drives that are on their last legs.

With this you can mount a cached version of the disk in FUSE, read the parts of the filesystem that are important to you, and dump the contents while creating a ddrescue image that can be resumed later without unnecessary wear on the media or waiting days for it to grind against bad blocks. With identical disks or the same media read in different drives, you can merge ddrescue images to get a perfect copy.

In my workflow, it's used to speed up imaging disks where I snag the important before doing a deep copy that might fail later on.

Metadata

Release files for blkcache 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for blkcache 0.1.2
File Size Uploaded Provenance Actions
blkcache-0.1.2.tar.gz 15.8 kB Without provenance Details for blkcache-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for blkcache 0.1.2
File Interpreter ABI Platform Actions
blkcache-0.1.2-py3-none-any.whl Python 3 none any Details for blkcache-0.1.2-py3-none-any.whl

Total release size: 36.2 kB

Release files / blkcache-0.1.2.tar.gz

Download URL blkcache-0.1.2.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
63936db08a4906382b3948a7253203b6e99d6a809512286a03f19a58067dc8b8
BLAKE2b-256 checksum
How to use checksums
59d64f25c58c32e16772f6d751973ff39ec99d88f4bd62899125f7d1c727832d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / blkcache-0.1.2-py3-none-any.whl

Download URL blkcache-0.1.2-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8046ceefe77cb748922ca9489c3f3c8ca6bb2d9001d8c41cb3a904f237840ffd
BLAKE2b-256 checksum
How to use checksums
fcb682b119c6d03fb1d23654c6b5311f729ff71e9cba9c5d96f98ba9e1f4e168
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Security for blkcache 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page