ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Linux: BtrFS

    IT Discussion
    linux btrfs filesystems filesystem sam linux administration raid lvm logical volume managers
    4
    54
    7.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Emad RE
      Emad R @scottalanmiller
      last edited by Emad R

      @scottalanmiller said in Linux: BtrFS:

      vanced features are planned, but are not yet available. Key among these are parity RAID features including RAID 5 and 6, but also potentially the first implementations of RAID 5.4, 5.5 and 5.6 and the only other RAID 5.3 (aka RAID 7) implementation outside of ZFS. Object based mirrored RAID, inline deduplication and encryption are also planned for the near future.

      I hear alot lately more about those filesystems, but as far as I recall ZFS requires alot of RAM as it the same with BTRFS? and is this only when you need to configure RAID with it?

      I head alot of people like them for the ability to snapshot, and self healing, I understood the self healing part, but for snapshots, imagine I will run KVM server ontop of BTRFS, will it makes sense to snapshot the volume ?
      or just the VM, which is better ?

      And yes I use Centos latest, I noticed they have switched to XFS even in the boot partition, does it support volume snapshots?

      Thanks

      scottalanmillerS 5 Replies Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller @Emad R
        last edited by

        @msff-amman-Itofficer said in Linux: BtrFS:

        I hear alot lately more about those filesystems, but as far as I recall ZFS requires alot of RAM as it the same with BTRFS?

        No, and no. The need for a lot of RAM is specifically around ZFS if deduplication is turned on. Then it is 1GB per 1TB. Unless you are using that feature, ZFS has no noticeably increased RAM needs.

        1 Reply Last reply Reply Quote 1
        • scottalanmillerS
          scottalanmiller @Emad R
          last edited by

          @msff-amman-Itofficer said in Linux: BtrFS:

          and is this only when you need to configure RAID with it?

          RAID uses very little RAM. Cache, would use a lot of RAM, though. But that is configurable.

          1 Reply Last reply Reply Quote 1
          • scottalanmillerS
            scottalanmiller @Emad R
            last edited by

            @msff-amman-Itofficer said in Linux: BtrFS:

            I head alot of people like them for the ability to snapshot,

            This is one of the silliest things that people talk about. LVM2 has offered snapshots on Linux for two decades. We don't need BtrFS or ZFS for that functionality. It's very common to snapshot on Linux even without these filesystems. It's only because they both have the LVM layer built in that they have this. All filesystems can be snapshot.

            1 Reply Last reply Reply Quote 2
            • scottalanmillerS
              scottalanmiller @Emad R
              last edited by

              @msff-amman-Itofficer said in Linux: BtrFS:

              ... imagine I will run KVM server ontop of BTRFS, will it makes sense to snapshot the volume ?

              Did it make sense before with LVM and XFS? No, and the reason is because you can't snap outside of the VM because there isn't enough information to know if the data is quiesced. Snapping under the hood at the LVM2 or BtrFS layer would be the same as snapping on a SAN which, of course, can cause corruption. So we avoid that. We need the VM itself to have this done via the hypervisor.

              stacksofplatesS 1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @Emad R
                last edited by

                @msff-amman-Itofficer said in Linux: BtrFS:

                And yes I use Centos latest, I noticed they have switched to XFS even in the boot partition, does it support volume snapshots?

                Yes, and no. Filesystems don't do snapshots, logical volume managers do. XFS used properly on LVM2 has always had snapshots. Just like EXT2, 3 & 4 have always supported. Or JFS. The filesystem can't block the snapping functionality, so no matter what you put on top of an LVM, even if it isn't a filesystem, can be snapped as the filesystem doesn't not need to grant permission for this operation.

                1 Reply Last reply Reply Quote 1
                • bbigfordB
                  bbigford
                  last edited by

                  If it's "Better File System", why not pronounce it better, rather than butter?

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @bbigford
                    last edited by

                    @BBigford said in Linux: BtrFS:

                    If it's "Better File System", why not pronounce it better, rather than butter?

                    I've never understood that either, and a few people do, but somehow "butter" became the de facto standard, even before it was available for general use. My only guess is that they did not want to come off as pretentious.

                    bbigfordB 1 Reply Last reply Reply Quote 1
                    • stacksofplatesS
                      stacksofplates @scottalanmiller
                      last edited by

                      @scottalanmiller said in Linux: BtrFS:

                      @msff-amman-Itofficer said in Linux: BtrFS:

                      ... imagine I will run KVM server ontop of BTRFS, will it makes sense to snapshot the volume ?

                      Did it make sense before with LVM and XFS? No, and the reason is because you can't snap outside of the VM because there isn't enough information to know if the data is quiesced. Snapping under the hood at the LVM2 or BtrFS layer would be the same as snapping on a SAN which, of course, can cause corruption. So we avoid that. We need the VM itself to have this done via the hypervisor.

                      I've specifically seen you recommend using LVM as a backup mechanism with KVM.

                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @stacksofplates
                        last edited by

                        @stacksofplates said in Linux: BtrFS:

                        @scottalanmiller said in Linux: BtrFS:

                        @msff-amman-Itofficer said in Linux: BtrFS:

                        ... imagine I will run KVM server ontop of BTRFS, will it makes sense to snapshot the volume ?

                        Did it make sense before with LVM and XFS? No, and the reason is because you can't snap outside of the VM because there isn't enough information to know if the data is quiesced. Snapping under the hood at the LVM2 or BtrFS layer would be the same as snapping on a SAN which, of course, can cause corruption. So we avoid that. We need the VM itself to have this done via the hypervisor.

                        I've specifically seen you recommend using LVM as a backup mechanism with KVM.

                        Have I recommended it, or have I recommended it within the context of taking image based backups?

                        stacksofplatesS 1 Reply Last reply Reply Quote 0
                        • stacksofplatesS
                          stacksofplates @scottalanmiller
                          last edited by

                          @scottalanmiller said in Linux: BtrFS:

                          @stacksofplates said in Linux: BtrFS:

                          @scottalanmiller said in Linux: BtrFS:

                          @msff-amman-Itofficer said in Linux: BtrFS:

                          ... imagine I will run KVM server ontop of BTRFS, will it makes sense to snapshot the volume ?

                          Did it make sense before with LVM and XFS? No, and the reason is because you can't snap outside of the VM because there isn't enough information to know if the data is quiesced. Snapping under the hood at the LVM2 or BtrFS layer would be the same as snapping on a SAN which, of course, can cause corruption. So we avoid that. We need the VM itself to have this done via the hypervisor.

                          I've specifically seen you recommend using LVM as a backup mechanism with KVM.

                          Have I recommended it, or have I recommended it within the context of taking image based backups?

                          That's what he was talking about above. Using BtrFS to take a snapshot of the volume, like using LVM to take a snapshot of the volume.

                          scottalanmillerS 1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller @stacksofplates
                            last edited by

                            @stacksofplates said in Linux: BtrFS:

                            @scottalanmiller said in Linux: BtrFS:

                            @stacksofplates said in Linux: BtrFS:

                            @scottalanmiller said in Linux: BtrFS:

                            @msff-amman-Itofficer said in Linux: BtrFS:

                            ... imagine I will run KVM server ontop of BTRFS, will it makes sense to snapshot the volume ?

                            Did it make sense before with LVM and XFS? No, and the reason is because you can't snap outside of the VM because there isn't enough information to know if the data is quiesced. Snapping under the hood at the LVM2 or BtrFS layer would be the same as snapping on a SAN which, of course, can cause corruption. So we avoid that. We need the VM itself to have this done via the hypervisor.

                            I've specifically seen you recommend using LVM as a backup mechanism with KVM.

                            Have I recommended it, or have I recommended it within the context of taking image based backups?

                            That's what he was talking about above. Using BtrFS to take a snapshot of the volume, like using LVM to take a snapshot of the volume.

                            Well yes, but what I mean is if someone asks "how do you take backups" I normally recommend an agent. If someone says "how do I snap images" I normally say LVM.

                            The difference is if the goal is to backup the system or if the question is "can KVM do image backups."

                            stacksofplatesS 1 Reply Last reply Reply Quote 0
                            • bbigfordB
                              bbigford @scottalanmiller
                              last edited by

                              @scottalanmiller said in Linux: BtrFS:

                              @BBigford said in Linux: BtrFS:

                              If it's "Better File System", why not pronounce it better, rather than butter?

                              I've never understood that either, and a few people do, but somehow "butter" became the de facto standard, even before it was available for general use. My only guess is that they did not want to come off as pretentious.

                              Lol then pronounce it 'butter' and call it 'Butter File System'?

                              scottalanmillerS 1 Reply Last reply Reply Quote 0
                              • scottalanmillerS
                                scottalanmiller @bbigford
                                last edited by

                                @BBigford said in Linux: BtrFS:

                                @scottalanmiller said in Linux: BtrFS:

                                @BBigford said in Linux: BtrFS:

                                If it's "Better File System", why not pronounce it better, rather than butter?

                                I've never understood that either, and a few people do, but somehow "butter" became the de facto standard, even before it was available for general use. My only guess is that they did not want to come off as pretentious.

                                Lol then pronounce it 'butter' and call it 'Butter File System'?

                                It is what it is, I just report the news 🙂

                                1 Reply Last reply Reply Quote 2
                                • stacksofplatesS
                                  stacksofplates @scottalanmiller
                                  last edited by

                                  @scottalanmiller said in Linux: BtrFS:

                                  @stacksofplates said in Linux: BtrFS:

                                  @scottalanmiller said in Linux: BtrFS:

                                  @stacksofplates said in Linux: BtrFS:

                                  @scottalanmiller said in Linux: BtrFS:

                                  @msff-amman-Itofficer said in Linux: BtrFS:

                                  ... imagine I will run KVM server ontop of BTRFS, will it makes sense to snapshot the volume ?

                                  Did it make sense before with LVM and XFS? No, and the reason is because you can't snap outside of the VM because there isn't enough information to know if the data is quiesced. Snapping under the hood at the LVM2 or BtrFS layer would be the same as snapping on a SAN which, of course, can cause corruption. So we avoid that. We need the VM itself to have this done via the hypervisor.

                                  I've specifically seen you recommend using LVM as a backup mechanism with KVM.

                                  Have I recommended it, or have I recommended it within the context of taking image based backups?

                                  That's what he was talking about above. Using BtrFS to take a snapshot of the volume, like using LVM to take a snapshot of the volume.

                                  Well yes, but what I mean is if someone asks "how do you take backups" I normally recommend an agent. If someone says "how do I snap images" I normally say LVM.

                                  The difference is if the goal is to backup the system or if the question is "can KVM do image backups."

                                  I don't understand what this has to do with anything. Above you said

                                  Did it make sense before with LVM and XFS? No, and the reason is because you can't snap outside of the VM because there isn't enough information to know if the data is quiesced.

                                  It does make sense. You can easily suspend the VM and take a LV snapshot.

                                  You've also said this to someone else which is what I was referring to:

                                  Why are you not using logical volumes? that is both a general Linux best practice as well as the backup method for KVM.

                                  Then you linked a python script that does exactly what I said. Suspends the VM and takes a snapshot of the logical volume.

                                  My point is, why are you saying here that it makes no sense?

                                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                                  • scottalanmillerS
                                    scottalanmiller @stacksofplates
                                    last edited by

                                    @stacksofplates said in Linux: BtrFS:

                                    Did it make sense before with LVM and XFS? No, and the reason is because you can't snap outside of the VM because there isn't enough information to know if the data is quiesced.

                                    It does make sense. You can easily suspend the VM and take a LV snapshot.

                                    You've also said this to someone else which is what I was referring to:

                                    Why are you not using logical volumes? that is both a general Linux best practice as well as the backup method for KVM.

                                    Then you linked a python script that does exactly what I said. Suspends the VM and takes a snapshot of the logical volume.

                                    My point is, why are you saying here that it makes no sense?

                                    Does it? Who really feels that a "you have to shut down the host" backup method is generally valid? I think most companies would consider that a bit of a fail. Does it work? Sure. Does it make sense? Not really. Once you are shutting down the VM, just copy the files, no need to snap the whole underlying volume. Are there benefits to the snap? A little, but you are getting into a less than ideal zone here. I'm certainly not pushing that.

                                    So did it make sense before, no. Does it change with BtrFS, no. Are there edge cases where you can make it work or it might make sense in niche cases? Yes, but not in general ones.

                                    To someone else I was talking about the importance of having LVM and taking a snap inside Linux is quite different than taking one under it. And it is the backup method of KVM, which many people want. That it is there and that I recommend it are not related.

                                    I feel that everything that you quoted from me is consistent. Different use cases. You have to read into it something that I didn't say to have a conflict. KVM has LVM as its snap / image backup method. I rarely would recommend using that. I would never consider running a production system without snap capacity, though. It is a best practice to keep LVM in Linux. Using snaps without quiescence as a backup system is not ideal regardless of if it is LVM or BtrFS, yes you can force quintessence by offlining the system, but I've not recommended that either, not outside of an emergency measure.

                                    stacksofplatesS 1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller
                                      last edited by

                                      I think the gap here might be the difference between recommending having a capacity to use a mechanism versus recommending using that mechanism in a given manner.

                                      1 Reply Last reply Reply Quote 0
                                      • stacksofplatesS
                                        stacksofplates @scottalanmiller
                                        last edited by

                                        @scottalanmiller said in Linux: BtrFS:

                                        @stacksofplates said in Linux: BtrFS:

                                        Did it make sense before with LVM and XFS? No, and the reason is because you can't snap outside of the VM because there isn't enough information to know if the data is quiesced.

                                        It does make sense. You can easily suspend the VM and take a LV snapshot.

                                        You've also said this to someone else which is what I was referring to:

                                        Why are you not using logical volumes? that is both a general Linux best practice as well as the backup method for KVM.

                                        Then you linked a python script that does exactly what I said. Suspends the VM and takes a snapshot of the logical volume.

                                        My point is, why are you saying here that it makes no sense?

                                        Does it? Who really feels that a "you have to shut down the host" backup method is generally valid? I think most companies would consider that a bit of a fail. Does it work? Sure. Does it make sense? Not really. Once you are shutting down the VM, just copy the files, no need to snap the whole underlying volume. Are there benefits to the snap? A little, but you are getting into a less than ideal zone here. I'm certainly not pushing that.

                                        So did it make sense before, no. Does it change with BtrFS, no. Are there edge cases where you can make it work or it might make sense in niche cases? Yes, but not in general ones.

                                        To someone else I was talking about the importance of having LVM and taking a snap inside Linux is quite different than taking one under it. And it is the backup method of KVM, which many people want. That it is there and that I recommend it are not related.

                                        I feel that everything that you quoted from me is consistent. Different use cases. You have to read into it something that I didn't say to have a conflict. KVM has LVM as its snap / image backup method. I rarely would recommend using that. I would never consider running a production system without snap capacity, though. It is a best practice to keep LVM in Linux. Using snaps without quiescence as a backup system is not ideal regardless of if it is LVM or BtrFS, yes you can force quintessence by offlining the system, but I've not recommended that either, not outside of an emergency measure.

                                        You're not "shutting down the host". It's suspended, completely different. It's perfectly valid because when you take an internal snapshot with a qcow2 file, it does exactly the same thing.

                                        You were not talking about using internal snapshots at all. He was asking how to spin up a backup of a VM and you recommended using logical volume snapshots. Don't try to change what you said. It wasn't an inconsistent quote, you said exactly what I posted in the same manner we are talking about here.

                                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                                        • scottalanmillerS
                                          scottalanmiller @stacksofplates
                                          last edited by

                                          @stacksofplates said in Linux: BtrFS:

                                          You were not talking about using internal snapshots at all. He was asking how to spin up a backup of a VM and you recommended using logical volume snapshots. Don't try to change what you said. It wasn't an inconsistent quote, you said exactly what I posted in the same manner we are talking about here.

                                          You only posted my portion of it, what's the whole thing?

                                          stacksofplatesS 1 Reply Last reply Reply Quote 0
                                          • stacksofplatesS
                                            stacksofplates @scottalanmiller
                                            last edited by

                                            @scottalanmiller said in Linux: BtrFS:

                                            @stacksofplates said in Linux: BtrFS:

                                            You were not talking about using internal snapshots at all. He was asking how to spin up a backup of a VM and you recommended using logical volume snapshots. Don't try to change what you said. It wasn't an inconsistent quote, you said exactly what I posted in the same manner we are talking about here.

                                            You only posted my portion of it, what's the whole thing?

                                            https://community.spiceworks.com/topic/207601-what-is-the-best-method-for-making-backups-of-kvm-virtual-machines

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • First post
                                              Last post