1

According to this Seagate presentation there are some ongoing (?) efforts targeted toward modification of ext4 file system introducing SMRFS -EXT4 - support of hmHDD. The goal is to provide layer that will hide specifics of ZAC commands from applications (I believe). There is also this document that claims that "As of kernel v 4.7... hm drives are exposed as SG node - No block device file". What does it mean? maybe these document are outdated and ext4 (or other common linux file system) has been added support for host aware HDD. What linux distro support HMHDD by file system? If such support exists - What steps are needed to get HMHDD up and running without changes in applications (where file system hides all specifics)? General applications like DB are my concern - not log style.

Also there is such video (SDC2020: Improve Distributed Storage System TCO with SMR HDDs) that claims that starting from 4.10 linux kernel f2fs supports drives already - did you used such approach? Maybe f2fs is not best match for random operations but I hope f2fs can fulfill such tasks with acceptable performance (where reading is dominant)

Vlad
  • 113
  • 8

1 Answers1

1

"As of kernel v 4.7... Host managed drives are exposed as SG node - No block device file". What does it mean?

You'll get only the /dev/sgX SCSI generic device, it's a character device which allows you to send SCSI commands to the drive. I'm not sure what is the correct use case in case only the SG node exists -- solutions mentioned below require the block device node to be present to work.

I wasn't able to find any information about progress in zoned device support in ext4, f2fs claims to support it, calling mkfs.f2fs with -m should be all you need, but I have no personal experience with that.

You can solve the zone "problem" on the block level with Device Mapper and dm-zoned target. Basically creating a "normal" block device on top of the drive that can be used by all filesystems because for them it's just a a regular block device. Looks like the only major distribution that packages the user space dm-zoned tools is SUSE, kernel support in various distributions is summarized here.

ezequiel
  • 3
  • 2
Vojtech Trefny
  • 16,922
  • 6
  • 24
  • 48
  • Thank you. Does "/dev/sgX" and sending SCSI commands imply that application that rely on posix read(), write(), seek operations won't need to be changed? Do you think that it's better to use Device Mapper? If application doesn't support kernel 4.13 (for mapper, I don't know this yet) can I use 2 computers: one as "NAS" with Device Mapper and another with application? – Vlad Apr 25 '21 at 06:22
  • I'm not sure about this. I've limited experience only with WD SMR drives and newer kernels and in my case I always had the block device node created, it's possible this behaviour was changed in newer kernel versions. – Vojtech Trefny Apr 25 '21 at 07:09
  • DM allows you to turn the drive to a "normal" one, if you have application that supports zoned devices directly, you don't need it. But read/write/seek is not enough, because you need to write to the zoned drive in a certain way to make it work. – Vojtech Trefny Apr 25 '21 at 07:17
  • Thank you very much. I believe that Device Mapper makes it completely transparent for application to make regular posix file operations, that is hides specifics of Host Managed HDD. It may impact performance because of nature of SMR but API of application may stay unchanged. I hope. – Vlad Apr 25 '21 at 07:17