9 ms·
A detailed look at Ubuntu’s new experimental ZFS installer
- e12e 7y agoSomewhat related, I recently watched: "By the numbers: ZFS Performance Results from Six Operating Systems and Their Derivatives" https://www.youtube.com/watch?v=HrUvjocWopI https://www.youtube.com/watch?v=HrUvjocWopI Slides: https://callfortesting.org/log/vBSDcon-2019-Dexter-BytheNumbers.pdf https://callfortesting.org/log/vBSDcon-2019-Dexter-BytheNumb... And was surprised that zfs for windows (and hyper-v core) appear to be alive and comming along. Anyone using zfs on windows? Are they also going off of zfsonlinux - and if so how's support for encryption comming? Finally having shared, read write, encrypted home that works on both Linux and windows safely would be great!
- kop316 7y agoI used zfs on Linux with encrypted / for a while on Debian. It works really well, but unfortunately when I upgraded from Jessie to Buster, it did not recognize how I set it up and broke the system. I ended up having to reinstall.
- oarsinsync 7y agoDid you take a snapshot before performing the upgrade, and did you try to restore the previous snapshot before the reinstall? Curious if snapshots can protect you even as far as OS upgrades gone wrong. I'd assume they can, if all filesystems are ZFS + snapshotted.
- ohthehugemanate 7y agoI've used (conceptually equivalent) btrfs snapshots to let me install arch and gentoo, always easily rolling back to my own heavily customized Ubuntu system. I've never tried it, but given a copy of the snapshot tools, you should even be able to rollback from formatting your root partition.
- pm7 7y agoI think there are even some tools to do this directly in GRUB, at least for btrfs. We can have automatically created list of available snapshots.
- kop316 7y agoTo be honest I didn't feel like tinkering with it, I just reinstalled. Right now it is on ext4. My issue was that for some reason Linux no longer could find the encrypted partition to decrypt, so I couldn't get it up to a point where I could even work with it.
- oarsinsync 7y agoAh that's a shame. If you'd had a bootable USB stick or some pre-boot environment to use, you probably could have rolled back from a snapshot. At least, that's my understanding of the theory. Your experience has definitely not discouraged me from wanting to ZFS my root partitions though. If only to provide the potential / theoretical ability to roll back a snapshot if necessary!
- kop316 7y agoTo be honest, it was laziness on my part, I could have probably figured it out and fixed it. The snapshot ability was incredibly nice, don't get me wrong. I really liked it on my system. I may switch back in the near future. I can post my "script" when I get home if you want to try it. I use script very liberally, it was my notes of the commands I used in order in order to get ZFS/dmcrypt working.
- e12e 7y agoHm, you used zfsonlinux 0.8 under Jessie? Or was this prior to general release of native encryption support?
- kop316 7y agoWhat do you mean by "native" encryption? I used dmcrypt+LUKS. That is file system agonistic.
- e12e 7y agoThat's not zfs encryption, that's "just" encryption (ed: with zfs on top). (open) Zfs now has native encryption: https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.8.0 https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.8.0 (ed: there are some potential benefits to zfs encryption - it's as cross platform as zfs (encrypt an USB drive, use on Linux, os x, windows, freebsd). Zfs send/receive - receiver can take your encrypted backup - key doesn't have to travel. Mount drives across dual boot - share encrypted /home between dual boot windows and Linux? Not sure - but I think volume encryption is supported too. Might simplify encrypted swap (if you already "pay" for zfs). Note: there are apparently some issues with swap on zfs (volumes at least, possibly files too) If you don't need suspend/resume - suppose you could share one encrypted swap volume across multiboot environments..) )
- stiray 7y agozfs import -af?
- kop316 7y agoLike I said elsewhere, I could have probably fixed it, but I was lazy. I also wanted to try out Wayland, but I ended up going back to Xfce. Maybe when Xfce moves to Wayland I will try again.
- e12e 7y agoRelated: I moved to a new laptop at work with a zfs send over ssh of /home/myuser - and a mount+manual copy of what I wanted. Very straight forward - but not that different from an rsync to /home/myuser/olfstuff. Zfs encryption was still a bit new, so both boxes uses dmcrypt on full disk plus efi plus /boot (technically redundant, but it works). Looking forward to hopefully root on encrypted zfs in next Ubuntu lts.
- e12e 7y agoBTW, did you do a traditional in-place upgrade via apt? I've once or twice managed to break boot between Debian releases.. But not since lilo/early grub days. Sounds like you probably ran into zfs not being in Debian proper - and buster unlocking dmcrypt, but not being able to mount zfs? Should normally be salvageable via booting previous Jessie kernel and initial ram/root disk (initrd). At any rate, I gather you've moved on - just sound like an unlucky break - even with root on unsupported zfs.
- kop316 7y agoYeah I did an in-place upgrade via apt. I for some reason thought zfs was in debian proper (contrib vs. main). Like I said in another post, I may try doing that again. But then again, the main reason I haven't is because all of my stuff is backed up via Nextcloud, so reinstalling Debian is pretty quick/painless for me.
- jiggawatts 7y agoThe ZFS-equivalent on Windows is meant to be ReFS, which is roughly equivalent to ZFS when layered on top of Storage Spaces. I'm really keen to give ReFS+SS a go, but I keep hearing horror stories of abysmal parity-spaces performance, which can only be explained by poor coding and testing. Even if ZFS has better performance, it's never going to have full support, and it wasn't written for the NT kernel IO model, so I'm dubious about it ever working well...
- p_l 7y agoThere is less mismatch between ZFS and WinNT IO model than between ZFS and Linux VFS. Sincerely, someone who had to port kernel level code from Linux to NT.
- fuzzy2 7y agoI once tried ReFS, back on Windows 8.1 IIRC. Everything was going fine until suddenly, in the middle of the day, Windows decided that the ReFS volume was corrupt. And then you discover there’s virtually no rescue tools. It nearly gave me a heart attack. After rebooting three times it decided everything was okay again. I quickly moved away my data and never used ReFS since.
- xenospn 7y agoThat happened to me with a beta version of APFS. I never got my data back.
- e12e 7y agoThis entirely misses the fact that zfs (open zfs/zfsonlinux) is open and cross platform. Which is almost more interesting than all the good stuff that comes with zfs (volume management, disk management, software raid-like functionality, encryption, snapshots, send/receive). Its the first time we truly have a half-modern filesystem with safe write support and sane performance across many different os's. Even if just made dual booting freebsd and Linux this would be a fmgreat win imnho. If the choice is between zfs and fat32...
- 7y ago
- aasasd 7y agoIsn't encryption supposed to be a separate layer from the filesystem? Or is the merger specific to Windows? Or, is this ZFS' attitude toward features, like with the volume manager?
- cyphar 7y agoZFS "native encryption" is an upstream feature. The argument for doing it in the filesystem rather than as a separate layer is that it allows you to have far more flexibility than classic FDE (encrypted send/recv, you can use different keys for each filesystem, the encryption applies to all data written by ZFS so you don't need to worry about forgetting to set up LUKS on a new drive added to your pool, etc.)
- e12e 7y agoIn addition to what @cyphar mentions - zfs is "storage manager". Disk, volume and filesystem. Some of the power and data guarantees relate to this design decision. Encrypted /home/username filesystem with user-owned keys, is one neat trick,for example.
- pm7 7y ago> How many drives can you fit into a laptop? Why? One more addition to other replies: ZFS needs access to disks for self-healing (bit-rot detection and repair). It means that in the past if we wanted encryption, same date needed to be encrypted twice (one for every mirror). Now with encryption in ZFS, date is encrypted before creating redundancy. We can even do a scrub without encryption key.
- kop316 7y agoThat is how Linux and FreeBSD handle it. They both present a block layer device that you can then put ZFS on. The ZFS specific encryption IIRC is owned by Oracle, and they do not open source it.
- e12e 7y agoOracle "closed" (forked) zfs "back" and added encryption. But encryption is (now) in openzfs (who's canonical upstream has gravitated to "zfsonlinux" which is just the open project that ended up having the major mind-share). https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.8.0 https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.8.0
- chronogram 7y agoI think it's neat that having the possibility of a ZFS root on Ubuntu exists, but I just don't see myself using it. Will anyone, and if so for what purpose? I'm not in the home NAS building sphere, but wouldn't you rather have your root be a SquashFS image on an SD card or similar, with the storage section being ZFS? As for my laptop, I guess the snapshots are nice. I've never had a situation with my laptop where I wished I had snapshots, and even if something did break I only care about the files I have, which I back up. Then the snapshots are an extra safety net I suppose.
- ahje 7y agoZFS root is cool because it allows using snapshots for the entire system. Failed upgrade? No probs -- just revert to a previous snapshot!
- solatic 7y ago> but wouldn't you rather have your root be a SquashFS image on an SD card or similar, with the storage section being ZFS? Read-only root filesystems are one of those things that everybody ought to do, yet are usually impractical. Unfortunately, most software doesn't really support the Linux Filesystem Hierarchy Standard, so you have software that modifies itself under /usr (supposed to be read-only), ever-growing logs and caches not stored under /var/log and /var/cache so they can't be managed automatically, etc. You generally find squashfs roots where the distro is specialized and not general-purpose - for a recent example, see Talos.
- Legogris 7y agoHave you checked out NixOS? Everything is read-only and derived from static configuration.
- solatic 7y agoI run NixOS as a daily driver, and while I'm aware that the install media is a squashfs mount and that it's feasible to create server images where /nix/store is a squashfs mount as well. But in day-to-day use on a development machine, running nixos-rebuild switch makes a read-only root impractical, so far as I know.
- aasasd 7y agoStrangely, rather old ZFS keeps popping up in the news, while I never hear of Btrfs these days. It had some hype five or so years ago―what became of it?
- jdhawk 7y agoSynology, which is linux based, is really high on btrfs, otherwise I have not seen a lot of use cases.
- u02sgb 7y agoDoesn't use many of the advanced features though e.g. RAID is done using standard Linux mdraid with a btrfs partition on top of it.
- pnutjam 7y agobtrfs pools can use different sized disks, which can be useful.
- skykooler 7y agoJolla uses btrfs for the Sailfish OS mobile phone OS, which I'll admit is a rather baffling decision.
- m4rtink 7y agoUsed. Only the orignal Jolla phone introduced at the end of 2013 used btrfs. There have been many many problems with btrfs on the device, mainly due to metadata vs data block allocation issues & resulting metadata space exhaustion. The balance ooeration being basically unbounded in time and fregvently crashing outright did not help. Since then all other devices made or officially supported by Jolla are using EXT4 on LVM, including this one Xperia X running Sailfish OS I'm typing this on.
- skykooler 7y agoHuh, I could have sword the Xperia X port also used BTRFS, but I guess I never checked. (And yeah, those issues were how I found out: unable to create files while having "4 gb of free space" - not helped by the fact that it didn't run the balancer automatically.)
- abrowne 7y agoDoes anyone have a good idea if ZFS is something I might want on a (workstation or home) laptop, including power usage? Or more for a desktop/server?
- ianai 7y agoI’d do it as it has a lot of neat features. But I’d make sure that laptop had a “large“ (16g or more) amount of ram and a couple cores to spare.
- wil421 7y agoWhy would you put ZFS on a laptop? How many drives can you fit into a laptop? I’m running FreeNas at home with 6x4TB WD Red drives. All my computers back up to FreeNas. My Plex server reads/writes all its media from it as well. I’m going to switch FreeNas to a Linux server with ZFS at some point.
- 0xcde4c3db 7y ago> Why would you put ZFS on a laptop? Data validation, snapshots, compression, zfs send (for backups)?
- pm7 7y ago> Why would you put ZFS on a laptop? How many drives can you fit into a laptop? Checksums, compression, snapshots (so easy and fast incremental backups using send/receive). ZFS is much more then RAID. Also, even with only one drive we can increase our chances a bit using copies=2.
- ses1984 7y agoI wouldn't put zfs anywhere except a server or non root volume, the resource usage is high and if I had to guess it would have an impact on battery life. Unleas you're into either file systems or installers as a hobby, let others be the early adopters.
- pm7 7y ago> I had to guess it would have an impact on battery life. I guess it saves battery due to ARC (adaptive replacement cache). > Unleas you're into either file systems or installers as a hobby, let others be the early adopters. ZFS is already quite old filesystem as has great features (for example: checksumming, snapshots, compression) that should be already standard.
- ryuukk_ 7y agoIt is the same confusing, anti user friendly installer when will linux people understand that UX is important if they want people to finally switch from windows? Take a look at Apple, and how beautifully designed their OS install process is, even a retarded old granny can install/reset macOS
- drudru11 7y agoIt would be great to know if I could boot with mirrored and encrypted disks. What happens if one of the disks fails? Is there an easy way to boot from the other disk (I.e. do they replicate the MSDOS/UEFI) boot partition?)
- dual_basis 7y agoMy biggest complaint with ZFS is the lack of flexibility. If you setup two disks in a mirrored configuration, that's the end of it - those disks will be mirrored forever. If you get another drive and want to expand storage while still having redundancy, i.e. RAID5 type setup, you can't. You can increase storage with a pair of drives, by mirroring them first and then adding them to the zpool, but this is not an option configuration from a safety standpoint. I loved the flexibility of BTRFS in this regard - you could change the duplication level at any point. BTRFS seemed to abstract the storage away beautifully - just give us your drives, any combination of sizes, tell us how many copies of your data you want to keep and we'll handle the rest. It wasn't perfect, but I loved this approach, and I feel like it could go even further, eg. calculate risk of failure probabilities and then just tell it how low you want your risk. If it can't do it with your current drive capacities it could tell you what it needs to accomplish it, and then rebalance the data once you add the drives. Got an SSD? Throw it in the pool and let it optimize for cacheing. I know bcachefs has that particular aspect covered, but there's a lot of other basic features that still need to be implemented.
- lathiat 7y agoThey finally added this to Oracle Solaris ('closed source' zfs) in 11.4 (http://blog.moellenkamp.org/archives/50-How-to-remove-a-top-level-vdev-from-a-ZFS-pool.html http://blog.moellenkamp.org/archives/50-How-to-remove-a-top-...) And there is work on it for OpenZFS: https://www.youtube.com/watch?v=Njt82e_3qVo https://www.youtube.com/watch?v=Njt82e_3qVo for zfsonlinux As far as I understand you can currently add and remove striped/mirror devices, but you cannot remove raid-z vdevs (ref: https://github.com/zfsonlinux/zfs/issues/9129 https://github.com/zfsonlinux/zfs/issues/9129) - so there is definitely work left to be done in this area. as an aside mdadm has surprisingly fantastic features in this area and can reshape pretty much any array type to any other. i was impressed by that.