storage revision 1.11
11.11Sdholland$NetBSD: storage,v 1.11 2015/11/20 08:13:41 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.11Sdholland 6. Finish tls-maxphys 201.10Sdholland 211.10SdhollandThe following elements, projects, and goals are not strategic 221.10Sdhollandpriorities but are still important undertakings worth doing: 231.10Sdholland 241.11Sdholland 7. nvme support 251.11Sdholland 8. lfs64 261.11Sdholland 9. Per-process namespaces 271.11Sdholland 10. lvm tidyup 281.11Sdholland 11. Flash translation layer 291.11Sdholland 12. Shingled disk support 301.11Sdholland 13. ext3/ext4 support 311.11Sdholland 14. Port hammer from Dragonfly 321.11Sdholland 15. afs maintenance 331.11Sdholland 16. execute-in-place 341.10Sdholland 351.10SdhollandThe following elements, projects, and goals are perhaps less pressing; 361.10Sdhollandthis doesn't mean one shouldn't work on them but the expected payoff 371.10Sdhollandis perhaps less than for other things: 381.1Sagc 391.11Sdholland 17. coda maintenance 401.1Sagc 411.8Sagc 421.10SdhollandExplanations 431.10Sdholland============ 441.1Sagc 451.10Sdholland1. Improving iscsi 461.10Sdholland------------------ 471.1Sagc 481.10SdhollandBoth the existing iscsi target and initiator are fairly bad code, and 491.10Sdhollandneither works terribly well. Fixing this is fairly important as iscsi 501.10Sdhollandis where it's at for remote block devices. Note that there appears to 511.10Sdhollandbe no compelling reason to move the target to the kernel or otherwise 521.10Sdhollandmake major architectural changes. 531.10Sdholland 541.10Sdholland - As of November 2015 nobody is known to be working on this. 551.10Sdholland - There is currently no clear timeframe or release target. 561.10Sdholland - Contact agc for further information. 571.10Sdholland 581.10Sdholland 591.10Sdholland2. nfsv4 support 601.10Sdholland---------------- 611.10Sdholland 621.10Sdhollandnfsv4 is at this point the de facto standard for FS-level (as opposed 631.10Sdhollandto block-level) network volumes in production settings. The legacy nfs 641.10Sdhollandcode currently in NetBSD only supports nfsv2 and nfsv3. 651.10Sdholland 661.10SdhollandThe intended plan is to port FreeBSD's nfsv4 code, which also includes 671.10Sdhollandnfsv2 and nfsv3 support, and eventually transition to it completely, 681.10Sdhollanddropping our current nfs code. (Which is kind of a mess.) So far the 691.10Sdhollandonly step that has been taken is to import the code from FreeBSD. The 701.10Sdhollandnext step is to update that import (since it was done a while ago now) 711.10Sdhollandand then work on getting it to configure and compile. 721.10Sdholland 731.10Sdholland - As of November 2015 nobody is working on this, and a volunteer to 741.10Sdholland take charge is urgently needed. 751.10Sdholland - There is no clear timeframe or release target, although having an 761.10Sdholland experimental version ready for -8 would be great. 771.10Sdholland - Contact dholland for further information. 781.10Sdholland 791.10Sdholland 801.10Sdholland3. A better journaling file system solution 811.10Sdholland------------------------------------------- 821.10Sdholland 831.10SdhollandWAPBL, the journaling FFS that NetBSD rolled out some time back, has a 841.10Sdhollandcritical problem: it does not address the historic ffs behavior of 851.10Sdhollandallowing stale on-disk data to leak into user files in crashes. And 861.10Sdhollandbecause it runs faster, this happens more often and with more data. 871.10SdhollandThis situation is both a correctness and a security liability. Fixing 881.10Sdhollandit has turned out to be difficult. It is not really clear what the 891.10Sdhollandbest option at this point is: 901.10Sdholland 911.10Sdholland+ Fixing WAPBL (e.g. to flush newly allocated/newly written blocks to 921.10Sdhollanddisk early) has been examined by several people who know the code base 931.10Sdhollandand judged difficult. Still, it might be the best way forward. 941.10Sdholland 951.10Sdholland+ There is another journaling FFS; the Harvard one done by Margo 961.10SdhollandSeltzer's group some years back. We have a copy of this, but as it was 971.10Sdhollandwritten in BSD/OS circa 1999 it needs a lot of merging, and then will 981.10Sdhollandundoubtedly also need a certain amount of polishing to be ready for 991.10Sdhollandproduction use. It does record-based rather than block-based 1001.10Sdhollandjournaling and does not share the stale data problem. 1011.10Sdholland 1021.10Sdholland+ We could bring back softupdates (in the softupdates-with-journaling 1031.10Sdhollandform found today in FreeBSD) -- this code is even more complicated 1041.10Sdhollandthan the softupdates code we removed back in 2009, and it's not clear 1051.10Sdhollandthat it's any more robust either. However, it would solve the stale 1061.10Sdhollanddata problem if someone wanted to port it over. It isn't clear that 1071.10Sdhollandthis would be any less work than getting the Harvard journaling FFS 1081.10Sdhollandrunning... or than writing a whole new file system either. 1091.10Sdholland 1101.10Sdholland+ We could write a whole new journaling file system. (That is, not 1111.10SdhollandFFS. Doing a new journaling FFS implementation is probably not 1121.10Sdhollandsensible relative to merging the Harvard journaling FFS.) This is a 1131.10Sdhollandbig project. 1141.10Sdholland 1151.10SdhollandRight now it is not clear which of these avenues is the best way 1161.10Sdhollandforward. Given the general manpower shortage, it may be that the best 1171.10Sdhollandway is whatever looks best to someone who wants to work on the 1181.10Sdhollandproblem. 1191.10Sdholland 1201.10Sdholland - As of November 2015 nobody is working on fixing WAPBL. There has 1211.10Sdholland been some interest in the Harvard journaling FFS but no significant 1221.10Sdholland progress. Nobody is known to be working on or particularly 1231.10Sdholland interested in porting softupdates-with-journaling. And, while 1241.10Sdholland dholland has been mumbling for some time about a plan for a 1251.10Sdholland specific new file system to solve this problem, there isn't any 1261.10Sdholland realistic prospect of significant progress on that in the 1271.10Sdholland foreseeable future, and nobody else is known to have or be working 1281.10Sdholland on even that much. 1291.10Sdholland - There is no clear timeframe or release target; but given that WAPBL 1301.10Sdholland has been disabled by default for new installs in -7 this problem 1311.10Sdholland can reasonably be said to have become critical. 1321.10Sdholland - Contact joerg or martin regarding WAPBL; contact dholland regarding 1331.10Sdholland the Harvard journaling FFS. 1341.10Sdholland 1351.10Sdholland 1361.10Sdholland4. Getting zfs working for real 1371.10Sdholland------------------------------- 1381.10Sdholland 1391.10SdhollandZFS has been almost working for years now. It is high time we got it 1401.10Sdhollandreally working. One of the things this entails is updating the ZFS 1411.10Sdhollandcode, as what we have is rather old. The Illumos version is probably 1421.10Sdhollandwhat we want for this. 1431.10Sdholland 1441.10Sdholland - There has been intermittent work on zfs, but as of November 2015 1451.10Sdholland nobody is known to be actively working on it 1461.10Sdholland - There is no clear timeframe or release target. 1471.10Sdholland - Contact riastradh or ?? for further information. 1481.1Sagc 1491.1Sagc 1501.10Sdholland5. Seamless full-disk encryption 1511.10Sdholland-------------------------------- 1521.1Sagc 1531.10Sdholland(This is only sort of a storage issue.) We have cgd, and it is 1541.10Sdhollandbelieved to still be cryptographically suitable, at least for the time 1551.10Sdhollandbeing. However, we don't have any of the following things: 1561.1Sagc 1571.10Sdholland+ An easy way to install a machine with full-disk encryption. It 1581.10Sdhollandshould really just be a checkbox item in sysinst, or not much more 1591.10Sdhollandthan that. 1601.5Sagc 1611.10Sdholland+ Ideally, also an easy way to turn on full-disk encryption for a 1621.10Sdhollandmachine that's already been installed, though this is harder. 1631.1Sagc 1641.10Sdholland+ A good story for booting off a disk that is otherwise encrypted; 1651.10Sdhollandobviously one cannot encrypt the bootblocks, but it isn't clear where 1661.10Sdhollandin boot the encrypted volume should take over, or how to make a best 1671.10Sdhollandeffort at protecting the unencrypted elements needed to boot. (At 1681.10Sdhollandleast, in the absence of something like UEFI secure boot combined with 1691.10Sdhollandan cryptographic oracle to sign your bootloader image so UEFI will 1701.10Sdhollandaccept it.) There's also the question of how one runs cgdconfig(8) and 1711.10Sdhollandwhere the cgdconfig binary comes from. 1721.1Sagc 1731.10Sdholland+ A reasonable way to handle volume passphrases. MacOS apparently uses 1741.10Sdhollandlogin passwords for this (or as passphrases for secondary keys, or 1751.10Sdhollandsomething) and this seems to work well enough apart from the somewhat 1761.10Sdhollandsurreal experience of sometimes having to log in twice. However, it 1771.10Sdhollandwill complicate the bootup story. 1781.1Sagc 1791.10SdhollandGiven the increasing regulatory-level importance of full-disk 1801.10Sdhollandencryption, this is at least a de facto requirement for using NetBSD 1811.10Sdhollandon laptops in many circumstances. 1821.1Sagc 1831.10Sdholland - As of November 2015 nobody is known to be working on this. 1841.10Sdholland - There is no clear timeframe or release target. 1851.10Sdholland - Contact dholland for further information. 1861.5Sagc 1871.5Sagc 1881.11Sdholland6. Finish tls-maxphys 1891.11Sdholland--------------------- 1901.11Sdholland 1911.11SdhollandThe tls-maxphys branch changes MAXPHYS (the maximum size of a single 1921.11SdhollandI/O request) from a global fixed constant to a value that's probed 1931.11Sdhollandseparately for each particular I/O channel based on its 1941.11Sdhollandcapabilities. Large values are highly desirable for e.g. feeding large 1951.11Sdhollanddisk arrays but do not work with all hardware. 1961.11Sdholland 1971.11SdhollandThe code is nearly done and just needs more testing and support in 1981.11Sdhollandmore drivers. 1991.11Sdholland 2001.11Sdholland - As of November 2015 nobody is known to be working on this. 2011.11Sdholland - There is no clear timeframe or release target. 2021.11Sdholland - Contact tls for further information. 2031.11Sdholland 2041.11Sdholland 2051.11Sdholland7. nvme suppport 2061.11Sdholland---------------- 2071.11Sdholland 2081.11Sdhollandnvme ("NVM Express") is a hardware interface standard for PCI-attached 2091.11SdhollandSSDs. NetBSD currently has no driver for these; unfortunately, while 2101.11Sdhollandboth FreeBSD and OpenBSD do neither of their drivers is likely 2111.11Sdhollanddirectly suitable: the FreeBSD driver is severely overcomplicated and 2121.11Sdhollandthe OpenBSD driver won't be MPSAFE. (And there isn't much point in a 2131.11Sdhollandnon-MPSAFE nvme driver.) 2141.11Sdholland 2151.11SdhollandRelatedly, the I/O path needs to be restructured to avoid software 2161.11Sdhollandbottlenecks on the way to an nvme device: they are fast enough that 2171.11Sdhollandthings like disksort() do not make sense. 2181.11Sdholland 2191.11SdhollandSemi-relatedly, it is also time for scsipi to become MPSAFE. 2201.11Sdholland 2211.11Sdholland - As of November 2015 nobody is known to be working on this. 2221.11Sdholland - There is no clear timeframe or release target. 2231.11Sdholland - Contact msaitoh or agc for further information. 2241.11Sdholland 2251.11Sdholland 2261.11Sdholland8. lfs64 2271.10Sdholland-------- 2281.5Sagc 2291.10SdhollandLFS currently only supports volumes up to 2 TB. As LFS is of interest 2301.10Sdhollandfor use on shingled disks (which are larger than 2 TB) and also for 2311.10Sdhollanduse on disk arrays (ditto) this is something of a problem. A 64-bit 2321.10Sdhollandversion of LFS for large volumes is in the works. 2331.5Sagc 2341.10Sdholland - As of November 2015 dholland is working on this. 2351.10Sdholland - It is close to being ready for at least experimental use and is 2361.10Sdholland expected to be in 8.0. 2371.10Sdholland - Responsible: dholland 2381.5Sagc 2391.8Sagc 2401.11Sdholland9. Per-process namespaces 2411.10Sdholland------------------------- 2421.5Sagc 2431.10SdhollandSupport for per-process variation of the file system namespace enables 2441.10Sdhollanda number of things; more flexible chroots, for example, and also 2451.10Sdhollandpotentially more efficient pkgsrc builds. dholland thought up a 2461.10Sdhollandsomewhat hackish but low-footprint way to implement this. 2471.5Sagc 2481.10Sdholland - As of November 2015 dholland is working on this. 2491.10Sdholland - It is scheduled to be in 8.0. 2501.10Sdholland - Responsible: dholland 2511.5Sagc 2521.8Sagc 2531.11Sdholland10. lvm tidyup 2541.11Sdholland-------------- 2551.5Sagc 2561.10Sdholland[agc says someone should look at our lvm stuff; XXX fill this in] 2571.5Sagc 2581.10Sdholland - As of November 2015 nobody is known to be working on this. 2591.10Sdholland - There is no clear timeframe or release target. 2601.10Sdholland - Contact agc for further information. 2611.5Sagc 2621.1Sagc 2631.11Sdholland11. Flash translation layer 2641.11Sdholland--------------------------- 2651.9Sagc 2661.10SdhollandSSDs ship with firmware called a "flash translation layer" that 2671.10Sdhollandarbitrates between the block device software expects to see and the 2681.10Sdhollandraw flash chips. FTLs handle wear leveling, lifetime management, and 2691.10Sdhollandalso internal caching, striping, and other performance concerns. While 2701.10SdhollandNetBSD has a file system for raw flash (chfs), it seems that given 2711.10Sdhollandthings NetBSD is often used for it ought to come with a flash 2721.10Sdhollandtranslation layer as well. 2731.10Sdholland 2741.10SdhollandNote that this is an area where writing your own is probably a bad 2751.10Sdhollandplan; it is a complicated area with a lot of prior art that's also 2761.10Sdhollandreportedly full of patent mines. There are a couple of open FTL 2771.10Sdhollandimplementations that we might be able to import. 2781.10Sdholland 2791.10Sdholland - As of November 2015 nobody is known to be working on this. 2801.10Sdholland - There is no clear timeframe or release target. 2811.10Sdholland - Contact dholland for further information. 2821.10Sdholland 2831.10Sdholland 2841.11Sdholland12. Shingled disk support 2851.10Sdholland------------------------- 2861.10Sdholland 2871.10SdhollandShingled disks (or more technically, disks with "shingled magnetic 2881.10Sdhollandrecording" or SMR) can only write whole tracks at once. Thus, to 2891.10Sdhollandoperate effectively they require translation support similar to the 2901.10Sdhollandflash translation layers found in SSDs. The nature and structure of 2911.10Sdhollandshingle translation layers is still being researched; however, at some 2921.10Sdhollandpoint we will want to support these things in NetBSD. 2931.10Sdholland 2941.10Sdholland - As of November 2015 one of dholland's coworkers is looking at this. 2951.10Sdholland - There is no clear timeframe or release target. 2961.10Sdholland - Contact dholland for further information. 2971.10Sdholland 2981.10Sdholland 2991.11Sdholland13. ext3/ext4 support 3001.10Sdholland--------------------- 3011.10Sdholland 3021.10SdhollandWe would like to be able to read and write Linux ext3fs and ext4fs 3031.10Sdhollandvolumes. (We can already read clean ext3fs volumes as they're the same 3041.10Sdhollandas ext2fs, modulo volume features our ext2fs code does not support; 3051.10Sdhollandbut we can't write them.) 3061.10Sdholland 3071.10SdhollandIdeally someone would write ext3 and/or ext4 code, whether integrated 3081.10Sdhollandwith or separate from the ext2 code we already have. It might also 3091.10Sdhollandmake sense to port or wrap the Linux ext3 or ext4 code so it can be 3101.10Sdhollandloaded as a GPL'd kernel module; it isn't clear if that would be more 3111.10Sdhollandor less work than doing an implementation. 3121.10Sdholland 3131.10SdhollandNote however that implementing ext3 has already defeated several 3141.10Sdhollandpeople; this is a harder project than it looks. 3151.10Sdholland 3161.10Sdholland - As of November 2015 nobody is known to be working on this. 3171.10Sdholland - There is no clear timeframe or release target. 3181.10Sdholland - Contact ?? for further information. 3191.10Sdholland 3201.10Sdholland 3211.11Sdholland14. Port hammer from Dragonfly 3221.10Sdholland------------------------------ 3231.10Sdholland 3241.10SdhollandWhile the motivation for and role of hammer isn't perhaps super 3251.10Sdhollandpersuasive, it would still be good to have it. Porting it from 3261.10SdhollandDragonfly is probably not that painful (compared to, say, zfs) but as 3271.10Sdhollandthe Dragonfly and NetBSD VFS layers have diverged in different 3281.10Sdhollanddirections from the original 4.4BSD, may not be entirely trivial 3291.10Sdhollandeither. 3301.10Sdholland 3311.10Sdholland - As of November 2015 nobody is known to be working on this. 3321.10Sdholland - There is no clear timeframe or release target. 3331.10Sdholland - There probably isn't any particular person to contact; for VFS 3341.10Sdholland concerns contact dholland or hannken. 3351.10Sdholland 3361.10Sdholland 3371.11Sdholland15. afs maintenance 3381.10Sdholland------------------- 3391.10Sdholland 3401.10SdhollandAFS needs periodic care and feeding to continue working as NetBSD 3411.10Sdhollandchanges, because the kernel-level bits aren't kept in the NetBSD tree 3421.10Sdhollandand don't get updated with other things. This is an ongoing issue that 3431.10Sdhollandalways seems to need more manpower than it gets. It might make sense 3441.10Sdhollandto import some of the kernel AFS code, or maybe even just some of the 3451.10Sdhollandglue layer that it uses, in order to keep it more current. 3461.10Sdholland 3471.10Sdholland - jakllsch sometimes works on this. 3481.10Sdholland - We would like every release to have working AFS by the time it's 3491.10Sdholland released. 3501.10Sdholland - Contact jakllsch or gendalia about AFS; for VFS concerns contact 3511.10Sdholland dholland or hannken. 3521.10Sdholland 3531.10Sdholland 3541.11Sdholland16. execute-in-place 3551.10Sdholland-------------------- 3561.10Sdholland 3571.10SdhollandIt is likely that the future includes non-volatile storage (so-called 3581.10Sdholland"nvram") that looks like RAM from the perspective of software. Most 3591.10Sdhollandimportantly: the storage is memory-mapped rather than looking like a 3601.10Sdhollanddisk controller. There are a number of things NetBSD ought to have to 3611.10Sdhollandbe ready for this, of which probably the most important is 3621.10Sdholland"execute-in-place": when an executable is run from such storage, and 3631.10Sdhollandmapped into user memory with mmap, the storage hardware pages should 3641.10Sdhollandbe able to appear directly in user memory. Right now they get 3651.10Sdhollandgratuitously copied into RAM, which is slow and wasteful. There are 3661.10Sdhollandalso other reasons (e.g. embedded device ROMs) to want execute-in- 3671.10Sdhollandplace support. 3681.10Sdholland 3691.10SdhollandNote that at the implementation level this is a UVM issue rather than 3701.10Sdhollandstrictly a storage issue. 3711.10Sdholland 3721.10SdhollandAlso note that one does not need access to nvram hardware to work on 3731.10Sdhollandthis issue; given the performance profiles touted for nvram 3741.10Sdhollandtechnologies, a plain RAM disk like md(4) is sufficient both 3751.10Sdhollandstructurally and for performance analysis. 3761.10Sdholland 3771.10Sdholland - As of November 2015 nobody is known to be working on this. Some 3781.10Sdholland time back, uebayasi wrote some preliminary patches, but they were 3791.10Sdholland rejected by the UVM maintainers. 3801.10Sdholland - There is no clear timeframe or release target. 3811.10Sdholland - Contact dholland for further information. 3821.10Sdholland 3831.10Sdholland 3841.11Sdholland17. coda maintenance 3851.10Sdholland-------------------- 3861.10Sdholland 3871.10SdhollandCoda only sort of works. [And I think it's behind relative to 3881.10Sdhollandupstream, or something of the sort; XXX fill this in.] Also the code 3891.10Sdhollandappears to have an ugly incestuous relationship with FFS. This should 3901.10Sdhollandreally be cleaned up. That or maybe it's time to remove Coda. 3911.10Sdholland 3921.10Sdholland - As of November 2015 nobody is known to be working on this. 3931.10Sdholland - There is no clear timeframe or release target. 3941.10Sdholland - There isn't anyone in particular to contact. 3951.9Sagc 3961.9Sagc 3971.9SagcAlistair Crooks, David Holland 3981.10SdhollandFri Nov 20 02:17:53 EST 2015 399