Home | History | Annotate | Line # | Download | only in roadmaps
storage revision 1.12
      1 $NetBSD: storage,v 1.12 2016/05/01 20:51:36 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 
     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 November 2015 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 November 2015 nobody is working on this, and a volunteer to
     74    take charge is urgently needed.
     75  - There is no clear timeframe or release target, although having an
     76    experimental version ready for -8 would be great.
     77  - Contact dholland for further information.
     78 
     79 
     80 3. A better journaling file system solution
     81 -------------------------------------------
     82 
     83 WAPBL, the journaling FFS that NetBSD rolled out some time back, has a
     84 critical problem: it does not address the historic ffs behavior of
     85 allowing stale on-disk data to leak into user files in crashes. And
     86 because it runs faster, this happens more often and with more data.
     87 This situation is both a correctness and a security liability. Fixing
     88 it has turned out to be difficult. It is not really clear what the
     89 best option at this point is:
     90 
     91 + Fixing WAPBL (e.g. to flush newly allocated/newly written blocks to
     92 disk early) has been examined by several people who know the code base
     93 and judged difficult. Still, it might be the best way forward.
     94 
     95 + There is another journaling FFS; the Harvard one done by Margo
     96 Seltzer's group some years back. We have a copy of this, but as it was
     97 written in BSD/OS circa 1999 it needs a lot of merging, and then will
     98 undoubtedly also need a certain amount of polishing to be ready for
     99 production use. It does record-based rather than block-based
    100 journaling and does not share the stale data problem.
    101 
    102 + We could bring back softupdates (in the softupdates-with-journaling
    103 form found today in FreeBSD) -- this code is even more complicated
    104 than the softupdates code we removed back in 2009, and it's not clear
    105 that it's any more robust either. However, it would solve the stale
    106 data problem if someone wanted to port it over. It isn't clear that
    107 this would be any less work than getting the Harvard journaling FFS
    108 running... or than writing a whole new file system either.
    109 
    110 + We could write a whole new journaling file system. (That is, not
    111 FFS. Doing a new journaling FFS implementation is probably not
    112 sensible relative to merging the Harvard journaling FFS.) This is a
    113 big project.
    114 
    115 Right now it is not clear which of these avenues is the best way
    116 forward. Given the general manpower shortage, it may be that the best
    117 way is whatever looks best to someone who wants to work on the
    118 problem.
    119 
    120  - As of November 2015 nobody is working on fixing WAPBL. There has
    121    been some interest in the Harvard journaling FFS but no significant
    122    progress. Nobody is known to be working on or particularly
    123    interested in porting softupdates-with-journaling. And, while
    124    dholland has been mumbling for some time about a plan for a
    125    specific new file system to solve this problem, there isn't any
    126    realistic prospect of significant progress on that in the
    127    foreseeable future, and nobody else is known to have or be working
    128    on even that much.
    129  - There is no clear timeframe or release target; but given that WAPBL
    130    has been disabled by default for new installs in -7 this problem
    131    can reasonably be said to have become critical.
    132  - Contact joerg or martin regarding WAPBL; contact dholland regarding
    133    the Harvard journaling FFS.
    134 
    135 
    136 4. Getting zfs working for real
    137 -------------------------------
    138 
    139 ZFS has been almost working for years now. It is high time we got it
    140 really working. One of the things this entails is updating the ZFS
    141 code, as what we have is rather old. The Illumos version is probably
    142 what we want for this.
    143 
    144  - There has been intermittent work on zfs, but as of November 2015
    145    nobody is known to be actively working on it
    146  - There is no clear timeframe or release target.
    147  - Contact riastradh or ?? for further information.
    148 
    149 
    150 5. Seamless full-disk encryption
    151 --------------------------------
    152 
    153 (This is only sort of a storage issue.) We have cgd, and it is
    154 believed to still be cryptographically suitable, at least for the time
    155 being. However, we don't have any of the following things:
    156 
    157 + An easy way to install a machine with full-disk encryption. It
    158 should really just be a checkbox item in sysinst, or not much more
    159 than that.
    160 
    161 + Ideally, also an easy way to turn on full-disk encryption for a
    162 machine that's already been installed, though this is harder.
    163 
    164 + A good story for booting off a disk that is otherwise encrypted;
    165 obviously one cannot encrypt the bootblocks, but it isn't clear where
    166 in boot the encrypted volume should take over, or how to make a best
    167 effort at protecting the unencrypted elements needed to boot. (At
    168 least, in the absence of something like UEFI secure boot combined with
    169 an cryptographic oracle to sign your bootloader image so UEFI will
    170 accept it.) There's also the question of how one runs cgdconfig(8) and
    171 where the cgdconfig binary comes from.
    172 
    173 + A reasonable way to handle volume passphrases. MacOS apparently uses
    174 login passwords for this (or as passphrases for secondary keys, or
    175 something) and this seems to work well enough apart from the somewhat
    176 surreal experience of sometimes having to log in twice. However, it
    177 will complicate the bootup story.
    178 
    179 Given the increasing regulatory-level importance of full-disk
    180 encryption, this is at least a de facto requirement for using NetBSD
    181 on laptops in many circumstances.
    182 
    183  - As of November 2015 nobody is known to be working on this.
    184  - There is no clear timeframe or release target.
    185  - Contact dholland for further information.
    186 
    187 
    188 6. Finish tls-maxphys
    189 ---------------------
    190 
    191 The tls-maxphys branch changes MAXPHYS (the maximum size of a single
    192 I/O request) from a global fixed constant to a value that's probed
    193 separately for each particular I/O channel based on its
    194 capabilities. Large values are highly desirable for e.g. feeding large
    195 disk arrays but do not work with all hardware.
    196 
    197 The code is nearly done and just needs more testing and support in
    198 more drivers.
    199 
    200  - As of November 2015 nobody is known to be working on this.
    201  - There is no clear timeframe or release target.
    202  - Contact tls for further information.
    203 
    204 
    205 7. nvme suppport
    206 ----------------
    207 
    208 nvme ("NVM Express") is a hardware interface standard for PCI-attached
    209 SSDs. NetBSD now has a driver for these; however, it was ported from
    210 OpenBSD and is not (yet) MPSAFE. This is, unfortunately, a fairly
    211 serious limitation given the point and nature of nvme devices.
    212 
    213 Relatedly, the I/O path needs to be restructured to avoid software
    214 bottlenecks on the way to an nvme device: they are fast enough that
    215 things like disksort() do not make sense.
    216 
    217 Semi-relatedly, it is also time for scsipi to become MPSAFE.
    218 
    219  - As of May 2016 a port of OpenBSD's driver has been commited. This
    220    will be in -8.
    221  - However, the driver still needs to be made MPSAFE, and we still
    222    need to attend to scsipi and various other I/O path bottlenecks.
    223  - There is no clear timeframe or release target for these points.
    224  - Contact msaitoh or agc for further information.
    225 
    226 
    227 8. lfs64
    228 --------
    229 
    230 LFS currently only supports volumes up to 2 TB. As LFS is of interest
    231 for use on shingled disks (which are larger than 2 TB) and also for
    232 use on disk arrays (ditto) this is something of a problem. A 64-bit
    233 version of LFS for large volumes is in the works.
    234 
    235  - As of November 2015 dholland is working on this.
    236  - It is close to being ready for at least experimental use and is
    237    expected to be in 8.0.
    238  - Responsible: dholland
    239 
    240 
    241 9. Per-process namespaces
    242 -------------------------
    243 
    244 Support for per-process variation of the file system namespace enables
    245 a number of things; more flexible chroots, for example, and also
    246 potentially more efficient pkgsrc builds. dholland thought up a
    247 somewhat hackish but low-footprint way to implement this.
    248 
    249  - As of November 2015 dholland is working on this.
    250  - It is scheduled to be in 8.0.
    251  - Responsible: dholland
    252 
    253 
    254 10. lvm tidyup
    255 --------------
    256 
    257 [agc says someone should look at our lvm stuff; XXX fill this in]
    258 
    259  - As of November 2015 nobody is known to be working on this.
    260  - There is no clear timeframe or release target.
    261  - Contact agc for further information.
    262 
    263 
    264 11. Flash translation layer
    265 ---------------------------
    266 
    267 SSDs ship with firmware called a "flash translation layer" that
    268 arbitrates between the block device software expects to see and the
    269 raw flash chips. FTLs handle wear leveling, lifetime management, and
    270 also internal caching, striping, and other performance concerns. While
    271 NetBSD has a file system for raw flash (chfs), it seems that given
    272 things NetBSD is often used for it ought to come with a flash
    273 translation layer as well.
    274 
    275 Note that this is an area where writing your own is probably a bad
    276 plan; it is a complicated area with a lot of prior art that's also
    277 reportedly full of patent mines. There are a couple of open FTL
    278 implementations that we might be able to import.
    279 
    280  - As of November 2015 nobody is known to be working on this.
    281  - There is no clear timeframe or release target.
    282  - Contact dholland for further information.
    283 
    284 
    285 12. Shingled disk support
    286 -------------------------
    287 
    288 Shingled disks (or more technically, disks with "shingled magnetic
    289 recording" or SMR) can only write whole tracks at once. Thus, to
    290 operate effectively they require translation support similar to the
    291 flash translation layers found in SSDs. The nature and structure of
    292 shingle translation layers is still being researched; however, at some
    293 point we will want to support these things in NetBSD.
    294 
    295  - As of November 2015 one of dholland's coworkers is looking at this.
    296  - There is no clear timeframe or release target.
    297  - Contact dholland for further information.
    298 
    299 
    300 13. ext3/ext4 support
    301 ---------------------
    302 
    303 We would like to be able to read and write Linux ext3fs and ext4fs
    304 volumes. (We can already read clean ext3fs volumes as they're the same
    305 as ext2fs, modulo volume features our ext2fs code does not support;
    306 but we can't write them.)
    307 
    308 Ideally someone would write ext3 and/or ext4 code, whether integrated
    309 with or separate from the ext2 code we already have. It might also
    310 make sense to port or wrap the Linux ext3 or ext4 code so it can be
    311 loaded as a GPL'd kernel module; it isn't clear if that would be more
    312 or less work than doing an implementation.
    313 
    314 Note however that implementing ext3 has already defeated several
    315 people; this is a harder project than it looks.
    316 
    317  - As of May 2016 there is a GSoC project to implement read-only ext4
    318    support, but (it not being summer yet) no particular progress.
    319  - There is no clear timeframe or release target.
    320  - Contact ?? for further information.
    321 
    322 
    323 14. Port hammer from Dragonfly
    324 ------------------------------
    325 
    326 While the motivation for and role of hammer isn't perhaps super
    327 persuasive, it would still be good to have it. Porting it from
    328 Dragonfly is probably not that painful (compared to, say, zfs) but as
    329 the Dragonfly and NetBSD VFS layers have diverged in different
    330 directions from the original 4.4BSD, may not be entirely trivial
    331 either.
    332 
    333  - As of November 2015 nobody is known to be working on this.
    334  - There is no clear timeframe or release target.
    335  - There probably isn't any particular person to contact; for VFS
    336    concerns contact dholland or hannken.
    337 
    338 
    339 15. afs maintenance
    340 -------------------
    341 
    342 AFS needs periodic care and feeding to continue working as NetBSD
    343 changes, because the kernel-level bits aren't kept in the NetBSD tree
    344 and don't get updated with other things. This is an ongoing issue that
    345 always seems to need more manpower than it gets. It might make sense
    346 to import some of the kernel AFS code, or maybe even just some of the
    347 glue layer that it uses, in order to keep it more current.
    348 
    349  - jakllsch sometimes works on this.
    350  - We would like every release to have working AFS by the time it's
    351    released.
    352  - Contact jakllsch or gendalia about AFS; for VFS concerns contact
    353    dholland or hannken.
    354 
    355 
    356 16. execute-in-place
    357 --------------------
    358 
    359 It is likely that the future includes non-volatile storage (so-called
    360 "nvram") that looks like RAM from the perspective of software. Most
    361 importantly: the storage is memory-mapped rather than looking like a
    362 disk controller. There are a number of things NetBSD ought to have to
    363 be ready for this, of which probably the most important is
    364 "execute-in-place": when an executable is run from such storage, and
    365 mapped into user memory with mmap, the storage hardware pages should
    366 be able to appear directly in user memory. Right now they get
    367 gratuitously copied into RAM, which is slow and wasteful. There are
    368 also other reasons (e.g. embedded device ROMs) to want execute-in-
    369 place support.
    370 
    371 Note that at the implementation level this is a UVM issue rather than
    372 strictly a storage issue. 
    373 
    374 Also note that one does not need access to nvram hardware to work on
    375 this issue; given the performance profiles touted for nvram
    376 technologies, a plain RAM disk like md(4) is sufficient both
    377 structurally and for performance analysis.
    378 
    379  - As of November 2015 nobody is known to be working on this. Some
    380    time back, uebayasi wrote some preliminary patches, but they were
    381    rejected by the UVM maintainers.
    382  - There is no clear timeframe or release target.
    383  - Contact dholland for further information.
    384 
    385 
    386 17. coda maintenance
    387 --------------------
    388 
    389 Coda only sort of works. [And I think it's behind relative to
    390 upstream, or something of the sort; XXX fill this in.] Also the code
    391 appears to have an ugly incestuous relationship with FFS. This should
    392 really be cleaned up. That or maybe it's time to remove Coda.
    393 
    394  - As of November 2015 nobody is known to be working on this.
    395  - There is no clear timeframe or release target.
    396  - There isn't anyone in particular to contact.
    397 
    398 
    399 Alistair Crooks, David Holland
    400 Fri Nov 20 02:17:53 EST 2015
    401 Sun May  1 16:50:42 EDT 2016 (some updates)
    402 
    403