Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


LVM vs Btrfs (FileSystem) on a VPS
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

LVM vs Btrfs (FileSystem) on a VPS

sureiamsureiam Member
edited February 2018 in Help

I can't decide between LVM or Btrfs on a new VPS. On one hand LVM+xfs or ext4 is tried and true and allows for encryption (although rebooting needing the password is no fun). Btrfs however seems to be better at backing up, although I don't know how much use that is in a VPS.

My biggest desire would be the ability to create snapshots that can be rsync'd out. Also ya know.. To have my data not be corrupted on a hard shut down..

Comments

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    Do you want your data to last more than a week?

    If yes, then not BTRFS.

    Francisco

  • Francisco said: If yes, then not BTRFS.

    >

    Go on... :-)

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    @Tom said:

    Francisco said: If yes, then not BTRFS.

    >

    Go on... :-)

    I've lost every single FS I've ever used BTRFS on. They later on fixed what caused the problems, but never again.

    Francisco

    Thanked by 1vmp32k
  • Francisco said: I've lost every single FS I've ever used BTRFS on. They later on fixed what caused the problems, but never again.

    >

    Ouch...

  • rm_rm_ IPv6 Advocate, Veteran
    edited February 2018

    Btrfs is nowhere near that bad these days, but there are still some issues reported with surviving hard shut downs which is what you listed as a requirement. Also you should realize it's way slower compared to either of the other two that you mentioned.

    As for XFS, recently had a situation where it was detecting something wrong with the FS or the disk, and was simply doing this:

    IO error encountered. Shutting down filesystem. Please unmount and correct the problems.

    There was no way to even run "dmesg" to see what the issue was, or to view any logs (it was the root filesystem of the machine). Ext4 with its "errors=remount-ro" would at least switch to read-only mode in cases like that, and allow for diagnostics. XFS doesn't have such choice of what to do in case of FS errors. So I migrated that machine to Ext4 and likely won't use XFS again. Also it always had the long-standing downside of not being able to shrink (resize down). Ext4 and Btrfs can do that. (Another alternative which is JFS, also can't).

  • FranciscoFrancisco Top Host, Host Rep, Veteran

    rm_ said: Btrfs is nowhere near that bad these days

    I would fucking hope so, those issues happened years ago on our OpenVZ backups node.

    Francisco

  • jackbjackb Member, Host Rep
    edited February 2018

    @sureiam said:
    I can't decide between LVM or Btrfs on a new VPS. On one hand LVM+xfs or ext4 is tried and true and allows for encryption (although rebooting needing the password is no fun). Btrfs however seems to be better at backing up, although I don't know how much use that is in a VPS.

    My biggest desire would be the ability to create snapshots that can be rsync'd out. Also ya know.. To have my data not be corrupted on a hard shut down..

    If not mission critical, zfs? I've been liking ZoL and not had any problems - though naturally with it being a port it's worth being careful.

  • jackb said: ZOL

    Don't get me started...

  • jackbjackb Member, Host Rep

    @Tom said:

    jackb said: ZOL

    Don't get me started...

    Wrong capitalisation or had problems with it before?

  • @jackb said:

    @Tom said:

    jackb said: ZOL

    Don't get me started...

    Wrong capitalisation or had problems with it before?

    Problems. Lots of problems... :p

  • lwtlwt Member
    edited February 2018

    Try zfs root. I use it on all my home systems and (just so you can see how flexible it is) on a 256MB KVM. For the same reasons you want BTRFS.

    But forget about rsync - try znapzend (google it) - much better alternative.

    Full system recovery with zfs is very easy. And snapshots (even if not sent to remote site) are a God send.

    NB. ZoL integrates nicely into kernel and on Debian you also have dkms packages so automated build. initramfs is supported so you can have a system 100% on zfs.

  • I use XFS. Pretty solid, i like it

  • mfsmfs Banned, Member
    edited February 2018

    Btrfs is way better today, still it's not exactly something I'd blindly trust for production; given that RedHat pulled out completely I'd not rely on it for building something from scratch today unless it's a mandated requirement.

    Ironically I've lost more on XFS than on Btrfs. Yet it's what RedHat supports mainly and it allegedly has received many improvements. As pretty much as people who got burned by btrfs, I'm wary about adopting it as a blanket statement.

    Unless you're looking for a very specific feature, I'd never move away from ext4 on a linux-based VPS. If you need to have the ability resize partition, add lvm on top of it. If you want snapshots, use borgbackup :^) I can't see how btrfs would offer some added extra functionality in the VPS scenario, especially from the user perspective

  • rm_rm_ IPv6 Advocate, Veteran
    edited February 2018

    mfs said: Ironically I've lost more on XFS than on Btrfs.

    Speaking of which, in my experience XFS is behaves horridly with regard to files which were open during the time of a crash. Worse than any other FS I used. Like, routinely truncating them to 0 bytes in size (or yes, filling with zeroes), I bet while being proud of itself that "despite the crash the filesystem itself survived!"

    Several times lost all open tabs in a browser which was running before the crash, iirc that was back before browsers got built-in workarounds against this kind of b/s.

  • If my memory serves, xfs had an issue that files are filled with 0s if found lost after a power loss. Later it was fixed however. I personally use xfs a lot, and also ZoL, and so far so good. Btrfs, by the time when I was using it, was nowhere near maintenance free. Have to log into the server to balance the file system from time to time.

Sign In or Register to comment.