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