Creating virtual block devices with ublk
Summary
The article provides a hands-on overview of Creating virtual block devices with ublk, a Linux kernel framework (v6.0+) that enables user-space block devices via io_uring. It explains the architecture (in-kernel ublk_drv and user-space servers), the device layout (/dev/ublkbN and /dev/ublkcN), various data-transfer modes (default, user_copy, zero_copy, auto buffer reg, and recovery-related modes), and details around worker threads, descriptors, and memory management. It also covers unprivileged mode, permissions, testing with fio, debugging tips, and a practical pet project that demonstrates a JBOD-like setup using ublk.