storage revision 1.10
11.10Sdholland$NetBSD: storage,v 1.10 2015/11/20 07:20:21 dholland Exp $ 21.1Sagc 31.1SagcNetBSD Storage Roadmap 41.1Sagc====================== 51.1Sagc 61.1SagcThis is a small roadmap document, and deals with the storage and file 71.10Sdhollandsystems side of the operating system. It discusses elements, projects, 81.10Sdhollandand goals that are under development or under discussion; and it is 91.10Sdhollanddivided into three categories based on perceived priority. 101.10Sdholland 111.10SdhollandThe following elements, projects, and goals are considered strategic 121.10Sdhollandpriorities for the project: 131.10Sdholland 141.10Sdholland 1. Improving iscsi 151.10Sdholland 2. nfsv4 support 161.10Sdholland 3. A better journaling file system solution 171.10Sdholland 4. Getting zfs working for real 181.10Sdholland 5. Seamless full-disk encryption 191.10Sdholland 201.10SdhollandThe following elements, projects, and goals are not strategic 211.10Sdhollandpriorities but are still important undertakings worth doing: 221.10Sdholland 231.10Sdholland 6. lfs64 241.10Sdholland 7. Per-process namespaces 251.10Sdholland 8. lvm tidyup 261.10Sdholland 9. Flash translation layer 271.10Sdholland 10. Shingled disk support 281.10Sdholland 11. ext3/ext4 support 291.10Sdholland 12. Port hammer from Dragonfly 301.10Sdholland 13. afs maintenance 311.10Sdholland 14. execute-in-place 321.10Sdholland 331.10SdhollandThe following elements, projects, and goals are perhaps less pressing; 341.10Sdhollandthis doesn't mean one shouldn't work on them but the expected payoff 351.10Sdhollandis perhaps less than for other things: 361.1Sagc 371.10Sdholland 15. coda maintenance 381.1Sagc 391.8Sagc 401.10SdhollandExplanations 411.10Sdholland============ 421.1Sagc 431.10Sdholland1. Improving iscsi 441.10Sdholland------------------ 451.1Sagc 461.10SdhollandBoth the existing iscsi target and initiator are fairly bad code, and 471.10Sdhollandneither works terribly well. Fixing this is fairly important as iscsi 481.10Sdhollandis where it's at for remote block devices. Note that there appears to 491.10Sdhollandbe no compelling reason to move the target to the kernel or otherwise 501.10Sdhollandmake major architectural changes. 511.10Sdholland 521.10Sdholland - As of November 2015 nobody is known to be working on this. 531.10Sdholland - There is currently no clear timeframe or release target. 541.10Sdholland - Contact agc for further information. 551.10Sdholland 561.10Sdholland 571.10Sdholland2. nfsv4 support 581.10Sdholland---------------- 591.10Sdholland 601.10Sdhollandnfsv4 is at this point the de facto standard for FS-level (as opposed 611.10Sdhollandto block-level) network volumes in production settings. The legacy nfs 621.10Sdhollandcode currently in NetBSD only supports nfsv2 and nfsv3. 631.10Sdholland 641.10SdhollandThe intended plan is to port FreeBSD's nfsv4 code, which also includes 651.10Sdhollandnfsv2 and nfsv3 support, and eventually transition to it completely, 661.10Sdhollanddropping our current nfs code. (Which is kind of a mess.) So far the 671.10Sdhollandonly step that has been taken is to import the code from FreeBSD. The 681.10Sdhollandnext step is to update that import (since it was done a while ago now) 691.10Sdhollandand then work on getting it to configure and compile. 701.10Sdholland 711.10Sdholland - As of November 2015 nobody is working on this, and a volunteer to 721.10Sdholland take charge is urgently needed. 731.10Sdholland - There is no clear timeframe or release target, although having an 741.10Sdholland experimental version ready for -8 would be great. 751.10Sdholland - Contact dholland for further information. 761.10Sdholland 771.10Sdholland 781.10Sdholland3. A better journaling file system solution 791.10Sdholland------------------------------------------- 801.10Sdholland 811.10SdhollandWAPBL, the journaling FFS that NetBSD rolled out some time back, has a 821.10Sdhollandcritical problem: it does not address the historic ffs behavior of 831.10Sdhollandallowing stale on-disk data to leak into user files in crashes. And 841.10Sdhollandbecause it runs faster, this happens more often and with more data. 851.10SdhollandThis situation is both a correctness and a security liability. Fixing 861.10Sdhollandit has turned out to be difficult. It is not really clear what the 871.10Sdhollandbest option at this point is: 881.10Sdholland 891.10Sdholland+ Fixing WAPBL (e.g. to flush newly allocated/newly written blocks to 901.10Sdhollanddisk early) has been examined by several people who know the code base 911.10Sdhollandand judged difficult. Still, it might be the best way forward. 921.10Sdholland 931.10Sdholland+ There is another journaling FFS; the Harvard one done by Margo 941.10SdhollandSeltzer's group some years back. We have a copy of this, but as it was 951.10Sdhollandwritten in BSD/OS circa 1999 it needs a lot of merging, and then will 961.10Sdhollandundoubtedly also need a certain amount of polishing to be ready for 971.10Sdhollandproduction use. It does record-based rather than block-based 981.10Sdhollandjournaling and does not share the stale data problem. 991.10Sdholland 1001.10Sdholland+ We could bring back softupdates (in the softupdates-with-journaling 1011.10Sdhollandform found today in FreeBSD) -- this code is even more complicated 1021.10Sdhollandthan the softupdates code we removed back in 2009, and it's not clear 1031.10Sdhollandthat it's any more robust either. However, it would solve the stale 1041.10Sdhollanddata problem if someone wanted to port it over. It isn't clear that 1051.10Sdhollandthis would be any less work than getting the Harvard journaling FFS 1061.10Sdhollandrunning... or than writing a whole new file system either. 1071.10Sdholland 1081.10Sdholland+ We could write a whole new journaling file system. (That is, not 1091.10SdhollandFFS. Doing a new journaling FFS implementation is probably not 1101.10Sdhollandsensible relative to merging the Harvard journaling FFS.) This is a 1111.10Sdhollandbig project. 1121.10Sdholland 1131.10SdhollandRight now it is not clear which of these avenues is the best way 1141.10Sdhollandforward. Given the general manpower shortage, it may be that the best 1151.10Sdhollandway is whatever looks best to someone who wants to work on the 1161.10Sdhollandproblem. 1171.10Sdholland 1181.10Sdholland - As of November 2015 nobody is working on fixing WAPBL. There has 1191.10Sdholland been some interest in the Harvard journaling FFS but no significant 1201.10Sdholland progress. Nobody is known to be working on or particularly 1211.10Sdholland interested in porting softupdates-with-journaling. And, while 1221.10Sdholland dholland has been mumbling for some time about a plan for a 1231.10Sdholland specific new file system to solve this problem, there isn't any 1241.10Sdholland realistic prospect of significant progress on that in the 1251.10Sdholland foreseeable future, and nobody else is known to have or be working 1261.10Sdholland on even that much. 1271.10Sdholland - There is no clear timeframe or release target; but given that WAPBL 1281.10Sdholland has been disabled by default for new installs in -7 this problem 1291.10Sdholland can reasonably be said to have become critical. 1301.10Sdholland - Contact joerg or martin regarding WAPBL; contact dholland regarding 1311.10Sdholland the Harvard journaling FFS. 1321.10Sdholland 1331.10Sdholland 1341.10Sdholland4. Getting zfs working for real 1351.10Sdholland------------------------------- 1361.10Sdholland 1371.10SdhollandZFS has been almost working for years now. It is high time we got it 1381.10Sdhollandreally working. One of the things this entails is updating the ZFS 1391.10Sdhollandcode, as what we have is rather old. The Illumos version is probably 1401.10Sdhollandwhat we want for this. 1411.10Sdholland 1421.10Sdholland - There has been intermittent work on zfs, but as of November 2015 1431.10Sdholland nobody is known to be actively working on it 1441.10Sdholland - There is no clear timeframe or release target. 1451.10Sdholland - Contact riastradh or ?? for further information. 1461.1Sagc 1471.1Sagc 1481.10Sdholland5. Seamless full-disk encryption 1491.10Sdholland-------------------------------- 1501.1Sagc 1511.10Sdholland(This is only sort of a storage issue.) We have cgd, and it is 1521.10Sdhollandbelieved to still be cryptographically suitable, at least for the time 1531.10Sdhollandbeing. However, we don't have any of the following things: 1541.1Sagc 1551.10Sdholland+ An easy way to install a machine with full-disk encryption. It 1561.10Sdhollandshould really just be a checkbox item in sysinst, or not much more 1571.10Sdhollandthan that. 1581.5Sagc 1591.10Sdholland+ Ideally, also an easy way to turn on full-disk encryption for a 1601.10Sdhollandmachine that's already been installed, though this is harder. 1611.1Sagc 1621.10Sdholland+ A good story for booting off a disk that is otherwise encrypted; 1631.10Sdhollandobviously one cannot encrypt the bootblocks, but it isn't clear where 1641.10Sdhollandin boot the encrypted volume should take over, or how to make a best 1651.10Sdhollandeffort at protecting the unencrypted elements needed to boot. (At 1661.10Sdhollandleast, in the absence of something like UEFI secure boot combined with 1671.10Sdhollandan cryptographic oracle to sign your bootloader image so UEFI will 1681.10Sdhollandaccept it.) There's also the question of how one runs cgdconfig(8) and 1691.10Sdhollandwhere the cgdconfig binary comes from. 1701.1Sagc 1711.10Sdholland+ A reasonable way to handle volume passphrases. MacOS apparently uses 1721.10Sdhollandlogin passwords for this (or as passphrases for secondary keys, or 1731.10Sdhollandsomething) and this seems to work well enough apart from the somewhat 1741.10Sdhollandsurreal experience of sometimes having to log in twice. However, it 1751.10Sdhollandwill complicate the bootup story. 1761.1Sagc 1771.10SdhollandGiven the increasing regulatory-level importance of full-disk 1781.10Sdhollandencryption, this is at least a de facto requirement for using NetBSD 1791.10Sdhollandon laptops in many circumstances. 1801.1Sagc 1811.10Sdholland - As of November 2015 nobody is known to be working on this. 1821.10Sdholland - There is no clear timeframe or release target. 1831.10Sdholland - Contact dholland for further information. 1841.5Sagc 1851.5Sagc 1861.10Sdholland6. lfs64 1871.10Sdholland-------- 1881.5Sagc 1891.10SdhollandLFS currently only supports volumes up to 2 TB. As LFS is of interest 1901.10Sdhollandfor use on shingled disks (which are larger than 2 TB) and also for 1911.10Sdhollanduse on disk arrays (ditto) this is something of a problem. A 64-bit 1921.10Sdhollandversion of LFS for large volumes is in the works. 1931.5Sagc 1941.10Sdholland - As of November 2015 dholland is working on this. 1951.10Sdholland - It is close to being ready for at least experimental use and is 1961.10Sdholland expected to be in 8.0. 1971.10Sdholland - Responsible: dholland 1981.5Sagc 1991.8Sagc 2001.10Sdholland7. Per-process namespaces 2011.10Sdholland------------------------- 2021.5Sagc 2031.10SdhollandSupport for per-process variation of the file system namespace enables 2041.10Sdhollanda number of things; more flexible chroots, for example, and also 2051.10Sdhollandpotentially more efficient pkgsrc builds. dholland thought up a 2061.10Sdhollandsomewhat hackish but low-footprint way to implement this. 2071.5Sagc 2081.10Sdholland - As of November 2015 dholland is working on this. 2091.10Sdholland - It is scheduled to be in 8.0. 2101.10Sdholland - Responsible: dholland 2111.5Sagc 2121.8Sagc 2131.10Sdholland8. lvm tidyup 2141.10Sdholland------------- 2151.5Sagc 2161.10Sdholland[agc says someone should look at our lvm stuff; XXX fill this in] 2171.5Sagc 2181.10Sdholland - As of November 2015 nobody is known to be working on this. 2191.10Sdholland - There is no clear timeframe or release target. 2201.10Sdholland - Contact agc for further information. 2211.5Sagc 2221.1Sagc 2231.10Sdholland9. Flash translation layer 2241.10Sdholland-------------------------- 2251.9Sagc 2261.10SdhollandSSDs ship with firmware called a "flash translation layer" that 2271.10Sdhollandarbitrates between the block device software expects to see and the 2281.10Sdhollandraw flash chips. FTLs handle wear leveling, lifetime management, and 2291.10Sdhollandalso internal caching, striping, and other performance concerns. While 2301.10SdhollandNetBSD has a file system for raw flash (chfs), it seems that given 2311.10Sdhollandthings NetBSD is often used for it ought to come with a flash 2321.10Sdhollandtranslation layer as well. 2331.10Sdholland 2341.10SdhollandNote that this is an area where writing your own is probably a bad 2351.10Sdhollandplan; it is a complicated area with a lot of prior art that's also 2361.10Sdhollandreportedly full of patent mines. There are a couple of open FTL 2371.10Sdhollandimplementations that we might be able to import. 2381.10Sdholland 2391.10Sdholland - As of November 2015 nobody is known to be working on this. 2401.10Sdholland - There is no clear timeframe or release target. 2411.10Sdholland - Contact dholland for further information. 2421.10Sdholland 2431.10Sdholland 2441.10Sdholland10. Shingled disk support 2451.10Sdholland------------------------- 2461.10Sdholland 2471.10SdhollandShingled disks (or more technically, disks with "shingled magnetic 2481.10Sdhollandrecording" or SMR) can only write whole tracks at once. Thus, to 2491.10Sdhollandoperate effectively they require translation support similar to the 2501.10Sdhollandflash translation layers found in SSDs. The nature and structure of 2511.10Sdhollandshingle translation layers is still being researched; however, at some 2521.10Sdhollandpoint we will want to support these things in NetBSD. 2531.10Sdholland 2541.10Sdholland - As of November 2015 one of dholland's coworkers is looking at this. 2551.10Sdholland - There is no clear timeframe or release target. 2561.10Sdholland - Contact dholland for further information. 2571.10Sdholland 2581.10Sdholland 2591.10Sdholland11. ext3/ext4 support 2601.10Sdholland--------------------- 2611.10Sdholland 2621.10SdhollandWe would like to be able to read and write Linux ext3fs and ext4fs 2631.10Sdhollandvolumes. (We can already read clean ext3fs volumes as they're the same 2641.10Sdhollandas ext2fs, modulo volume features our ext2fs code does not support; 2651.10Sdhollandbut we can't write them.) 2661.10Sdholland 2671.10SdhollandIdeally someone would write ext3 and/or ext4 code, whether integrated 2681.10Sdhollandwith or separate from the ext2 code we already have. It might also 2691.10Sdhollandmake sense to port or wrap the Linux ext3 or ext4 code so it can be 2701.10Sdhollandloaded as a GPL'd kernel module; it isn't clear if that would be more 2711.10Sdhollandor less work than doing an implementation. 2721.10Sdholland 2731.10SdhollandNote however that implementing ext3 has already defeated several 2741.10Sdhollandpeople; this is a harder project than it looks. 2751.10Sdholland 2761.10Sdholland - As of November 2015 nobody is known to be working on this. 2771.10Sdholland - There is no clear timeframe or release target. 2781.10Sdholland - Contact ?? for further information. 2791.10Sdholland 2801.10Sdholland 2811.10Sdholland12. Port hammer from Dragonfly 2821.10Sdholland------------------------------ 2831.10Sdholland 2841.10SdhollandWhile the motivation for and role of hammer isn't perhaps super 2851.10Sdhollandpersuasive, it would still be good to have it. Porting it from 2861.10SdhollandDragonfly is probably not that painful (compared to, say, zfs) but as 2871.10Sdhollandthe Dragonfly and NetBSD VFS layers have diverged in different 2881.10Sdhollanddirections from the original 4.4BSD, may not be entirely trivial 2891.10Sdhollandeither. 2901.10Sdholland 2911.10Sdholland - As of November 2015 nobody is known to be working on this. 2921.10Sdholland - There is no clear timeframe or release target. 2931.10Sdholland - There probably isn't any particular person to contact; for VFS 2941.10Sdholland concerns contact dholland or hannken. 2951.10Sdholland 2961.10Sdholland 2971.10Sdholland13. afs maintenance 2981.10Sdholland------------------- 2991.10Sdholland 3001.10SdhollandAFS needs periodic care and feeding to continue working as NetBSD 3011.10Sdhollandchanges, because the kernel-level bits aren't kept in the NetBSD tree 3021.10Sdhollandand don't get updated with other things. This is an ongoing issue that 3031.10Sdhollandalways seems to need more manpower than it gets. It might make sense 3041.10Sdhollandto import some of the kernel AFS code, or maybe even just some of the 3051.10Sdhollandglue layer that it uses, in order to keep it more current. 3061.10Sdholland 3071.10Sdholland - jakllsch sometimes works on this. 3081.10Sdholland - We would like every release to have working AFS by the time it's 3091.10Sdholland released. 3101.10Sdholland - Contact jakllsch or gendalia about AFS; for VFS concerns contact 3111.10Sdholland dholland or hannken. 3121.10Sdholland 3131.10Sdholland 3141.10Sdholland14. execute-in-place 3151.10Sdholland-------------------- 3161.10Sdholland 3171.10SdhollandIt is likely that the future includes non-volatile storage (so-called 3181.10Sdholland"nvram") that looks like RAM from the perspective of software. Most 3191.10Sdhollandimportantly: the storage is memory-mapped rather than looking like a 3201.10Sdhollanddisk controller. There are a number of things NetBSD ought to have to 3211.10Sdhollandbe ready for this, of which probably the most important is 3221.10Sdholland"execute-in-place": when an executable is run from such storage, and 3231.10Sdhollandmapped into user memory with mmap, the storage hardware pages should 3241.10Sdhollandbe able to appear directly in user memory. Right now they get 3251.10Sdhollandgratuitously copied into RAM, which is slow and wasteful. There are 3261.10Sdhollandalso other reasons (e.g. embedded device ROMs) to want execute-in- 3271.10Sdhollandplace support. 3281.10Sdholland 3291.10SdhollandNote that at the implementation level this is a UVM issue rather than 3301.10Sdhollandstrictly a storage issue. 3311.10Sdholland 3321.10SdhollandAlso note that one does not need access to nvram hardware to work on 3331.10Sdhollandthis issue; given the performance profiles touted for nvram 3341.10Sdhollandtechnologies, a plain RAM disk like md(4) is sufficient both 3351.10Sdhollandstructurally and for performance analysis. 3361.10Sdholland 3371.10Sdholland - As of November 2015 nobody is known to be working on this. Some 3381.10Sdholland time back, uebayasi wrote some preliminary patches, but they were 3391.10Sdholland rejected by the UVM maintainers. 3401.10Sdholland - There is no clear timeframe or release target. 3411.10Sdholland - Contact dholland for further information. 3421.10Sdholland 3431.10Sdholland 3441.10Sdholland15. coda maintenance 3451.10Sdholland-------------------- 3461.10Sdholland 3471.10SdhollandCoda only sort of works. [And I think it's behind relative to 3481.10Sdhollandupstream, or something of the sort; XXX fill this in.] Also the code 3491.10Sdhollandappears to have an ugly incestuous relationship with FFS. This should 3501.10Sdhollandreally be cleaned up. That or maybe it's time to remove Coda. 3511.10Sdholland 3521.10Sdholland - As of November 2015 nobody is known to be working on this. 3531.10Sdholland - There is no clear timeframe or release target. 3541.10Sdholland - There isn't anyone in particular to contact. 3551.9Sagc 3561.9Sagc 3571.9SagcAlistair Crooks, David Holland 3581.10SdhollandFri Nov 20 02:17:53 EST 2015 359