LWN: Comments on "Accessing zoned block devices with zonefs" https://lwn.net/Articles/794364/ This is a special feed containing comments posted to the individual LWN article titled "Accessing zoned block devices with zonefs". en-us Wed, 15 Jan 2025 22:12:39 +0000 Wed, 15 Jan 2025 22:12:39 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Accessing zoned block devices with zonefs https://lwn.net/Articles/809743/ https://lwn.net/Articles/809743/ lzap <div class="FormattedComment"> Is there a good resource on how those SMR-managed drives actually work internally these days?<br> </div> Thu, 16 Jan 2020 15:13:40 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/795021/ https://lwn.net/Articles/795021/ anton Yes, classic log-structures file systems work with segments (i.e., zones) that are written sequentially. To reclaim space, the live data from some segments is copied to a new segment. COW file systems (e.g., BTRFS) generally use a similar organization as log-structured file systems, except for free-space management: COW file systems don't garbage-collect, but keep track of free blocks, and are therfore not so great on zoned devices. <p>The article refers to SMR HDDs. What I have seen in the HDD market in the last few years was that SMR drives were only a little larger than conventional drives, and looking for the largest drives (16TB) today, all offers are for conventional drives. It seems that SMR is on the way out. However, NAND flash only allows erasing big blocks, and despite announcements for years that we are going to get technologies without this restriction, NAND flash seems to be still going strong. However, this property of NAND flash is usually hidden behind a flash translation layer that makes it look like a normal block device. Wed, 31 Jul 2019 17:42:10 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794743/ https://lwn.net/Articles/794743/ flussence <div class="FormattedComment"> Wouldn't a log-structured filesystem be a good fit for these? Mostly append-only, can use the conventional zones for bookkeeping and garbage collection workspace.<br> </div> Sat, 27 Jul 2019 05:33:18 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794659/ https://lwn.net/Articles/794659/ gdt <div class="FormattedComment"> Could I suggest that filesystem extended attributes might be a good idea? Often the people who want good sequential performance from drives -- and are willing to work with odd filesystems to get it -- also work in environments where there are increasing rules around data security. As one example, government science agencies.<br> </div> Fri, 26 Jul 2019 02:40:33 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794653/ https://lwn.net/Articles/794653/ Sesse <div class="FormattedComment"> SSDs are definitely zoned, but they're not exposing any of it to userspace (yet).<br> <p> Usually SLC is for speed and not endurance, by the way.<br> </div> Thu, 25 Jul 2019 21:04:31 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794594/ https://lwn.net/Articles/794594/ Baughn <div class="FormattedComment"> The chief problem for a CoW filesystem would be garbage collection. If you look at ZFS for example, it depends on being able to reuse blocks previously belonging to files that have been modified, and those blocks might be in the middle of a sequential zone.<br> <p> We might need a background process running something like a copying GC, which can't be retrofitted without significant work.<br> </div> Thu, 25 Jul 2019 12:22:21 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794592/ https://lwn.net/Articles/794592/ ptman <div class="FormattedComment"> IIRC some SSDs are already partially zoned. MLC drives can have some area used as SLC (giving greater write endurance) for FTL garbage collection and bookkeeping.<br> </div> Thu, 25 Jul 2019 10:52:41 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794568/ https://lwn.net/Articles/794568/ epa <div class="FormattedComment"> It seems as though an ordinary, non-COW file system could work well enough with one of these drives provided the application itself is append-only. So you provide some hint to indicate a particular file will only be appended to (in normal use) and the file system sticks it on one or more of the append-only zones. That big append-only file could be a log file for a database or whatever. The amount of smarts needed in the file system itself is pretty small. <br> </div> Wed, 24 Jul 2019 22:36:15 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794483/ https://lwn.net/Articles/794483/ nivedita76 <div class="FormattedComment"> The regular file systems don’t support efficiently using such a device (yet). This seems like a transitional thing until they do. It would seem like it shouldn’t be too heavy a lift for CoW filesystems to understand the zones while allocating new blocks, but it may never be possible for non-CoW filesystems to be efficient.<br> </div> Wed, 24 Jul 2019 14:57:34 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794482/ https://lwn.net/Articles/794482/ Freeaqingme <div class="FormattedComment"> If ZoneFS were to become a thing, it's only a matter of time before features are being added to it until feature parity with XFS/ext4 is reached. If it's feasible to implement in Btrfs and XFS, I'd say to just implement it there and don't bother implementing a separate FS.<br> <p> <font class="QuotedText">&gt; The idea is that zonefs provides just enough of a filesystem for those developers [...]</font><br> <p> In what way would those developers be hindered by using a regular FS?<br> </div> Wed, 24 Jul 2019 14:40:11 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794479/ https://lwn.net/Articles/794479/ willy <div class="FormattedComment"> Your understanding is correct; epithumia is mistaken.<br> </div> Wed, 24 Jul 2019 13:29:01 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794478/ https://lwn.net/Articles/794478/ willy <div class="FormattedComment"> Bad news, SSDs also want zones, although for very different reasons from shingled drives.<br> <p> One of the larger pieces of cost for an SSD is the RAM used to run the FTL. If you can shrink the FTL by disallowing random writes, you save a lot of money. So we're going to see zoned SSDs too.<br> <p> </div> Wed, 24 Jul 2019 13:28:13 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794475/ https://lwn.net/Articles/794475/ Sesse <div class="FormattedComment"> The use case is really “large drives”. :-) SMR drives are built this way; you can't write to the middle of a zone, because the tracks sort-of overlap and must be written from the inside out (or is it outside in, I have no idea). You can either have the drive simulate a normal drive (rather slowly), or you can expose the functionality to userspace, where it fits really nicely into some kinds of storage patterns already.<br> <p> In particular, anything BigTable-like (generically called LSM) will never overwrite existing data on write; they'll just write a correction record (“whatever the address for user X used to be, now it's Y”, or “delete user X”), where the last value wins. When needed, they'll have garbage collection, where they read an entire chunk (or zone, in this case), prune out all the old values, and write a new tree. It fits perfectly well with the append-only nature of these zones, so if you know how the zones are structured, you take nearly no hit from using an SMR disk instead of a conventional disk.<br> <p> This does really feel like a transient thing, though. Host-managed SMR disks are not really all that much used yet, and as they ramp up, it's into a future where flash keeps getting cheaper and cheaper, and eventually looks like it will be overtaking rotating media in terms of cost per byte.<br> </div> Wed, 24 Jul 2019 10:36:19 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794474/ https://lwn.net/Articles/794474/ james Another use case is video surveillance, where you're continually recording video and want to keep as much as possible before you need to over-write. <p> Commercial devices based on a zoned drive could have an embedded OS in the conventional zones to keep the bill of materials down. Wed, 24 Jul 2019 10:24:58 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794471/ https://lwn.net/Articles/794471/ smurf <div class="FormattedComment"> Do you really need to write a whole zone at once? I thought these drives have per-zone append (until the zone is full of course).<br> </div> Wed, 24 Jul 2019 04:48:45 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794469/ https://lwn.net/Articles/794469/ epithumia <div class="FormattedComment"> The use case for these things is basically write-rarely data. The devices are larger than the available non-shingled drives but can't really be used in the same way (or at least not efficiently).<br> <p> And yes, you must write an entire zone at once. But the devices generally have a region which accepts random writes (or are paired with another device which serves that function), so you can potentially accumulate a zone's worth of data over time and then move that to a zone all at once. There is plenty of room for smart filesystems here.<br> </div> Wed, 24 Jul 2019 01:04:18 +0000 Accessing zoned block devices with zonefs https://lwn.net/Articles/794464/ https://lwn.net/Articles/794464/ JohnVonNeumann <div class="FormattedComment"> For the FS/Storage noobs in here, what would be the ideal use case for zoned block devices or zonefs?<br> <p> And how does atomicity work with this? The article states that there is no random access for writes to the zones, does this mean that an entire zone (like a block) has to be allocated for a single write, and further writes to the zone would require a zeroing of the zone, before write? Or can a zone be used for multiple operations, provided that the previous blocks aren't touched?<br> </div> Tue, 23 Jul 2019 23:44:26 +0000