Howdy, Stranger!

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


Thin LVM vs Directory
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.

Thin LVM vs Directory

juniorrrrrjuniorrrrr Member
edited September 2023 in General

I've been using Proxmox on OVH servers for 10 years now (yes, I started in 2013), and the default installation has always been of the directory file type. A few years later, I began using Virtualizor, so I stuck with the approach I was familiar with, using directory file storage.

Now I'm transitioning away from OVH and installing the OS via IPMI, which has led to some questions.

For Proxmox and Virtualizor, is it worth using Thin LVM? I like the convenience of directory-based storage – if there's an issue, I can simply copy the file.

I'm setting up a new server with 3x NVMe (RAID 5), and I'm unsure whether to use directory-based storage or Thin LVM. What's your opinion?"

** If I decide to use Thin LVM, should I create mdX on installation (RAID 5) first and then create Thin LVM on mdX??

Comments

  • tentortentor Member, Patron Provider

    If you are not familiar with LVM better not to use it or you will eventually mess things up.

    However generally LVM is better for VM disk storage IMO.

  • BasToTheMaxBasToTheMax Member, Host Rep

    @tentor said: However generally LVM is better for VM disk storage IMO.

    What does it improve compared to directory storage?

  • rm_rm_ IPv6 Advocate, Veteran

    Thin LVM storage should be faster compared to directory storage. It allocates blocks in of fixed size like 512K or 1MB, whereas a file image could get really fragmented down to 4K pieces. And possibly more reliable too.

    Which filesystem do you use for directory storage? Some like Btrfs have a very high overhead of their own, and Btrfs specifically also has an issue causing a VM image space usage on disk to grow over time consuming a lot of extra space compared to its actual size.

    If you stick with directory, XFS should be the best. Ext4 is OK too, but with XFS you also get the feature of instant reflink copying, which is very nice for VM images.

    @juniorrrrr said: If I decide to use Thin LVM, should I create mdX on installation (RAID 5) first and then create Thin LVM on mdX??

    Yes.

    Thanked by 1tentor
  • @rm_ said:

    If you stick with directory, XFS should be the best. Ext4 is OK too, but with XFS you also get the feature of instant reflink copying, which is very nice for VM images.

    XFS in /boot, / and directory for qcow2 files or Ext4 for /boot, / and XFS just in directory for qcow2 files?

  • rm_rm_ IPv6 Advocate, Veteran
    edited September 2023

    @juniorrrrr said: XFS in /boot, / and directory for qcow2 files or Ext4 for /boot, / and XFS just in directory for qcow2 files?

    I'd say it is uncommon to use XFS for /boot. As for using it in /, it's not as important, but it can work well there too.

    Thanked by 1juniorrrrr
  • Can I create a mount point (Ext4 or XFS) on an LVM and use the Storage Type as a "File" to use trim/discard?

Sign In or Register to comment.