Western Digital has published a specialized Zonefs file system for zoned drives

Director of Software Development at Western Digital proposed on the Linux kernel developer mailing list, the new Zonefs file system, aimed at simplifying low-level work with zoned storage devices. Zonefs associates each zone in the drive with a separate file that can be used to store data in raw mode without manipulation at the sector and block level.

Zonefs is not a POSIX compliant filesystem and is limited to a narrow enough scope to allow applications to use the file API instead of accessing the block device directly with ioctl. Zone-related files require sequential write operations starting from the end of the file (padding write).

The files provided in Zonefs can be used to place on top of zoned database drives using storage structures in the form of an LSM (log-structured merge) log, starting from the concept of one file - one storage zone. For example, similar structures are used in the RocksDB and LevelDB databases. The proposed approach makes it possible to reduce the cost of porting code that was originally designed to manipulate files rather than block devices, as well as organize low-level work with zoned drives from applications in programming languages ​​other than C.

Under Zoned Drives are implied devices on hard magnetic disks or NVMe SSDs, the storage space in which is divided into zones that make up groups of blocks or sectors, in which only sequential addition of data is allowed with updating the entire group of blocks.

For example, record zoning is used in devices with tiled magnetic recording (Shingled Magnetic Recording, SMR), in which the track width is less than the width of the magnetic head, and the recording is performed with a partial overlap of the adjacent track, i.e. any overwriting results in the need to overwrite the entire group of tracks. As for SSDs, they initially have a binding to sequential write operations with preliminary data cleaning, but these operations are hidden at the controller level and the FTL (Flash Translation Layer) layer. To improve efficiency under certain types of load, the NVMe organization has standardized the ZNS (Zoned Namespaces) interface, which allows you to directly access zones bypassing the FTL layer.

Western Digital has published a specialized Zonefs file system for zoned drives

On Linux for zoned hard drives since kernel 4.10 offered ZBC (SCSI) and ZAC (ATA) block devices, and starting with release 4.13, the dm-zoned module has been added, which represents a zoned drive as a regular block device, hiding the write restrictions applied during operation. At the file system level, zoning support is already integrated into the F2FS file system, and a set of patches for the Btrfs file system is under development, the adaptation of which for zoned drives simplifies work in CoW (copy-on-write) mode.
Work Ext4 and XFS on top of zoned drives can be arranged using dm-zoned. To simplify the translation of file systems, the ZBD interface is proposed, which translates random write operations to files into streams of sequential write operations.

Western Digital has published a specialized Zonefs file system for zoned drives

Source: opennet.ru

Add a comment