Reinstall lxd best storage options btrfs vs zfs?

Hi all,

i have 4 ssd’s in a raid 10 (software) how would some of you install and configure lxd?

i want to keep the 4 ssd’s in raid 10. would you use btrfs or zfs? how would you partition everything for beste performance lxd containers?

Well I still hear data loss issues left and right with btrfs so I would 100% use ZFS just because of that. I mean ZFS is not really performance intensive unless you use deduplication for example - which you will not use - with lxd.

If you want the BEST performance, you can simply opt to use LVM or “dir” too, but then you lose the many benefits of ZFS. Though I doubt you’ll be ever so bottlenecked with a RAID10 SSD setup…

Ps.: I am no expert on lxd, just know the filesystems.

what raid setup would you prefer? 4ssd’s?

RAID10 is totally fine, it’s the most preferred for 4 drives, nothing really wrong with it IMO. Fast, redundant.

Btw one last thing, make sure your hardware raid controller (if you use one) can send out TRIM commands. Some can, some can’t. Using just software raid (mdraid) is always a solution as well.

Why not let zfs handle the RAID functionality?

1 Like

Because my host is now also in raid 10

If i do this. Wat are your recommedations?

How would you setup look like. With 4ssds and zfs that handles the raid?

I haven’t done RAID10. Search for zfs RAID10. From what I read, you create a zpool with two disks in a mirrored configuration (I’ve done this), and then add to it another two mirrored disks.

For further tuning, depending on what applications you run on a container, you can use with it ZFS filesystems with a custom recordsize that fits the application. For example, for containers that run mariadb, I use a ZFS dataset with recordsize=16k for the data, and another zfs dataset with recordsize=128k for the database log files (128k is the default, anyway).

But,

How have you done this. How does your setup look like.

Did you install your os on the first disk and then install lxd. After that create a zfs pool. Or create a zfs pool and install the os on this pool?

But,

How have you done this. How does your setup look like.

Did you install your os on the first disk and then install lxd. After that create a zfs pool. Or create a zfs pool and install the os on this pool?

I don’t install the OS on ZFS. On a one disk system, I put the OS on one partition and use zfs on another partition. On a two disk server that I rented, the default setup had software RAID, with the OS on one mirrored partition and the rest of the disk on a second mirrored partition. I broke the software RAID on the large partition and made it into a ZFS mirrored zpool. On a VPS system, I follow a procedure for re-partitioning the disk, then reinstall the OS on one partition and use ZFS on the second partition. In all cases, I create a ZFS filesystem to use as the default storage pool in LXD.

Hi votsalo,

I have a server with 2 drives. As ZFS is not recommended as boot-partition I would like to setup a software-raid for system and a mirrored ZFS pool on another partition for containers.
Did I get it right that you did the same? Are you running that setup in production?

Thanks!

Hi,

To reply on this. I install my os (root) on btrfs. created a subvolume as storage for lxd.

Everything works perfect now.

I use btrfs in raid 10

Yes, that’s what I did. I don’t use this now, because I moved to cheaper single-disk servers. I use a VPS when I need more reliability (always with LXD and a ZFS partition which I manage). I assume its disk has redundancy.