This video was released early for my supporters! patreon.com/thelinuxcast and ko-fi.com/thelinuxcast
@vladimir_fomin90 Жыл бұрын
in Linux Mint btrfs is configured out of the box!
@thesaigoneer Жыл бұрын
One additional note: Siduction and Garuda also use Snapper/btrfs ootb. Great vid, thanks Matt!
@Randy1-2-39 ай бұрын
Garuda user here, btrfs really causes more problems than it is worth. I don't think the development team have ever had a handle on it....more of a quirk in their minds.... something to look modern and flash.
@docleo63 Жыл бұрын
Your explanation is very clear. I can't wait for your tutorial on Arch with BTRFS. Keep the good work!
@pinchtwo654 Жыл бұрын
I’ve only ever used ext3 and ext4 and I’ve been curious about btrfs. This was really informative for me. Appreciate it
@morpheon_xyz Жыл бұрын
Only used ext4 on my Linux systems, so defs has been informative for me too
@cannaroe12135 ай бұрын
i really like the car insurance analogy, because in some ways having car insurance is like having a backup car, but you also know sometimes the insurance company doesn't pay out hahah
@timfd.w.4163 Жыл бұрын
Very nice video. Allow me just one tiny comment... About backups regarding alleged unstability I will add that EVERY system needs backups no matter the file system is stable.
@TheLinuxCast Жыл бұрын
Truth
@nunyobiznez875 Жыл бұрын
I have had an unrecoverable disaster from BTRFS before. All I can say, is NEVER use the so-called repair utility. Whatever the problem, it will make it worse (though presumably it will be finished and work right someday). Use the scrub tool instead first, which will actually fix most common issues. In my case, it was a checksum mismatch after a crash, which should have been a minor problem, that could have been easily repaired by the scrub tool, had I known before hand. The repair tool just deleted the file and left the bad checksum, so the error could never be resolved, and with a fs error, BTRFS will only boot read-only. But, I live and learn, and despite this experience, I still use BTRFS for my root system.
@Neumah Жыл бұрын
BTRFS and snapper are part of why my experience with OpenSUSE Tumbleweed has been the greatest Linux experience I've ever had. I had one update bork my system and another time I borked it. Both times rolling back was a breeze, even the first time I ever did it it was easy. Had it been any of my previous distros I would have had to reinstall the OS due to lack of knowledge about how to fix it. I'm thoroughly on the Tumbleweed shill train.
@bstar777777 Жыл бұрын
Every modern Linux install should have this capability using BTRFS or not.
@tambuchalinux Жыл бұрын
I think that will be more common in later distros. I noticed the latest Manjaro had it preinstalled when I tried it out with btrfs filesystem. I actually didn't notice it in the grub menu until I manually edited it for tidyness..lol.
@gassug2 Жыл бұрын
btrfs isn't exclusive to tumbleweed. you can use btrfs on any distro that supports it, most of which these days will. i'm not saying tumbleweed is bad, i'm just saying it's odd that you hold tumbleweed in high regard for what is ultimately a btrfs feature and not a tumbleweed one. openSUSE just defaults to btrfs as the filesystem.
@Neumah Жыл бұрын
@@gassug2 If you read carefully you'll see that I said "part of" why Tumbleweed is so great. It's far from the one and only reason. Also, currently (or at least when I installed Tumbleweed) BTRFS doesn't come setup with Snapper properly out of the box on every distro that supports it. I've only heard of very few. And it being correctly setup out of the box is part of why it's great. Rollbacks are immediately available.
@advaitc2554 Жыл бұрын
You did a great job explaining. Thx! 😊 I'm eager to watch any and all videos you make about Btrfs and related topics.
@cenewton3221 Жыл бұрын
I've been using BTRFS w/ Snapper on my Garuda Dragonized/Hyprland daily driver for the past 6 weeks or so. Haven't HAD to use it yet but did test it out once & it worked perfectly. Using Vorta/Borg for my traditional backups. Good job on the video Matt, it's not an easy thing to explain in non-techie terms but you did it well. I've also never had any problem with BTRFS. One last thing though is Snapper/Snapper-Tools & Timeshift are in conflict with each other and you can only use one or the other. Garuda installs Snapper/Snapper-tools automatically when BTRFS has been chosen as the file system on initial install.
@Alex_whatever Жыл бұрын
Thank you for this! I hope you are able to go through with the mentioned tutorial videos! It can be quite daunting to understand how to properly set things up so you can take advantage of the snapshot feature.
@nietscherarek Жыл бұрын
Compression is also a killer feature.
@qball8up1968 Жыл бұрын
This was a crystal clear explanation of BTRFS. Very well done Matt.
@cejannuzi Жыл бұрын
Excellent video as an overview and introduction to BTRFS. Thank you.
@fumanchez Жыл бұрын
Recently changed /home partition to btrfs with the compress=zstd:1 mount option, mainly to reduce the size of flatpak's .var directory, and it saves ~30% of the total space. And with compression you're mostly limited by compression speed - the speed of decompression is almost the same at all levels, so it might be worth using a higher compression level. Also take a look at how the openSUSE or Arch Linux installers (not based at Calamares) splits the root partition into subvolumes (if you want to use btfrs for this), e.g. it disables compression for /var.
@lsatenstein Жыл бұрын
I use zstd:2 where you are using zstd:1. For some directories I went with zstd:9. My reference partitions and my backup disk.
@MH_VOID Жыл бұрын
I mount all of my BTRFS partitions with compress-force=zstd:15 and I'll never go back. So fucking worth it. Only wish BTRFS supported even higher compression levels, and that I could defrag everything to forced zstd 15... Currently my root partition as a whole has a 58% compression ratio (108G used, 187G uncompressed, 406G referenced, 100G zstd-compressed down to 21G). My home partition has a 75% total compression ratio with its zstd compressed files compressed down to 39% average. For a particularly well compressed directory, my 50GB /logs directory consisting of 5700 files is zstd-compressed down to 5%, only taking 2.5G of space. My primary external hdd partition as of 2.5 months ago (the last time I ran a full partition compsize on it) has 77% total ratio, 44% average ratio for zlib-compressed files, and a 14% average ratio for zstd compressed files, saving over 1.1 terabytes of space by the zstd compression alone.
@fumanchez Жыл бұрын
@@MH_VOID interesting, but I use compression not so much, because I'm not sure about some things yet: a) isn’t the log file completely overwritten after appending a couple of lines to it? Theoretically, btrfs may compress the entire file on its modification. b) how much does the file access time decrease and how much CPU resources does it use? Does this affect the startup time of utilities like `ls` or even `[` or `test`, which all the scripts consist of? This can also drain your laptop battery. IMHO, there is no point in compressing the root partition and system files at all, since they are read very often and do not use so much space. Also Arch's pacman keeps already compressed downloaded packages in /var/cache.
@MH_VOID Жыл бұрын
@@fumanchez > isn’t the log file completely overwritten after appending a couple of lines to it? The log file for what?? A sane program won't do this. > Theoretically, btrfs may compress the entire file on its modification. compression happens per extent (a 4KB (by default) contiguous physical chunk of storage). Each extent is 100% independent from the ones before and after it, I believe. This is how one file can have one part zstd level 9 compressed, another part lzo compressed, a third part not compressed at all, a 4th part zstd-15 compressed, and so on. If the extent is not modified, BTRFS won't change its compression unless you run a defrag on it. > how much does the file access time decrease and how much CPU resources does it use? Not enough for me to notice any problems. I just dd'd a 9.3GB log file located on my SSD (for maximum throughput) and compressed all the way down to 3% size (!) and monitored the BTRFS processes' CPU usage and the highest it ever reached was a whopping 0.2%. When you take into account that my CPU has 32 threads, that would mean about 6.4% usage of a single core in a highly demanding decompression task. Pretty damn acceptable in my book for 3300% space savings! And yeah most of the time you won't be getting savings that high, but then again most of the time you won't have a CPU cost that high either. Also keep in mind that if your hard drive read/write speeds are low, this can actually INCREASE the speed at which you read the files, as you can fetch more data at a time from the storage device. If you have a high end SSD and a bad CPU, yeah, you'll be losing out, but otherwise you are quite possibly gaining in total access time, even if time to first data availability will never be faster. > Does this affect the startup time of utilities like `ls` or even `[` or `test` I don't see why it would. The file data is compressed if possible, not its metadata. so `cat` would be slower but `ls`, `[`, `stat`, et cetera should be unaffected. > which all the scripts consist of? Which scripts? > This can also drain your laptop battery. I mean, yeah I guess the compressing and decompressing has an impact on battery life, but probably not one really all that significant, especially one significant enough to not be worth the space savings. Also keep in mind that the kernel will cache the files in memory if they're being frequently accessed, thereby making this less of an issue (For your executable question from before, I think they're often kept in memory so if you e.g. have an ls process running and then run another ls, the second ls won't access the disk at all to fetch its own data. And besides, even if it did, they're pretty small so the overhead would be rather negligible). There's also a counterpoint to be made in that less data is being physically written to storage and so some battery savings (in addition to the obvious throughput and space savings) are being had. > IMHO, there is no point in compressing the root partition and system files at all, since they are read very often and do not use so much space. Binaries actually compress extremely well. Right now, my /usr/bin directory is compressed down from 2.0G to 615M. In fact, only 8.9 megabytes across all those executables (and /usr/bin/ is symlinked to /bin and /sbin, so it's really pretty much all of them besides Rust programs I have in a separate directory) were deemed incompressible by compress-force=zstd:15, and so I have 332% space savings there for like no effort. See my previous point about caching too. Also, it's really nice for preventing random log files from filling up your entire hard drive because of some error their program had, causing other programs to fail with ENOSPC - even if you catch it quickly, it's still a pain. You don't really even need to rotate log files anymore, as they're compressed already to a similar extent. And as I said, in my personal case, > Also Arch's pacman keeps already compressed downloaded packages in /var/cache. So those files are deemed incompressible and are exactly the same as if you never enabled compression in the first place. There is 0 loss besides the minor one time cost of BTRFS trying to compress it when you first download them. Oh and as a final point, if you really don't want to deal with any significant additional latency, don't use a high level of zstd and instead use either a low level (1-3 I think) of it or use lzo, where these are made to be realtime. And also then don't mount with compress-force (which will always try to compress every single extent), and mount with just compress (which will try to compress the beginning of the file, then if it can't do so, just write the entire file as-is without compression). I personally would never do that, but you might find it useful, and there's really pretty much absolutely 0 downsides doing that as opposed to having no transparent compression whatsoever. I hope this helps
@aelhamamy Жыл бұрын
Fedora needs some steps during installation to make sure its BTRFS system will work with timeshift, but after setup, it works like a breeze and gave me a great peace of mind. I believe it also needs root access to be enabled for recovering snapshots.
@georgehope547711 ай бұрын
Oh great explanation. Going to have to look further into this.
@CotyTernes Жыл бұрын
I could be wrong, but from what I remember it was nicknamed "butter FS" was that it was supposed to be both "better" and faster/smoother, kinda like butter. So I heard a lot of "Better FS" and "Butter FS" when I was playing around with Linux a decade ago.
@CotyTernes Жыл бұрын
I should add that I was trying BTRFS out back then in the 2012-2014 area, and always had problems at that time. I was way more inexperienced with Linux back then. In the past 3 years every Linux computer I have set up I have used BTRFS and have had no issues with it. My Manjaro primary system has had it for almost 3 years on a single install (longest Linux install I've ever had) and still runs great!
@CotyTernes Жыл бұрын
@@binladen-ci7jm I very clearly said it was a nickname, not the actual name.
@CotyTernes Жыл бұрын
@@binladen-ci7jm This is just arguing semantics. They are nicknames, as people, whether through a misnomer or not, call it that. The name they call it is not the official established named, therefor it is a nickname.
@rodrigo.55 Жыл бұрын
@@binladen-ci7jmhave you ever heard of neologism? vernacular dialect? they would be considered misnomers but is not ugly, people just like to use it even being "wrong" and all.
@rodrigo.55 Жыл бұрын
doesn't matter if it is "wrong"... if it sticks, it sticks. And I've to say, butterfs is much cooler.
@John7No Жыл бұрын
Nice video, just a suggestion, maybe some visual elements as you were going through different things might be useful for newcomers. As far as a tutorial for btrfs that would be interesting, don't really care which distro you choose, although as a fellow opensuse fan I would like to see some inputs if opensuse does it differently than Arc. eg. if restoring on Arch is done by xyz , then a "flyby" short for opensuse would be nice. it would act as a comparison as well for people to see how far or close are 2 distros for the same concept.
@sentakuhm6519 Жыл бұрын
great video thank you very much, waiting for your tutorial about BTRFS.
@arska-pelejavlogejajaautoj5030 Жыл бұрын
Btrfs tutorial for Arch would be much appreciated.
@gavrilloprincep Жыл бұрын
Thanks -- that was a very clear explanation and run through the issues you need to know about.
@lqlarry Жыл бұрын
👍 I wold love to see the Arch video, and I would also love to see what you have done in openSUSE with BTRFS. Thanks for the videos.
@bjbboy71697 Жыл бұрын
Been using btrfs for about 8 years now on Gentoo and I absolutely cannot go back to a file system that doesn't have snapshots. It's saved my bacon many a time and just makes using your computer way easier. I've even used snapshots to try out a desktop environment and then if i don't like it, i can just go back to my old snapshot like nothing ever happened. And i can't tell you how many times I've accidentally deleted a file i didn't mean to. Well, with btrfs I can just go into my latest snapshot and just cp that one file back over. Or say I just did a bunch of configuration changes and then I'm like aw shit I've made all these changes, but it's not working and i want to see what the defaults were again. Well i can just open up the old version of the file and have it next to my working copy and compare the changes i made. It's just beautiful!
@BiserAngelov1 Жыл бұрын
I would like to thank the Garuda Linux, that made me appreciate the benefits of BtrFS, by forcing me to use it out of the box. It already saved my skin on two separate occasions.
@esseindividuo Жыл бұрын
i got issues with btrfs caused by bad ram years ago, before i pinpoint the ram problem, the more i used the tools to fix corrupt data on btrfs more data got corrupted. didn't lost all files, just some files at random from the corrupted trees. i suggest that backups are made in different/maturer file systems.
@mjblcmichael Жыл бұрын
That's the main reason I don't use BTRFS. I've heard similar stories as yours. I just stick with Ext4. It's never failed me yet. And I just use timeshift.
@chairman67 Жыл бұрын
me too..
@mariojpalomares2514 Жыл бұрын
Linux mint distro is built for btrfs as it comes with timeshift included. Been using btrfs for 3 years on mint but never once have i touched timeshift tool even though it comes ready to use. But after watching this video, I will start using timeshift. Very informative. Also Linux mint takes care of the subvol for you when selecting btrfs. It set to add subvol by default in linux mint (maybe even ubuntu too). After 3 years not a single issue. It is stable even with kernel 6.2. Btrfs also performs better than ext4. Did some real world benchmark tests. This is why btrfs has been my default since then. In my experience i never once had a performance issue based on these claims. I have put this filesystem through its paces in a way that NTFS, ext4 got corrupted but btrfs is a champion.
@Tzalim Жыл бұрын
Garuda (Arch) Linux does BTRFS out of the box by default... You don't have to even touch it if you don't want to. It's the best file system in my opinion.
@ssdemon96 Жыл бұрын
I use btrfs for my main drive and my secondary nvme ssd is using ext4 and is used just for games. I love the ability to rollback to a previous snapshot... currently running vanilla os and the btrfs setup is amazing.
@Rockpat5 ай бұрын
Btrfs on Debian Testing (kinda Rolling Release Debian) is a Blessing. It saved my system after a weird Nvidia driver update breakage. (Upgrade from 525.xx to 535.xx) I think even Debian Stable Users should use Btrfs especially when they thinker with there system. Thanks for making the "not a tutorial" explanation Video about Btrfs.
@abdelmoneimelshafei657011 ай бұрын
Great video , I want that tutorial about arch, and thanks for the video
@electric748710 ай бұрын
27:45 Yes! I would LOVE to see you do a tutorial on how to set up BTRFS, at least on Arch and Ubuntu.
@whydoyouaskdude Жыл бұрын
For backups I use snap-sync to integrate snapshots on other drives with snapper, highly recommend.
@Derpingtonshere Жыл бұрын
*Writes note on forehead* Snapshots are backups. Okay got it.
@Merlin64-nb1tj5 ай бұрын
Best explanation I ever heard of BTRFS. 👍
@afroceltduck Жыл бұрын
My big problem with BTRFS was how darn difficult it is to figure out how much data is stored where. It's not like EXT4, where you just run df -h and get a nice list of how much data is in each folder.
@Ghfvhvfg Жыл бұрын
Understanding apfs is also dificult to its Feature Wise its similar to btrfs its just Apples Version of it......
@MH_VOID Жыл бұрын
Yeah, that's kinda the biggest downside of it. compsize is damn useful for that purpose though
@MarkusHobelsberger Жыл бұрын
Subvolumes are actually a little like folders that contain hardlinks to all its files. You can have a look at them if you mount subvolid=5. 5 is usually the "parent" subvolume of a Btrfs file system.
@ferd943811 ай бұрын
Thank you very much for the effort of making this vid! It's very useful.
@bstar777777 Жыл бұрын
BTRFS is pretty much required with Arch. I used it as a get out of jail card many times. Since switching to NixOS, snapshots are supported out of the box with any file system, so I prefer EXT4 again as I get a quite large bump in performance.
@MarioinRmd Жыл бұрын
I got a short and cursory introduction to the BTRFS file system when I installed Garuda. Snapper was installed and activated out of the box. (Nice distro, BTW with a ton of features, but a little too much bling for me.) I mainly use Linux Mint and I trust those guys not to bork my machine. I have an ancillary drive with all of my important data, and I did take one snap shot with Time Shift shortly after I installed. If things go completely to poop, I look at it as an opportunity to switch distributions. Haha.
@alexsturm1799 Жыл бұрын
Your explanations were good. Thank you.
@TActually Жыл бұрын
I love the idea of btrfs and snapshots, but since the performance of btrfs is still less than ext4, I'll just stick with rsync/timeshift, for now. Also.. YES, the setup for btrfs to be useful can be painful. Fedora doesn't set it up, at all, OOB. Apparently OpenSuse(according to you), Ubuntu(from experience) and Garuda(from experience) take care of just about everything for you.
@grxgghxrpxr Жыл бұрын
It's kind of annoying how Fedora doesn't just call it @, instead they call the Root subvolume 'root', but it takes a couple of minutes to create a snapshot called '@' and change it in /etc/fstab.
@lsatenstein Жыл бұрын
If you had to copy a terrabyte of files to a terrabyte SSD, what do you think the difference between ext4 and BTRFS would be? Assume the latter is setup with zlib:2 compression. I bet it might be under 20 seconds in favour of ext4. But while the ext4 disk would be full, there would likely be one or two gigabytes available for the BTRFS disk.
@TActually Жыл бұрын
@lsatenstein I don't use compression but, I get your point. You're saying the performance difference is negligible. The other kicker is that btrfs shortens the lifespan of your ssd, significantly and to store the backups on an alternate drive(for redundancy) you'd have to transfer the data the old-school way anyways. I think btrfs can be good for a lot of applications... it also is not the right choice for a lot of applications. Ext4 works for everything and doesn't require a ton of thought/setup/tooling.
@lsatenstein Жыл бұрын
@@TActually I am on my system 8 hrs per day, 5.5 days per week. At least twice a week I load up two Fedora beta ISOs , together with my other use, amounts to 5 gigs /week, onto a 120 gig SSD. That's been going on for 6 years for that SSD. I do keep about 25gigs reserved for BTRFS pages. Every 2 weeks I run a "fstrim" and a BTRFS compress. The BTRFS runs first to mark its reserved pages free. The fstrim does likewise for the SSD technology. I make use of two crontab entries that I set to run at 8am on alternate Fridays.
@lsatenstein Жыл бұрын
@@doesnotcompute6078 you are right about the cost of external storage. My external storage is a hard disk. Here compression on my desktop system is,😍 besides using less space, reducing I/O time.
@MarkusHobelsberger Жыл бұрын
Btrfs surely is the future for Linux' default filesystem. Apart from snapshots in my opinion compression is a very neat feature, too. Especially if you combine it with snapshots on a small disk to be able to store a lot more snapshots than without compression - I run a Fedora testmachine with only a 60 GB SSD like that. BUT I also think Btrfs needs a little more time and development before I'd want to replace the trusty and super-fast ext4 (fast_commit anyone?) on my main machines and especially on my data drives where I don't want a checksum error or some kind of other hiccup take down the whole drive. Running Debian based distros, I very rarely actually need to roll back a snapshot.
@MH_VOID Жыл бұрын
I'm a heavy BTRFS user with 15 terabytes or so of BTRFS partitions. I barely ever use snapshots. Transparent compression is an absolute game-changer (saving me terabytes of space), and so are reflinks, which I heavily use to the point that my partitions usually have like 3 times the referenced data as actual data, and which basically obsolete snapshots for me. The checksumming is also damn nice, and something I'd never go without (even for databases, I'm not going to nocow them since doing so disables the checksumming). I mount all my BTRFS partitions with compress-force=zstd:15, create them with blake2 checksumming (in the past, sha256 and xxhash, but blake2 mostly combines the benefits of both with few comparative downsides), and set dup data and metadata (halving my capacity but still actually coming out ahead when you consider the space savings from compression and reflinking). I will never voluntarily go back to any filesystem that does not have at a minimum reflinking, transparent compression, and extent/block/whatever checksumming (not having data & metadata duplication is fine, since I can always just set up RAID 10 or whatever) (oh and also xattrs and birth times. if it doesn't have that I'm not interested). The most likely thing to get me to move to a different filesystem is supporting even better compression - well, that, or actually doing away with the shitty path & file name limits.
@MarkusHobelsberger Жыл бұрын
@@MH_VOID Might I ask what kind of data you're storing that you can benefit that heavily from compression? From my experience big disks like that usually are mainly occupied by media files in the private environment. For me, for example, only about 5-10% of my data is reasonably compressable.
@drrenard1277 Жыл бұрын
Yesss rolling updates. Gentoo user and btrfs has saved my behind
@nerdycatgamer Жыл бұрын
Sounds like a great way to back up my data!! :)
@SpicyPoisonАй бұрын
Those follow up videos are not yet out? I hope to see them soon. I was about to install Arch, but couldn't decide between ext4 and BTRFS.
@neusprach Жыл бұрын
Great video! Thanks for sharing!
@summerishere2868 Жыл бұрын
Btrfs is much much better at dealing with power loss than ext4. At least in my experience. Ext4 would easily fail at some point in time when doing fsck (after power loss). This reason alone is enough for me to prefer it over ext4. Also btrfs has been incredibly stable, I have been using it for almost 1 year.
@ifohancroft8 ай бұрын
Nice! Now we can play Bash Russian Roulette on our own system.
@clusterguard Жыл бұрын
EXT4 + Timeshift sounds more simple and solid to us simple mortals, man!
@Qyngali Жыл бұрын
Ihave to arrest you on the BTRFS is unstable bit, the only parts that are marked as such is RAID 5/6. There are a couple of features marked "Mostly OK",which obviously means minor. And most of those are also related to RAID. TLDR: If you run just a single disk there's nothing unstable about it. Paraphrased from the official status page. :) Edit: I'm posting link in a reply, so please move it from spam if it ends up there.
@mjblcmichael Жыл бұрын
It sucks how we can't post useful links any more. Darn bots.
@Qyngali Жыл бұрын
@@mjblcmichael yeah, I see it's gone. @TheLinuxCast if you could dig the post out of spam jail please. :)
@justinhall3243 Жыл бұрын
I switched over from Ext4 to BTRFS on SUSE years ago and the only problem I ran into was my disk labeling tool could not deal with them so I had to learn a new way to name my drive "my disorganized crap"
@DimitrisVasil Жыл бұрын
Note: You can have snapshots on non-btrfs filesystems by using timeshift with rsync + hardlinks
@BUDA20 Жыл бұрын
I started using BTRFS because I wanted to use zstd compression, It also has good drivers for windows, so is better than NTFS, to use in both systems (as a secondary drive for win)
@budthecyborg4575Ай бұрын
I feel like Btrfs would wreck havok with the SSD controllers. Your SSD will perform differently as it fills up, "Free Space" is still used for write caching, if every file leaves a metadata pointer on the SSD you'd quickly end up with the SSD controller seeing a "full drive" even if your file system says it's half empty.
@tekrocker Жыл бұрын
TIP - if you pivot your monitor or the source light, you will get rid of that horrible glare WE all have to look at!!
@freyastears Жыл бұрын
I've been using btrfs on Arch for like a couple of years and never bothered to actually set it up properly so a tutorial would be very nice
@bstar777777 Жыл бұрын
Unfortunately if you didn't setup your subvolumes properly then you will probably have to reformat. You took a sizable hit in performance vs EXT4 with no real advantages.
@freyastears Жыл бұрын
@@bstar777777 yeah probably, haven't noticed anything so far so I prob won't do anything for now lol
@MH_VOID Жыл бұрын
As a heavy BTRFS user, my last partition was created via `plz mkfs.btrfs --metadata dup --data dup --checksum blake2 --label 'reddit C&S' --verbose --verbose --verbose '/dev/sdb4' --force`. `alias plz=doas`. I mount it via `plz mount --options compress-force=zstd:15,async,datacow,datasum --label 'reddit C&S' /mnt/rdt`. Tools you should check out are duperemove (for deduping, example usage is `plz duperemove -vrdAh --dedupe-options=same --hashfile="${XDG_STATE_HOME}/duperemove/OLD__duperemove.sqlite3" -- /run/user/1000/no-atime_mb/BKP/ehdd`), and compsize (shows BTRFS file/directory {total,none,lzo,zlib,zstd} {compression ratio,disk usage,uncompressed size,referenced size}). Alias cp to `cp --reflink=auto` (or to `cp --reflink=always` if you want guaranteed reflinking but failure if it'd try reflinking something invalid (e.g. reflinking across filesystems, or on one that doesn't support it (mostly all except BTRFS, BCACHEFS, ZFS, XFS, and I think EXT4)). Personally I have it aliased to ` cp --reflink=auto --archive --verbose`). Periodically run duperemove over your BTRFS partition to free up space without data lossage (though note that it will reflink together files with intentionally-by-you identical but distinct underlying data, as obviously that's the point of it in the first place, so thereon if parts of one of those files is physically corrupted, all the copies will be corrupted as well), and scrub the filesystem every month or so (via e.g. `plz btrfs scrub start /dev/nvme0n1p2`) to detect and hopefully repair in time data corruption. Also (and this is assuming separate root, home, and other partitions) I highly recommend adding to your system update script/alias a command to snapshot your root filesystem (for mine, I appended `doas btrfs subvolume snapshot -r /mnt/defvol/_active/rootvol/ "/mnt/defvol/_snapshots/root-$(date --utc +'%Y-%m-%d--%H-%M-%S.%3N')"`), as that way if something goes wrong you can just `cp -t / /mnt/defvol/_snapshots/root-*(om[1])` or similar (Oh, you should also set it up so those root fs snapshots show up in your GRUB menu or similar so you could just boot directly into it if need be. I don't remember offhand how to do that, and I'd have to look it up with more effort than I care about to expend right now, so I won't elaborate further on this unless prompted by a genuinely interested party). That's basically it. I hope this helps you (or anyone else reading this, for that matter).
@RM-hn6ir Жыл бұрын
OpenZFS is better, especially if you have a complex set up of a lot of drives. I also like F2FS too.
@MH_VOID Жыл бұрын
I disagree, especially when doing non-RAID setups. I currently use BTRFS as my primary filesystem across 3 drives and like 6 partitions. I think bcachefs will likely be better than BTRFS though. I've never heard of F2FS, but looking it up briefly it looks interesting, though those are some godawful size limits it has (4TB max file size? I've gotten pretty close to that already. Same thing with the maximum of a 16TB large volume). Why do you state OpenZFS is better? AFAIK, it doesn't even have reflinks!
@tkenben Жыл бұрын
So, I watch the benchmarks DJ Ware does all the time and btrfs performs so bad on I/O tests compared to anything else, it's laughable, sometimes as low as half the speed of the competition. He'll often say off handedly when commenting on the benchmarks as they scroll by, "and then of course btrfs is last", as if this is just a given and common knowledge. Like with anything, I suppose that's the price you pay. Redundancy, safety, and security is not cheap.
@revazinikolashvili637 Жыл бұрын
Fedora does nothing for btrfs snapshots. Just zstd compression, that's all they provide.
@MarkusHobelsberger Жыл бұрын
True. You have to install and set up snapper manually. Btrfs Assistant is another pretty useful tool.
@OcteractSG Жыл бұрын
“BetterFS” comes from the filesystem just being better than other filesystems. “ButterFS” is based on BTRFS using copy on write (COW) to enable atomic writes and snapshots. Butter comes from cows, so there you go. Both are used in everyday speech and they sound very similar to each other. Neither is wrong.
@rufine4114 Жыл бұрын
liked the background blue light btw
@chris122380 Жыл бұрын
I've started using Garuda Linux and it also uses BTRFS and Snapshots by default. I like Garuda because it's based on Arch and has been working well for me so far. I have had troubles with OpenSuse and figuring out YAST with Wi-Fi.
@NoahWatkins-p4z Жыл бұрын
Arco Calamares still offers Snapper, both are superb. I have found my home in arco i3, first Arch and tiling wm and I am very happy to have chosen the combo.
@JB525207 ай бұрын
I didn't realize it was B-Tree FS. Binary trees are a lot of fun if you like data structures.
@conceptrat Жыл бұрын
Great explanation Matt ❤
@reklistube Жыл бұрын
As an arch user I would love a tutorial on using btrfs on top of encrypted volumes with luks
@AlexanderDeWolf-v7q5 ай бұрын
Had major speed/latency issues on writes with many small files 4 years ago in RHEL 8 on lvm in a high volume production system. Had to move back to xfs. For personal use btrfs works well.
@tambuchalinux Жыл бұрын
Garuda has snapper, btrfs and grub snapshots out of the box. Although Garuda is great, I deleted in favour of CachyOS but I had to set it up manually with CachyOS. I wouldn't call it unstable either.
@Destide Жыл бұрын
Why wouldn't you got opensuse at that point?
@tambuchalinux Жыл бұрын
@@Destide I did try OpenSUSE. Zypper commands are unfamiliar..so are the package names. That package manager is also quite slow. I like CachyOS better. And I have snapper with btrfs-assistant enabled, so I can always revert back to an older snapshot if a new update breaks it.
@bertnijhof5413 Жыл бұрын
BTRFS is not the best Linux file system, it still had problems with reliability in the more complex configuration and the performance is not very good. BTRFS did steal its ideas from Sun's ZFS. The best Linux File System is OpenZFS and that is, why it is used in the professional Linux products like e.g. Proxmox etc.
@Qyngali Жыл бұрын
I disagree, the only problematic thing now is RAID 5/6. I've ran it for what... 7, 8 years or something now, in both single disk, RAID 0 and RAID 1, no problems at all. For a while we had frequent power brown outs here and I had 0 issues Sure OpenZFS is great! But, it being outside of kernel is a pain sometimes. Depends on the distro I guess... But if you're going to go multi disk RAID, ZFS is king right now. But OpenZFS and BTRFS is similar in performance overall when the disk layout is the same. CoW file systems versus regular ones like XFS and EXT4? Data safety vs speed. Being safe cost performance, just like any other security features. Disable Meltdown et al mitigations, be less secure but faster.
@johnh6524 Жыл бұрын
Mmmm, I've been using BTRFS for 8 years, and it's been good. My understanding is that BTRFS is stable unless you use it to create a RAID 5,6, in which case you probably need to use your backup. BTRFS also makes RAID systems easy to set up RAID 1, 10, etc. My experience with RAIDs (1 and 10) is positive. Just another thought: it will be slow if you create too many snapshots.
@chrisMuc1966 Жыл бұрын
01:32 Maybe because it is the daily bread and butter for many Linux users?
@Sqwert-g6h Жыл бұрын
Please do a tutorial for btrfs on Arch. That is an excellent idea.
@taukakao11 ай бұрын
This is missing why snapshots aren't backups: The data on the drive still only exist one time, so if the data on the drive corrupts, all files that point to that data will be corrupted. Rolling back to a snapshot won't help.
@classicrockonly Жыл бұрын
I use ZFS btw. I stopped trusting btrfs. I personally have not had issues using btrfs, but I saw a friend's computer spectacularly explode numerous times with him trying to use it. And I've known others who have had recent horror stories. And also, 16 years of development later and they still have all these issues? Doesn't inspire much confidence in me in the quality of the code
@Flackon Жыл бұрын
I decided to try btrfs on Arch because I got sold on its features, but I’ve been having performance issues all the time. The system basically freezes when copying large files. I hope there’s some config tweak that I’m missing or something because if its gonna be like this I’m unlikely to use it ever again
@jhakonen Жыл бұрын
I had freezes in Fedora as well with btrfs. I was able to fix those by using noatime in the disk's mount options. There's a note on that in btrfs's manual.
@breadmoth6443 Жыл бұрын
BTRFS is trying to be what ZFS is, sure you have OpenZFS for Linux, but Linus has no plans to include that into the kernel. When are people going to look at filesystems for NAND/NVMe drives? the ext*, XFS, JFS, BTRFS is all well and good but those filesystems are made for conventional disks in mind. I don't know of any distro that has JFFS2 as an option. Slackware AFAIK is the only distro that allows you to install on a F2FS filesystem which is made from the ground up for such devices - granted you can't boot off of it you need a regular ext* filesystem, but i guess it is better than nothing. My point stands though, considering more and more users are now using SSD or NVMe drives, it is time more distros look at F2FS or JFFS2 , though that seems to be the only filesystems available for Linux.
@breadmoth6443 Жыл бұрын
@@Watcher4361 i guess this is the one time BSD is better, you can mix-and-match different licenses afaik , it has actual ZFS and not a re-implementation of ZFS
@Qyngali Жыл бұрын
@@breadmoth6443At leastFreeBSD uses OpenZFS now.They migrated a couple years ago IIRC. Dunno about the other BSD variants.
@jttech44 Жыл бұрын
BTRFS works great out of the box with Manjaro, and the AUR auto-snap and btrfs-grub-tools all work great. No issues with it so far. Manjaro itself has done some odd things occasionally, but, at very least they're good about fixing it, and, I don't want to use linux without the AUR, complete non-starter otherwise, there is no greater collection of talent in the linux community. Also, something you didn't mention is, snaps will bail you out if you make a bad config change that prevents the system from working properly. So it's not just updates/upgrades where it's useful.
@nemogamma578 Жыл бұрын
Matt, absolutely great . Thank You. But you speak about "data". Be careful, for me and I guess not only for me as "user", datas are primarely my openoffice files, my pictures... Difficult to distinguish between "user data" and "system data" or "root data".
@wolfpoker Жыл бұрын
I didn't understand the car insurance analogy, what do you mean "If I do go out"? :P
@_Love_And_Peace Жыл бұрын
I would appteciate brtfs zfs comparison.
@Berecutecu Жыл бұрын
I was surprised to not hear a single mention of ZFS in this video actually AND in the comments
@anafabula Жыл бұрын
Btrfs also has other advantages over ext4. For example filesystem compression, reflinks and raid
@TheLinuxCast Жыл бұрын
Yeah, I know I didn't cover any of that.
@eniojurko Жыл бұрын
I run endevour on btrfs(nvme), and have hdds for data and stuff, so for those hdds is it better to go also btrfs or ext4? What would be the recommendation?
@jamesyoung151 Жыл бұрын
Garuda also uses brtfs by default as well.
@notimportant7682 Жыл бұрын
"if you had a snapshot prior to being a moron," I don't think my snapshots can go back that far
@leapbtw Жыл бұрын
can you make a video about luks?
@avgGamer662 Жыл бұрын
I tried installing tumbleweed as 3rd os. I mounted already existing boot efi and swap, formated root as btrfs. But midway installation there was an error in mounting swap. I proceeded anyway. Now opensusse doesn't have swap
@RoelandJansen Жыл бұрын
And making a swap is not easy? Takes you 5 minutes including coffee.
@Burgo3618 ай бұрын
I wonder how this interacts with wear levelling on ssds, it's a cool concept
@CyperN0777 ай бұрын
Matt on snap shots. It's better to have it and not need it than to need it and not have it. More on Arch btrfs please...
@JohnCastleSmokeless18 күн бұрын
Everyone pronounces it as, 'butter-fs', but something in the back of my brain insists that it's supposed to be pronounced, _'better-fs.'_
@TheLinuxCast18 күн бұрын
It's both. It's one of those projects that has many names.
@mdd196311 ай бұрын
May very well use BtrFS for my inbound Asustor 6 bay, but, only for an initial 10TBX2 mirror, and, replicated to another 10 TB drive in my WInblows system....; I watched most of the negatives regarding Btrfs, but, did anyone address the 'RAID 5/6-DO NOT RECOMMEND!' ? This is noteworthy for folks planning on larger arrays than RAID1 or 10...
@Plyply99 Жыл бұрын
Garuda Linux has excellent BTRFs.
@georgehope547711 ай бұрын
So I could potentially recover from "rm -rf /*" right?
@TheLinuxCast11 ай бұрын
Some of it. But that would delete your home directory too which isn't a part of the snapshot.
@marcusjohansson668 Жыл бұрын
DO NOT FILL A BTRFS 100%!!! If you do, you WILL have problems. That and the raid functions can be a bit wonky is what is "unstable". Otherwise, yeah, super good file system.
@banshee1000011 ай бұрын
Sounds a lot like NTFS "System Restore" but for Linux
@WR3ND8 ай бұрын
I was able to interpret what you're saying in this video and get useful information from it. Thanks. 👍
@BoyanOrion Жыл бұрын
Not sure if I want to move to btrfs just yet.I also don't know why Oracle decided to create btrfs when they already have the mature zfs. Maybe it's licensing or other issues, i don't care but when it comes to "snapshots" i've always relied on a very simple solution. I take images of my root & boot partitions with "dd" so i can flash them back anytime i want and that's about it. I also do this rarely and on per need basis and i'd choose this over a copy-on-write solution anytime for my personal needs.
@obsoletepowercorrupts10 ай бұрын
Pay-offs and trade-offs really. The BTRFS with registered RAM is also a good way to have an array of disks (maybe 8) with extra indexing, if it is to be that then data can be repopulated where a disk is to be swapped out for a new one. The BTRFS has performance trade-offs so for some systems people prefer something else. It also depends if people want to do a bunch of the file-system's work in RAM and in what manner. So for instance, ZFS (similar in arrays of disks for BTRFS, here and there) for doing a lot of its work in RAM has the performance boost. However if RAM is to be used like a RAM-Disk, some of the Reiser File system approaches are good for performance (and then the RAM data is periodically written to a disk), and thereby differential data comparisons using cyclic polynomials are probably going to do a reasonably large amount of work on FPU (assuming CPU is the main data processor in that scenario). It would be a close call and sometimes beat EXT4. However even EXT3 _(with its performance penalties has some uses for simplicity such as its journaling)_ is easier to convert with EXT2 and that means a Linux system that will need to interact heavily with a BSD system can do so more easily). An example might be where (Super) CHROOT (jail) is used in place of a BSD-Jail when file-system privileges are all that is needed, and then that means that passthrough (like in a VM) is no longer requirement, thereby ditching the latency issues, even if the disks used end up not being so big or the EXT3 and EXT2 style slower performance is worth it so as to not have to incur penalty in performance with respect to that latency. In the scenarios whereby work is done in RAM, some people might not care about the slow performance of EXT2 and EXT3 or even if it is journaling at the moment whereby they save the state of a VM (if they are using one that is). Then there is no namespace issues for non-volatile memory in passthrough because they're not using passthrough for it anyway, just RAM. The exchange between BSD and linux thereby is probably going to be FreeBSD however, OpenBSD is sometimes used too such as if eschewing the desire for a desktop other than those rare moments when you might connect an OpenBSD rig to another OpenBSD rig (linked by a cable probably) just so both are the same and a known-quantity but you just want to do that one thing in a desktoppy way so a deciduous instance of a desktop in the OpenBSD 'client' is used for a moment to complete that task before getting rid of that desktop and going headless again. File-system usages in OpenBSD can end up meaning FAT32 gets used here and there when doing a one-off job to interact with another computer but the chances are it will be FreeBSD and then EXT2 _(thereby the conversion being easy between it and EXT3)_ linking to a linux box. Sometimes it is OpenBSD and for minimal scenarios (some reverse proxy rigs), one just can't beat it _(and you'd be remoting in by OpenSSH anyway or, for some other OS combinations converting between MIT-License PuTTYgen and OpenSSH SSH-keygen)._ It isn't just the setup security and stability combinations but the ratio between revenue for licencing solutions versus deployment solutions income. It means you have to think of what the guts of your system is to be made of _(registered RAM for instance, and how much RAM)_ and the file-system used and what it interacts with including system-calls of some other OS. NetBSD is an interesting one for embedded solutions when people will look elsewhere for their MIPS (say mipsel) support has been dropped in some Linux OS types. An upcoming reason why file-systems interacting with BSD (probably form Linux) will matter is for how, considering Linux does not understand the system calls of BSD, BSD in Jails has multiple socket listening. As an aside, a multiple BSD jails might be managed with Ansible. My comment has no hate in it and I do no harm. I am not appalled or afraid, boasting or envying or complaining... Just saying. Psalms23: Giving thanks and praise to the Lord and peace and love. Also, I'd say Matthew6.
@thedeemon Жыл бұрын
In Manjaro I have btrfs and timeshift set up out of the box and I can see snapshots being made before each update. However I've never tried using those snapshots (there was never a need so far).
@barfthebarf Жыл бұрын
Are you sure it doesn't roll off the tongue a little bit "butter"?