Home | History | Annotate | Line # | Download | only in roadmaps
      1 $NetBSD: storage,v 1.30 2025/05/19 18:02:53 nia Exp $
      2 
      3 NetBSD Storage Roadmap
      4 ======================
      5 
      6 This is a small roadmap document, and deals with the storage and file
      7 systems side of the operating system. It discusses elements, projects,
      8 and goals that are under development or under discussion; and it is
      9 divided into three categories based on perceived priority.
     10 
     11 The following elements, projects, and goals are considered strategic
     12 priorities for the project:
     13 
     14  1. Improving iscsi
     15  2. nfsv4 support
     16  3. A better journaling file system solution
     17  4. Stabilizing and improving zfs support
     18  5. Seamless full-disk encryption
     19  6. Finish tls-maxphys
     20 
     21 The following elements, projects, and goals are not strategic
     22 priorities but are still important undertakings worth doing:
     23 
     24  7. lfs64
     25  8. Per-process namespaces
     26  9. lvm tidyup
     27  10. Flash translation layer
     28  11. Shingled disk support
     29  12. ext3/ext4 support
     30  13. Port hammer from Dragonfly
     31  14. afs maintenance
     32  15. execute-in-place
     33  16. extended attributes for acl and capability storage
     34 
     35 The following elements, projects, and goals are perhaps less pressing;
     36 this doesn't mean one shouldn't work on them but the expected payoff
     37 is perhaps less than for other things:
     38 
     39  17. coda maintenance
     40 
     41 
     42 Explanations
     43 ============
     44 
     45 1. Improving iscsi
     46 ------------------
     47 
     48 Both the existing iscsi target and initiator are fairly bad code, and
     49 neither works terribly well. Fixing this is fairly important as iscsi
     50 is where it's at for remote block devices. Note that there appears to
     51 be no compelling reason to move the target to the kernel or otherwise
     52 make major architectural changes.
     53 
     54  - As of January 2017 nobody is known to be working on this.
     55  - There is currently no clear timeframe or release target.
     56  - Contact agc for further information.
     57 
     58 
     59 2. nfsv4 support
     60 ----------------
     61 
     62 nfsv4 is at this point the de facto standard for FS-level (as opposed
     63 to block-level) network volumes in production settings. The legacy nfs
     64 code currently in NetBSD only supports nfsv2 and nfsv3.
     65 
     66 The intended plan is to port FreeBSD's nfsv4 code, which also includes
     67 nfsv2 and nfsv3 support, and eventually transition to it completely,
     68 dropping our current nfs code. (Which is kind of a mess.) So far the
     69 only step that has been taken is to import the code from FreeBSD. The
     70 next step is to update that import (since it was done a while ago now)
     71 and then work on getting it to configure and compile.
     72 
     73  - As of January 2017 pgoyette has done a bit of prodding of the code
     74    recently, but otherwise nobody is working on this, and a volunteer to
     75    take charge and move it forward rapidly is urgently needed.
     76  - There is no clear timeframe or release target, although having an
     77    experimental version ready for -8 would be great.
     78  - Contact dholland for further information.
     79 
     80 
     81 3. A better journaling file system solution
     82 -------------------------------------------
     83 
     84 WAPBL, the journaling FFS that NetBSD rolled out some time back, has a
     85 critical problem: it does not address the historic ffs behavior of
     86 allowing stale on-disk data to leak into user files in crashes. And
     87 because it runs faster, this happens more often and with more data.
     88 This situation is both a correctness and a security liability. Fixing
     89 it has turned out to be difficult. It is not really clear what the
     90 best option at this point is:
     91 
     92 + Fixing WAPBL (e.g. to flush newly allocated/newly written blocks to
     93 disk early) has been examined by several people who know the code base
     94 and judged difficult. Also, some other problems have come to light
     95 more recently; e.g. PR 50725, and 45676. Still, it might be the best
     96 way forward. Some performance and stability issues were resolved
     97 in netbsd-8, and more work is planned.
     98 
     99 + There is another journaling FFS; the Harvard one done by Margo
    100 Seltzer's group some years back. We have a copy of this, but as it was
    101 written in BSD/OS circa 1999 it needs a lot of merging, and then will
    102 undoubtedly also need a certain amount of polishing to be ready for
    103 production use. It does record-based rather than block-based
    104 journaling and does not share the stale data problem.
    105 
    106 + We could bring back softupdates (in the softupdates-with-journaling
    107 form found today in FreeBSD) -- this code is even more complicated
    108 than the softupdates code we removed back in 2009, and it's not clear
    109 that it's any more robust either. However, it would solve the stale
    110 data problem if someone wanted to port it over. It isn't clear that
    111 this would be any less work than getting the Harvard journaling FFS
    112 running... or than writing a whole new file system either.
    113 
    114 + We could write a whole new journaling file system. (That is, not
    115 FFS. Doing a new journaling FFS implementation is probably not
    116 sensible relative to merging the Harvard journaling FFS.) This is a
    117 big project.
    118 
    119 Right now it is not clear which of these avenues is the best way
    120 forward. Given the general manpower shortage, it may be that the best
    121 way is whatever looks best to someone who wants to work on the
    122 problem.
    123 
    124  - There is no clear timeframe or release target; but given that WAPBL
    125    has been disabled by default for new installs in -7 this problem
    126    can reasonably be said to have become critical.
    127  - jdolecek fixed some WAPBL stability issues, that work is included
    128    in netbsd-8, could be possibly enough for making it default for new
    129    installs again; there is kern/47030 which seems to be triggered by WAPBL
    130    however
    131  - There has been some interest in the Harvard journaling FFS but no
    132    significant progress. Nobody is known to be working on or particularly
    133    interested in porting softupdates-with-journaling. And, while
    134    dholland has been mumbling for some time about a plan for a
    135    specific new file system to solve this problem, there isn't any
    136    realistic prospect of significant progress on that in the
    137    foreseeable future, and nobody else is known to have or be working
    138    on even that much.
    139  - Contact joerg, martin, or jdolecek regarding WAPBL; contact dholland
    140    regarding the Harvard journaling FFS.
    141 
    142 
    143 5. Seamless full-disk encryption
    144 --------------------------------
    145 
    146 (This is only sort of a storage issue.) We have cgd, and it is
    147 believed to still be cryptographically suitable, at least for the time
    148 being. However, we don't have any of the following things:
    149 
    150 + An easy way to install a machine with full-disk encryption. It
    151 should really just be a checkbox item in sysinst, or not much more
    152 than that.
    153 
    154 + Ideally, also an easy way to turn on full-disk encryption for a
    155 machine that's already been installed, though this is harder.
    156 
    157 + A good story for booting off a disk that is otherwise encrypted;
    158 obviously one cannot encrypt the bootblocks, but it isn't clear where
    159 in boot the encrypted volume should take over, or how to make a best
    160 effort at protecting the unencrypted elements needed to boot. (At
    161 least, in the absence of something like UEFI secure boot combined with
    162 a cryptographic oracle to sign your bootloader image so UEFI will
    163 accept it.) There's also the question of how one runs cgdconfig(8) and
    164 where the cgdconfig binary comes from.
    165 
    166 + A reasonable way to handle volume passphrases. MacOS apparently uses
    167 login passwords for this (or as passphrases for secondary keys, or
    168 something) and this seems to work well enough apart from the somewhat
    169 surreal experience of sometimes having to log in twice. However, it
    170 will complicate the bootup story.
    171 
    172 Given the increasing regulatory-level importance of full-disk
    173 encryption, this is at least a de facto requirement for using NetBSD
    174 on laptops in many circumstances.
    175 
    176  - As of January 2017 nobody is known to be working on this.
    177  - There is no clear timeframe or release target.
    178  - Contact dholland for further information.
    179 
    180 
    181 6. Finish tls-maxphys
    182 ---------------------
    183 
    184 The tls-maxphys branch changes MAXPHYS (the maximum size of a single
    185 I/O request) from a global fixed constant to a value that's probed
    186 separately for each particular I/O channel based on its
    187 capabilities. Large values are highly desirable for e.g. feeding large
    188 disk arrays and SSDs, but do not work with all hardware.
    189 
    190 The code is nearly done and just needs more testing and support in
    191 more drivers.
    192 
    193  - On October 2017 jdolecek re-synced the branch, intention is to wrap
    194    this up for future netbsd-9
    195  - Contact jdolecek or tls for further information.
    196 
    197 
    198 7. lfs64
    199 --------
    200 
    201 LFS currently only supports volumes up to 2 TB. As LFS is of interest
    202 for use on shingled disks (which are larger than 2 TB) and also for
    203 use on disk arrays (ditto) this is something of a problem. A 64-bit
    204 version of LFS for large volumes is in the works.
    205 
    206  - dholland was working on this in fall 2015 but time to finish it
    207    dried up.
    208  - The goal now is to get a few remaining things done in time for 8.0
    209    so it will at least be ready for experimental use there.
    210  - Responsible: dholland
    211 
    212 
    213 8. Per-process namespaces
    214 -------------------------
    215 
    216 Support for per-process variation of the file system namespace enables
    217 a number of things; more flexible chroots, for example, and also
    218 potentially more efficient pkgsrc builds. dholland thought up a
    219 somewhat hackish but low-footprint way to implement this, and has a
    220 preliminary implementation, but concluded the scheme was too fragile
    221 for production. A different approach is probably needed, although the
    222 existing code could be tidied up and committed if that seems desirable.
    223 
    224  - As of January 2017 nobody is working on this.
    225  - Contact: dholland
    226 
    227 
    228 9. lvm tidyup
    229 --------------
    230 
    231 [agc says someone should look at our lvm stuff; XXX fill this in]
    232 
    233  - As of January 2017 nobody is known to be working on this.
    234  - There is no clear timeframe or release target.
    235  - Contact agc for further information.
    236 
    237 
    238 10. Flash translation layer
    239 ---------------------------
    240 
    241 SSDs ship with firmware called a "flash translation layer" that
    242 arbitrates between the block device software expects to see and the
    243 raw flash chips. FTLs handle wear leveling, lifetime management, and
    244 also internal caching, striping, and other performance concerns. While
    245 NetBSD has a file system for raw flash (chfs), it seems that given
    246 things NetBSD is often used for it ought to come with a flash
    247 translation layer as well.
    248 
    249 Note that this is an area where writing your own is probably a bad
    250 plan; it is a complicated area with a lot of prior art that's also
    251 reportedly full of patent mines. There are a couple of open FTL
    252 implementations that we might be able to import.
    253 
    254  - As of January 2017 nobody is known to be working on this.
    255  - There is no clear timeframe or release target.
    256  - Contact dholland for further information.
    257 
    258 
    259 11. Shingled disk support
    260 -------------------------
    261 
    262 Shingled disks (or more technically, disks with "shingled magnetic
    263 recording" or SMR) can only write whole tracks at once. Thus, to
    264 operate effectively they require translation support similar to the
    265 flash translation layers found in SSDs. The nature and structure of
    266 shingle translation layers is still being researched; however, at some
    267 point we will want to support these things in NetBSD.
    268 
    269  - As of 2016 one of dholland's coworkers was looking at this.
    270  - There is no clear timeframe or release target.
    271  - Contact dholland for further information.
    272 
    273 
    274 12. ext3/ext4 support
    275 ---------------------
    276 
    277 Currently people are mostly using the kernel implementation of
    278 ext2 or using filesystems/fuse-ext2 from pkgsrc for later versions.
    279 
    280 We would like to be able to read and write Linux ext3fs and ext4fs
    281 volumes. (We can already read clean ext3fs volumes as they're the same
    282 as ext2fs, modulo volume features our ext2fs code does not support;
    283 but we can't write them.)
    284 
    285 Ideally someone would write ext3 and/or ext4 code, whether integrated
    286 with or separate from the ext2 code we already have. It might also
    287 make sense to port or wrap the Linux ext3 or ext4 code so it can be
    288 loaded as a GPL'd kernel module; it isn't clear if that would be more
    289 or less work than doing an implementation.
    290 
    291 Note however that implementing ext3 has already defeated several
    292 people; this is a harder project than it looks.
    293 
    294  - GSoc 2016 brought support for extents, and also ro support for dir
    295    hashes; jdolecek also implemented several frequently used ext4 features
    296    so most contemporary ext filesystems should be possible to mount
    297    read-write
    298  - still need rw dir_nhash and xattr (semi-easy), and eventually journaling
    299    (hard)
    300  - There is no clear timeframe or release target.
    301  - jdolecek is working on improving ext3/ext4 support (particularly
    302    journaling) 
    303 
    304 
    305 13. Port hammer from Dragonfly
    306 ------------------------------
    307 
    308 While the motivation for and role of hammer isn't perhaps super
    309 persuasive, it would still be good to have it. Porting it from
    310 Dragonfly is probably not that painful (compared to, say, zfs) but as
    311 the Dragonfly and NetBSD VFS layers have diverged in different
    312 directions from the original 4.4BSD, may not be entirely trivial
    313 either.
    314 
    315  - As of January 2017 nobody is known to be working on this.
    316  - There is no clear timeframe or release target.
    317  - There probably isn't any particular person to contact; for VFS
    318    concerns contact dholland or hannken.
    319 
    320 
    321 14. afs maintenance
    322 -------------------
    323 
    324 AFS needs periodic care and feeding to continue working as NetBSD
    325 changes, because the kernel-level bits aren't kept in the NetBSD tree
    326 and don't get updated with other things. This is an ongoing issue that
    327 always seems to need more manpower than it gets. It might make sense
    328 to import some of the kernel AFS code, or maybe even just some of the
    329 glue layer that it uses, in order to keep it more current.
    330 
    331  - jakllsch sometimes works on this.
    332  - We would like every release to have working AFS by the time it's
    333    released.
    334  - Contact jakllsch or gendalia about AFS; for VFS concerns contact
    335    dholland or hannken.
    336 
    337 
    338 15. execute-in-place
    339 --------------------
    340 
    341 It is likely that the future includes non-volatile storage (so-called
    342 "nvram") that looks like RAM from the perspective of software. Most
    343 importantly: the storage is memory-mapped rather than looking like a
    344 disk controller. There are a number of things NetBSD ought to have to
    345 be ready for this, of which probably the most important is
    346 "execute-in-place": when an executable is run from such storage, and
    347 mapped into user memory with mmap, the storage hardware pages should
    348 be able to appear directly in user memory. Right now they get
    349 gratuitously copied into RAM, which is slow and wasteful. There are
    350 also other reasons (e.g. embedded device ROMs) to want execute-in-
    351 place support.
    352 
    353 Note that at the implementation level this is a UVM issue rather than
    354 strictly a storage issue. 
    355 
    356 Also note that one does not need access to nvram hardware to work on
    357 this issue; given the performance profiles touted for nvram
    358 technologies, a plain RAM disk like md(4) is sufficient both
    359 structurally and for performance analysis.
    360 
    361  - As of January 2017 nobody is known to be working on this. Some
    362    time back, uebayasi wrote some preliminary patches, but they were
    363    rejected by the UVM maintainers.
    364  - There is no clear timeframe or release target.
    365  - Contact dholland for further information.
    366 
    367 
    368 16. use extended attributes for ACL and capability storage
    369 ----------------------------------------------------------
    370 
    371 Currently there is some support for extended attributes in ffs,
    372 but nothing really uses it. I would be nice if we came up with
    373 a standard format to store ACL's and capabilities like Linux has.
    374 The various tools must be modified to understand this and be able
    375 to copy them if requested. Also tools to manipulate the data will
    376 need to be written.
    377 
    378 
    379 17. coda maintenance
    380 --------------------
    381 
    382 Coda only sort of works. [And I think it's behind relative to
    383 upstream, or something of the sort; XXX fill this in.] Also the code
    384 appears to have an ugly incestuous relationship with FFS. This should
    385 really be cleaned up. That or maybe it's time to remove Coda.
    386 
    387  - As of January 2017 nobody is known to be working on this.
    388  - There is no clear timeframe or release target.
    389  - There isn't anyone in particular to contact.
    390  - Circa 2012 christos made it work read-write and split it
    391    into modules. Since then christos has not tested it.
    392 
    393 
    394 Alistair Crooks, David Holland
    395 Fri Nov 20 02:17:53 EST 2015
    396 Sun May  1 16:50:42 EDT 2016 (some updates)
    397 Fri Jan 13 00:40:50 EST 2017 (some more updates)
    398 
    399