Announcement

Collapse
No announcement yet.

Proposal for a improved software distribution using BTRFS

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Originally posted by claydoh View Post
    To continue jacking the thread, how stable is btrfs these days, in terms of potential data loss, etc?
    Clay, my anecdotal evidence is, with 3 or 4 power failures over these years while my system was running, there was no hint of a problem on the btrfs filesystem.

    As far as the level of technical challenge, if you can issue

    Code:
    mkfs.btrfs /dev/sdb /dev/sdc
    then you can make a btrfs filesystem across two hard drives, with striped data and mirrored metadata. That's how hard it is.

    https://btrfs.wiki.kernel.org/index....ltiple_Devices

    Comment


      #32
      Originally posted by claydoh View Post
      To continue jacking the thread, how stable is btrfs these days, in terms of potential data loss, etc? Is it a feasible alternative for average Joe users with average Joe systems, or is it more for professional or industrial use¿
      I would say the average Joe can use it. At it's base level, it no harder to use than EXT4 is. The really advanced features require terminal use (no GUIs yet) but if your averageJosé takes the time to read a bit (Arch and Gentoo both have detailed wiki's on btrfs) he could even use those features.

      The hardest part is the install. Most distros don't support brfs installation. Luckily, the *buntus do. They even use separate subvolumes by default; installing the OS to @ and the home to @home. If you read my post on the forum I explain how to change the default install to a specific subvolume name (I use @Kubuntu_15_04 fro example). That way I can do side-by-side installs to the same pool (btrfs filesystem). You can even convert an existing EXT4 partition to btrfs - unmounted of course. That's one of the few things you have to be unmounted to do, just about everything else except fsck can be done while mounted.

      As far as stability, dibl and myself have been using btrfs since 10.10 or so when it was introduced. AFAIK, neither of us have lost any data. Not to say it couldn't happen, but it hasn't. If you read the 'net a bit you will see warnings about the fsck tool not yet being mature. I've had a couple errors (I refer above to CRC issues) caused by a hardware problem (my sata controller has been dropping off for a few milliseconds every so often) so you can't blame the filesystem for that. Fortunately, they are working hard to make btrfs a one-stop solution. Along with backup and rollback and the other features I listed above, it has built in data recovery (last resort stuff) and they fsck tools are in heavy development mode. The filesystem itself is static (no format changes down the road) and every kernel update brings more speed and function.

      I see a couple real-world best use cases for btrfs and an average Джо:

      A single small SSD: The need for a partitioning goes away when you use btrfs. Simply create and delete subvolumes at will and mount them as though they were partitions. The real advantage here is all the free space is part of the pool so your root, home, data, spare, backup, whatever "partitions" now share the free space and take it when they grow. No advance guessing how many gig's will be need for root, etc. If you have a 2TB drive, who cares if you waste a dozen GBs or even more? You don't even notice. But with a 64GB ssd, you might regret partitioning 20GB for your install only to find yourself using only 8GB of it. He makes his on-line backups with snapshots and off-line backups (btrfs send/receive) to a USB drive to the cloud or over his network to a server.

      Several large HDDs: Managing large volumes of space can be time consuming and daunting. Let's say Józef has 3x1TB drives and wants to protect himself against drive failure (redundancy) and also have good regular backups. With btrfs you have choices and flexibility (you can change your mind). He wants some speed so he configures his entire 3TB as a single filesystem (minus a swap partition or three - btrfs can't do swap yet) in RAID0. 2.7TBs (or so), Nice! Does his backups with snapshots (takes less than a second) via a script and a cron job. He's all set. But wait - one day he realizes if a drive fails (thrice as likely if you have three) he's porked. So he removes one drive from the pool - he does this while using his computer, no unmounting necessary. Now he has a RAID0 2 drive filesystem of about 1.8GB and a single 900MB drive. Then he converts the RAID0 pool to RAID1 - again while "live". Now he has a 900MB main RAID1 filesystem (redundancy) and a second 900MB file system. RAID10 requires 4 devices, so he rewrites the script and uses the stand-alone filesystem as backup space. IMO, way easier than LVM or MDADM RAID.

      Cool right? Other possibilities are endless. RAID10 with 4 devices means you could do it with three drives - just partition them into 6 equal sized partitions and use 4 of them as RAID10 (although you lose some of the advantages of RAID10 doing this). Have drives of different sizes? Partitions are devices so I had my server with 2x1TB drives and 2x2TB drives as six 1TB partitions, four of them in RAID10 and the other two in RAID0. You can do all this with MDADM or LVM but it's much more time consuming to build and once built - you're pretty much committed.
      Last edited by oshunluvr; May 09, 2015, 06:15 AM.

      Please Read Me

      Comment


        #33
        Originally posted by oshunluvr View Post
        your averageJosé
        an average Джо
        say Józef
        Nice

        Originally posted by oshunluvr View Post
        Does his backups with snapshots (takes less than a second)
        A snapshot is not a backup -- what happens when the pointed-to data ceases, for some calamitous reason, to exist?

        Comment


          #34
          Originally posted by SteveRiley View Post
          A snapshot is not a backup -- what happens when the pointed-to data ceases, for some calamitous reason, to exist?
          Somewhat true - just like any backup - it depends on your level of need for protection. A snapshot is more protection than nothing and super quick and simple and as dibl and I have stated - we've yet to see a calamitous event at the filesystem level since 2010 using btrfs.

          It's really about tolerance for potential calamity. If your house burns down, you better have a backup elsewhere. Others might consider that if one's house burns down, you'd have larger problems than having to rebuild a spreadsheet. So therefore, different levels of need for backups exist. A snapshot will protect you from a deletion or corruption (at the userspace level), but not a device failure. A separate device backup will protect you from a hard drive failure, but not a house fire. Pictures of my kids exist in both digital format and print (some anyway) so do I make hard copies and have them in a safe deposit box or fireproof safe? No, because life would go on without those pictures.

          I suppose another factor in backups is cost of creation - both in workload and money. An automatic, free, and reasonably flawless backup system should always be chosen no matter what the value of the data - why not, right? Like Google backup of your cell phone contacts, messages, pics, even a list of what you've installed - happens without user input (time or money), all you have to do is opt in. You'd be crazy not to take it. But paying for a service that requires you to remember to use it and takes your time? Maybe you wouldn't care that much about your text messages.

          Anyway - back to the snapshot: A snapshot is a backup - albeit at a rather low level. If you need it a higher level of backup - use send/receive to another device of that same snapshot (still happens without much effort - just takes longer). If you need a still higher level - better get a cloud service.

          Please Read Me

          Comment


            #35
            All of this seems to rely on old versions of files still existing on the disk somewhere.

            I understand that if not all of the drive is in use you can delete an old file and write a new one to a different physical location on the disk without destroying the old file (just removing the "pointer" to it)... but what happens if your disk is quite full?

            At some point you will need to re-use the parts of the disk that still contain "old" or deleted files, does this break a BTRFS snapshot?
            samhobbs.co.uk

            Comment


              #36
              Disk full conditions have the same effect they always do. A full disk doesn't allow more writes to it until it's no longer full. You would have to delete some data - snapshot or otherwise - before continuing.

              I guess a direct answer to your query is: A file is not deleted (space freed) until itself and all the snapshots of it are deleted. One advantage here is subsequent snapshots of a subvolume don't re-duplicate data. In other words, six snapshots of your home don't contain six copies of a file you deleted from the original subvolume, only one copy is saved. Once the original and all the snapshots containing the file reference are deleted - the space is freed.

              I guess the difference is that with a conventional backup all the files are duplicated thus the space used is doubled. With a snapshot, while held within the same pool as the source subvolume, no additional space is used until and unless there is a change to a file(s) on the source subvolume.

              You can determine the amount of unique space a snapshot holds by enabling quota on your btrfs filesystem and running a qgroup list. The quota feature is still under development so it is not advised to leave it active all the time - only when needed.

              As Steve points out - snapshots aren't really backups in the traditional sense. At least until you send it to a different pool.

              Please Read Me

              Comment


                #37
                Originally posted by oshunluvr View Post
                It's really about tolerance for potential calamity. If your house burns down, you better have a backup elsewhere.
                Well said. And that tolerance varies greatly among individuals (and perhaps organizations). Personally, these days I don't add a lot of new data in an hour or a day or even a typical week. But there's 25 years' of research work, digitization of music and images, correspondence, and records of various kinds sitting here spinning on disks. So it's not important to get a daily or even a weekly backup under my circumstances -- the cost of recreating (or foregoing) that much new work is small. But my occasional full backups go onto one of a rotating set of 1T hdds, and off to a trusted relative's house for safekeeping in the event of disaster. I can't tolerate even the tiniest chance of a total loss, even though I can easily tolerate the chance of a small loss.

                Comment


                  #38
                  Originally posted by oshunluvr View Post
                  I guess a direct answer to your query is: A file is not deleted (space freed) until itself and all the snapshots of it are deleted. One advantage here is subsequent snapshots of a subvolume don't re-duplicate data. In other words, six snapshots of your home don't contain six copies of a file you deleted from the original subvolume, only one copy is saved. Once the original and all the snapshots containing the file reference are deleted - the space is freed.
                  Thanks, I understand now

                  BTRFS just moved up my "to do" list
                  samhobbs.co.uk

                  Comment


                    #39
                    Yeah, right? 'Cause you have nothing else to do...

                    Please Read Me

                    Comment


                      #40
                      I just discovered that the Jolla smartphone uses BTRFS. I had a feeling it might, because it seems to support a lot of new Linux things (Wayland by default, systemD etc).

                      I ordered one last week when it became clear that The Other Half Keyboard isn't just vapour-ware and will actually materialise soon, so it looks like I'll definitely be learning about BTRFS
                      samhobbs.co.uk

                      Comment


                        #41
                        I see a couple real-world best use cases for btrfs and an average Джо:

                        A single small SSD: The need for a partitioning goes away when you use btrfs. Simply create and delete subvolumes at will and mount them as though they were partitions. The real advantage here is all the free space is part of the pool so your root, home, data, spare, backup, whatever "partitions" now share the free space and take it when they grow. No advance guessing how many gig's will be need for root, etc. If you have a 2TB drive, who cares if you waste a dozen GBs or even more? You don't even notice. But with a 64GB ssd, you might regret partitioning 20GB for your install only to find yourself using only 8GB of it. He makes his on-line backups with snapshots and off-line backups (btrfs send/receive) to a USB drive to the cloud or over his network to a server.
                        Now that is useful, and for me in particular. My 64GB ssd gets a bit tight on / all the time. And an extra backup method is always useful.

                        Comment


                          #42
                          Originally posted by Feathers McGraw View Post
                          I just discovered that the Jolla smartphone uses BTRFS. I had a feeling it might, because it seems to support a lot of new Linux things (Wayland by default, systemD etc).

                          I ordered one last week when it became clear that The Other Half Keyboard isn't just vapour-ware and will actually materialise soon, so it looks like I'll definitely be learning about BTRFS
                          OK, Now I'm ticked. I can't get a Jolla phone because I live in damn America where corporations rule and consumers are sheep - and for some reason our fugin congress thinks that's OK. ANYWAY - I have a Jolla Tablet on order (Indegogo early contributor ) so at least I have that. I'm trying to convince my wife to give up her Nexus 4 so I can put Sailfish on it...

                          Please Read Me

                          Comment


                            #43
                            Originally posted by claydoh View Post
                            Now that is useful, and for me in particular. My 64GB ssd gets a bit tight on / all the time. And an extra backup method is always useful.
                            Yeah Clay - perfect use case for btrfs. Get a 64 GB thumb drive for backups and build that pool!


                            Uhhh... not the summer time swimming thing - the data-in-a-pile thing...

                            Please Read Me

                            Comment


                              #44
                              Originally posted by oshunluvr View Post
                              Yeah Clay - perfect use case for btrfs. Get a 64 GB thumb drive for backups and build that pool!


                              Uhhh... not the summer time swimming thing - the data-in-a-pile thing...
                              Oh, I need a pool. It has been steamy and hot down here in Savannah since, what, March? Been swimming in sweat the past few weeks in particular, and I had to actually put on long pants for court , first time since last winter (2014's, that is) that my calves have not seen the sun.

                              Comment


                                #45
                                Originally posted by oshunluvr View Post
                                I'm trying to convince my wife to give up her Nexus 4 so I can put Sailfish on it...
                                Sell ya mine...not using it now that I got a Galaxy Note 4.

                                Comment

                                Working...
                                X