10 ms·
Who Needs Git When You Have ZFS?
- skrowl 10y agoAlmost all of what they're saying the benefit here isn't ZFS specific and could be done (for example) with Volume Shadow Copies on Windows servers as well
- akerro 10y agoIt looks like ZFS which came from BSD systems will be/is the next big thing in Linux, not Ubuntu on Windows which gets more hype...
- claytonaalves 10y ago"Using ZFS as a replacement of Git for is probably not a good idea..." Of course not.
- db48x 10y agoI like ZFS a lot, but it's no replacement for Git. Snapshots are really handy for a lot of things, but not for a group of developers collaborating over some source code.
- emmelaich 10y agoDid you read the article? "Of course, I'm not seriously suggesting you'd ditch a "proper" version control system
- raverbashing 10y ago> Who needs Git? > Notably missing is support for merging So, it's almost like a car except it's missing its wheels No, it's not like Git
- ultramancool 10y agoYeah, I think a better title would have been "ZFS for Git users".
- buserror 10y agoThat and the rather obvious 'sudo' in front of all the commands. I mean, it's a cool tool; I use it on my NAS (particularly like the ECC mode instead of dumb RAID), but the git-equivalence aspect looks a little bit like a flamebait ;-)
- Freaky 10y agozfs allow zef mount,create,destroy,snapshot,rollback,diff,clone,send,receive mypool/projects Now he doesn't need sudo in front of most of them.
- chungy 10y agoUnfortunately, it remains a feature only on Solaris/illumos and FreeBSD. The Linux and Mac ports still lack support for delegation.
- oneeyedpigeon 10y ago> Of course, I'm not seriously suggesting you'd ditch a "proper" version control system, but it gives a good sense of what's possible at the file system level. > Using ZFS as a replacement of Git for is probably not a good idea, but just to give you a sense of what ZFS supports at the file system level, let me go through a few typical git-like operations:
- pmarreck 10y agoI really don't think the article was seriously suggesting what you think it was; showing similarities between different types of tools (usually a more familiar one and a less familiar one) is meant to be illustrative
- olavgg 10y agoZFS is excellent for database development! Create a snapshot before you try something that mess up your data and instantly restore it! If your development database is a few gigabytes, this will save you a lot of time.
- amelius 10y agoSounds great. Can you also duplicate versions of a database to coworkers on the same machine without much cost?
- olavgg 10y agoYes, if they have ZFS too, it is basically snapshot, send & receive. Or you can clone it and rsync it to them. Do not try to snapshot a running database though. Before you execute the snapshot you should make sure everything is flushed to disk. For example with PostgreSQL you need to create a checkpoint before the snapshot, so you write: SELECT pg_start_backup('prepare_my_snapshot'); AND when the snapshot is done: SELECT pg_stop_backup();
- db48x 10y agoIt's not so critical as that. Any transactions in flight when you take the snapshot won't be finalized and will be discarded when you start it back up from the snapshot, but that won't affect the consistency of the database.
- Bromskloss 10y ago> Do not try to snapshot a running database though. Before you execute the snapshot you should make sure everything is flushed to disk. Is a database (or anything else) really supposed to behave that way? Shouldn't every state along the way be possible to resume from? In particular, shouldn't database transactions take care of this?
- amelius 10y agoIf the snapshot is atomic as it should be, then yes.
- Finnucane 10y ago"Oracle's (previously Sun's) next-generation file system" That's why you need to stick with Git.
- xenophonf 10y agoWhat does Oracle have to do with anything? This is FUD.
- ntlve 10y agoIt is certainly not FUD, see https://www.eff.org/cases/oracle-v-google https://www.eff.org/cases/oracle-v-google The point is, Oracle have decided to sue once over usage of something they bought and may do so again in the future.
- espadrine 10y agoExactly. The legal situation of Google's use of Java APIs was always a tiny bit murky, but it was super-clear-cut compared to the use of ZFS-on-Linux.
- ryao 10y agoOracle sued over Google reimplementing code that was under the GPL (OpenJDK) under the Apache 2.0 license (Apache Harmony). Google recently switched to the GPL code because of it. In the case of ZoL, the code is derived from the original code and is under the original license. The idea that ZoL is somehow more at risk is pure FUD.
- espadrine 10y agoMy understanding is that the risk is mostly the other way around: it infringes Linux' GPL license (see https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/ https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/). Would Oracle have grounds to sue as a Linux copyright holder? They have successfully made API copyrightable, so they clearly have competent lawyers.
- nabla9 10y agoMore like git-annex and git LFS. ZFS can be good cms choice for large binary files.
- estrabd 10y agoZFS doesn't have history in that way; snapshots are far too coarse. HAMMER, for example, is closer to what you want if you're going to replace git with a FS. https://www.dragonflybsd.org/hammer/ https://www.dragonflybsd.org/hammer/
- exDM69 10y agoZFS and other advanced versioned/copy-on-write filesystems are really cool and useful but it's not a source code management tool. E.g. the examples show branching but not merging. On the other hand, this might be useful for storing binary large files that are not really diffable and mergeable, and thus a bad fit for Git. However, the typical use case for this is art assets in games, which means that it's the artists and designers who are the target audience. Git is often said to be too difficult for non-programmers, and ZFS or BTRFS is definitely not easier.
- athenot 10y agoIf you look past the attention-grabbing headline, this shows some pretty cool stuff with ZFS, using source versioning as an analogy to explain what would otherwise be quite abstract when it comes to filesystems. The only thing I knew about ZFS was the name, this helped me see some of its impressive features. Of course, I'll take reliability & stability over fancy features any day, but I'm glad there's active development in this area, and look forward to seeing these features mature. They could contribute to some interesting simplifications.
- protomyth 10y ago> I'll take reliability & stability over fancy features any day That is why people use ZFS and OpenZFS, they are battle tested and very mature.
- cthalupa 10y ago>Of course, I'll take reliability & stability over fancy features any day, but I'm glad there's active development in this area, and look forward to seeing these features mature. They could contribute to some interesting simplifications. ZFS is in use in production systems all over the world, with a very good reputation for reliability and stability. Nexenta and others have made successful businesses working with large enterprise customers selling ZFS based storage solutions.
- QuantumRoar 10y agoThis article gave me some confidence in finally trying to boot Arch Linux on ZFS. This will either make my life very easy or very hard.
- parenthephobia 10y agoTo play devil's advocate, sometimes Git is abused to store things that aren't code, and ZFS (or similar) might actually be a better fit in those situations. Somebody further down mentions art assets. Also potentially relevant are document repositories. ZFS isn't very easy to use for a lay person, but that's really only a "Time Machine"-esque front-end away.
- chmike 10y agoHow production ready is ZFS on Ubuntu (Debian?) ? Is there any risk of Oracle fighting back open source zfs as for Java with Google and Android ?
- vesinisa 10y agoZFS is actually one of those features that are officially supported on Ubuntu but not on Debian. As far as I know, Ubuntu 16.04 is the first popular Linux OS to support ZFS out of the box.[1] As the article notes, ZFS on Linux has been production-ready and stable for over three years. For in-depth info see [2]. [1] https://wiki.ubuntu.com/ZFS https://wiki.ubuntu.com/ZFS [2] https://clusterhq.com/2014/09/11/state-zfs-on-linux/ https://clusterhq.com/2014/09/11/state-zfs-on-linux/
- delonia 10y agoZFS is under the CDDL while Java is not under the CDDL. CDDL is an open-source licence just as the GPL.
- liotier 10y ago> CDDL is an open-source licence just as the GPL But incompatible with the GPL, which mostly explains the current situation of ZFS on Linux.
- hhw 10y agoIt's the GPL that's incompatible with the CDDL and not the other way around, which is an important distinction. Other than other GPL variants and BSD and MIT style licenses, the GPL has restrictions which make it pretty much incompatible with everything.
- belorn 10y agoI don't get how the word "incompatible" can be understood as anything other than both license has aspects which makes combining them impossible. But owell, lets see what the license text actually say: Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. The Modifications that You create or to which You contribute are governed by the terms of this License. If you distribute source code, this license means that you must use this license. You can't use some other license, as its not compatible with the distributor deciding what license to use. CDDL license require that any source code distribution use CDDL as its license, and it is incompatible with any other license that has similar condition. CDDL is incompatible with GPL because GPL has similar conditions as CDDL. If we were to make an identical copy of the CDDL license and call it CDDLv2, those two identical twins would be incompatible with each other. Software under CDDLv1 would not be permitted to be combined with software under CDDLv2 and distributed as source code.
- Wonnk13 10y agoAre there any beginner resources for learning about file systems? Would be smart / harmful to reformat my whole macbook ssd to ZFS?
- pmarreck 10y agoI don't think you can use ZFS as a boot volume on Macs (and only on Linux with caveats).
- ryao 10y agoXNU hard codes HFS+ as the rootfs, but people have managed to make Mac OS X boot using a ZFS zvols to store a HFS+ rootfs. Unfortunately, there are no guides for that at this time.
- cmurf 10y agoThe limiting factor is the bootloader. Mac firmware can read HFS+ natively, find the bootloader, which in turn recognizes HFSX, Apple RAID, and Apple Core Storage. I doubt any of the previous ZFS support exists in the current bootloader. Unlike linux where there's a separate /boot, OS X doesn't really separate boot from root file systems. So how you'd boot XNU from HFS+ and transition to a separate ZFS root fs isn't obvious to me from the existing documentation.
- badmadrad 10y agoWeird title as Git and ZFS are used for completely different reasons but I love ZFS as well and the article highlighted some of the finer details which was great.
- rlpb 10y agoBranches and tags are just snapshots and clones? This actually looks more like Subversion than git, together with the challenges with managing merges that this model brings.
- delonia 10y agoUbuntu 16.04 comes with ZFS preinstalled and ready to use. Well, you need to install the user package 'zfsutils-linux' and you are ready to go. The kernel modules for ZFS are already in the default kernel and are loaded automatically when you create a volume.
- mnd999 10y agoStrange he doesn't mention FreeBSD's ZFS implementation.
- mnd999 10y agoStrange there's no mention of FreeBSD's excellent ZFS implementation
- veidr 10y agoYes, and the article casually implies that ZFS totally works not only on Linux but also on OS X[1], which is... a stretch. I check on it every year or so, but my impression is that ZFS on Mac is still so far behind where ZFS is on FreeBSD and (more recently) Linux, that it isn't really clear whether ZFS will ever work reasonably on the Mac. (I would love to hear experiences of people actually using it on OS X, though! I may be out of date.) [1]: https://openzfsonosx.org https://openzfsonosx.org
- devonkim 10y agoI've been working with virtual machines in production and development for well over a decade now and a lot of what works via ZFS in this article works very similarly to how it would work we used AWS or VMware style snapshots. In fact, ZFS snapshots are only so helpful if you make complicated changes across multiple ZFS volumes, for example, that require some more transactional style rollbacks. In such scenarios, it may be easier to just perform an instance-level rollback. One problem that didn't really occur to me before I became more ops-side was that administrators would want to heavily restrict / remove users' (read: developers and even other sysadmins) abilities to create snapshots in the first place. Why would you remove self-service temporary backups and avoid a lot of backup restoration requests? I didn't realize that other engineers could be careless and keep dozens or even hundreds of snapshots over time that gobble up expensive storage resources (SANs are not cheap regardless of manufacturer) and slow down I/O transactions over time. That was why so many of my customers deploying stuff like VMware Lab Manager and vCloud Director demanded the ability to remove access to snapshot features. As a result of the typical usage where user abuse of a very powerful feature threw things for a loop, the typical organizational structure and siloization of these environments means that nowadays SAN-side LUN snapshots are used more often than from the VM layer (the same administrators that manage VMware environments typically have rights to the SANs). Using ZFS like this is a developer-side reaction to me, but duplication of trying to solve the same problem when technical solutions have existed and are viable is exasperating.
- drvdevd 10y agoActually, perhaps this doesn't address all your points, but I share the sentiment about VM snapshots "feeling" quite similar, in fact I experience it every day as I run ZFS as a root filesystem within VMware. The real gain for me is that all of these tools are in-band with my working OS. If I were provided a VM(s) on AWS or some SAN by my employer, that could in theory give us a mutual benefit. Ops could avoid giving me access via IAM or whatever and expanding beyond some set limit, but allow me to perform almost identictal "ops like" tasks using ZFS (which I also find to be fairly user friendly). Incidentally, I'm also a fan of nested virtualization and using git on top of ZFS... I believe all of these tools complement each other nicely as opposed to being mere repetitions.
- 10y ago
- pmarreck 10y agoAnyone here think that a "ZFS in the cloud" that anyone could inexpensively export a ZFS snapshot (or volume) to would potentially be a business model (offsite backups, etc.)?
- bechampion 10y agoWell.. I get the funny side of the comparison , they're two different things..
- zippergz 10y agoI have a FreeBSD server in my home office that has a big ZFS raidz volume that I use for shared file storage, and it's really, really awesome. The snapshots are especially great because they greatly reduce the fear of screwing something up. I once wanted to run a de-dupe script on several hundred gigabytes of photos, but I was afraid it would go awry, so I snapshotted first, knowing I could roll back in a few keystrokes. (Granted, this wouldn't help much if the script had caused some problem that wasn't immediately apparent. And yes, I have backups of all of that stuff elsewhere, but doing a restore from backup is a lot more work than rolling back a snapshot.)
- egwynn 10y agoThree year old article teaches slightly outdated techniques and basic ZFS usage on linux by way of specious comparisons to GIT. I guess it wasn’t a half bad resource when it came out, but these days there’s got to be better blog posts about this, right? EDIT: Not that I’m bitter; I love zfs. I mainly wonder how something so old ended up here.
- somebehemoth 10y agoI very much appreciated this article and shared it with coworkers who also found it helpful. I can understand the desire to only read the latest news, but I've learned a lot of stuff in my life that was useful but only new to me. The key benefit to this article was the comparison of ZFS to something I am familiar with: Git. My wild guess is that other non-filesystem geeks like me liked this article for similar reasons and upvoted despite its age. Edit: Perhaps the ZFS to Git comparison is itself novel? I would like to read about other filesystem features (any file system) from this perspective because I think I would learn a lot.
- espadrine 10y ago> Notably missing is support for merging, which ZFS does not have direct support for as far as I'm aware. That insight is critical, especially now that we are heading towards Dropbox Infinite, IPFS, Ceph and so many other non-centralized file systems. Syncing is not a solved problem at all yet. Advances can bring the same revolution as 3-way merging did to SCMs, previously dominated by file-locking mechanisms.
- linsomniac 10y agoWhat was that replicated filesystem back in the 90s that promised to be the next NFS, but with disconnected operation and merging when you came back online? Coda, that's right. I had such high hopes for it in my move to using a laptop as my primary machine, but never got it working despite several attempts at it. Admittedly they weren't more than a couple hours at a given time...
- lazyant 10y agoI've been reading that ZFS was "almost ready for use" in Linux for years, how stable is it for production now, anybody here using it, any good/bad comments or tips? (using CentOS 7 at the moment)
- ElijahLynn 10y agoTo give you an idea, it just shipped baked into Ubuntu 16.04, the latest Long Term Support (LTS) version. https://insights.ubuntu.com/2016/02/16/zfs-is-the-fs-for-containers-in-ubuntu-16-04/ https://insights.ubuntu.com/2016/02/16/zfs-is-the-fs-for-con...
- linsomniac 10y agoI'm tempted to write an article: Who Needs ZFS When You Got Git, but the title IS the article. Don't get me wrong, I looove ZFS, and from a quick scan this article looks like a good intro to ZFS, particularly for someone familiar with git.
- kennywinker 10y agoAuthor is not actually suggesting replacing your version control with ZFS. From the first paragraph: > Of course, I'm not seriously suggesting you'd ditch a "proper" version control system, but it gives a good sense of what's possible at the file system level.
- jaredklewis 10y agoI like how he uses of course . "Of course," the title of this article is misleading. The article is about something different, but this was the most clicky baity combination of words including "git" and "zfs."
- kennywinker 10y agoClickbait? Yes. Interesting article? also yes. The problem with clickbait is it's often used to bait you into reading BAD content or content irrelevant to your interests. Clickbait + good/related content is just clever marketing.
- mikestew 10y agoSo the title is click-bait, then? I almost read the article, but in the 342 milliseconds between thinking that and reaching for the mouse, I came up with three reasons the topic alluded to in the title would be a dumb idea. And it turns out that's not what the article is about anyway.
- kennywinker 10y agoGood work, you avoided learning a thing! :hooray emoji:
- CommanderNyx 10y agoZFS is very powerful indeed; I've been using ZFS to share a data partition between OS X and Ubuntu. The versioning capabilities the OP mentions has a lot of potential.
- Ericson2314 10y agoAn important difference is that While both rely on Merkel DAGs git uses content addressing while ZFS doesn't (physical addresses impact hash too). Relatedly, ZFS's memory management relies on the assumption that a forked filesystem and its sibling will monotonically alias less data as either is modified. This allows it to avoid tracing and ref-counting alike, but makes implementing merging or `cp --reflink` difficult.
- erikb 10y ago> Notably missing is support for merging, which ZFS does not have direct support for as far as I'm aware. So, no replacement. Merge and Branch are the major features of git. The bigger the project the bigger the need for these. I know some projects where people work full time as merge conflict resolvers. Without git that would require a whole team instead of a person.
- ChristianGeek 10y ago"Of course, I'm not seriously suggesting you'd ditch a 'proper' version control system, but it gives a good sense of what's possible at the file system level."
- erikb 10y agoThat's what the title says in big letters at the top though.
- urubujj 10y agofull time?? wow
- firethief 10y agoZFS could not be a replacement for all of git, but (if you wanted to) you could use it to replace git's storage layer, which is basically independent of operations like merge. I.e. you can git-merge ZFS subvolumes (without any actual git repos) with recursive git-merge-file.
- jaz46 10y agoThis blog post was one of the most inspirational pieces that led us to founding Pachyderm (pachyderm.io). We offer git-like semantics for data, including branches, and in a distributed system so it scales to petabytes.
- cyphar 10y agoI personally feel that we should all hop off the ZFS (on Linux) hype train and consider a few points. Currently ZoL is being developed by two people, and it works by creating a translation layer into the Linux kernel API. The bug list is enormous (much bigger than btrfs), and there isn't enough experience with the codebase by Linux kernel developers. That's ignoring the potential legal issues. No other ZFS port has these problems. On the other hand, if you want a supported filesystem with many of the same features as ZFS, there's btrfs. It alleviates all of the problems with the ZoL port. And there's no fear of Oracle lawsuits.
- ryao 10y agoThere are far more than 2 people here: https://github.com/zfsonlinux/zfs/commits/master https://github.com/zfsonlinux/zfs/commits/master I will admit that my contribution activity has been low as of late, but it will pick up again soon. As for the bug list, that is because basically all distribution problems get sent there and duplicates are not closed until it is proven that they are duplicates. There is no such transparency with other filesystems' bug tracking. Redhat receives plenty of bug reports through Fedora that they happily close if not solved by EOL. As for btrfs, one of the btrfs developers claimed that ZFS has 5 times the development resources of btrfs: https://news.ycombinator.com/item?id=11749477 https://news.ycombinator.com/item?id=11749477 As for lawsuit fears, the fact is that using any software at all puts you at risk of a lawsuit. Whether or not the plaintiff has a legitimate case is a separate matter. However, if we consider the prospect of Oracle having a case against those using btrfs or ZFS, btrfs would be at higher risk. The CDDL provides an implicit patent grant while the GPLv2 does not. Any ZFS patents that are applicable to btrfs that Oracle accquired from Sun could be used against those using btrfs. The repercussions for Oracle would be huge, but if we are discussing about the potential for legal issues with Oracle, then btrfs is at the greatest risk. From what I know of the internals of the two, btrfs has far more problems. This shows some of the problems on an enterprise distribution: https://news.ycombinator.com/item?id=11749010 https://news.ycombinator.com/item?id=11749010 The idea that performance can be so horrible that the system might as well have deadlocked is a severe problem. The ENOSPC issues from internal fragmentation is another severe problem. Then there is the lack of backports. I could continue, but I see no need.