Just starting to learn about btrfs and considering switching.
My current thought of btrfs is that operates pretty much like git, with everything tracked, and a commit happening every 30 seconds after changes. But, my gut is telling me I must be misunderstanding, or hard drive space would get used up much faster -- so I'm wondering if it's more like git, with everything tracked, files added to the staging area every 30 second after changes, and files only being committed on snapshots.
If I don't do snapshots, can you roll back a single file to several changes ago? Or is that only kept if you do snapshots? i.e. If you run a for loop 10,000 times appending to a file with 31 second sleeps inbetween, are you going to see an ancestry tree for that file of 10,000 entries, and can you go back to each of those?
Can btrfs snapshots of root be used and thought of just like VMware/VirtualBox snapshots? Where you can shutdown in one, save its state, move to another, boot, make changes so you have a diverging snapshot branch, and move wherever along the tree you want? If so, is there a bootloader that lets you pick a snapshot tree node? (Without making grub.cfg menu entries for each snapshot.)
I label snapshot A, make changes and label it B. If I go back to snapshot A and make changes (even just by booting changing /var/log), are those changes made in a "detached" or "unlabeled" snapshot, so those changes would be invisible if going back to B? If so, what happens if I have changes in this "unlabeled" snapshot, and accidentally ask to change to another before labeling it?
When deleting a file, is there "this file is deleted" metadata written, so space is still taken by all the versions of the file? Or, does it delete all previous versions, assuming there's no snapshot still pointing to it?
If I build gcc from source, as an example, I think the build directory winds up being 5-8GB. If I build it periodically from source, I'm "chewing up" a bunch of hard drive space, right? (Even assuming delete removes everything for the file being deleted, I don't know how many files are deleted in the build process without a make clean -- whether existing object files are technically deleted or just "re-written inside" of them.)