Customer SSDs in a server with ZFS

I’m migrating my cloud hosted services to be on an on-premises server as cost savings measures and I’m stuck in terms of storage.

I need around 1TB of storage for multiple websites, Mastodon instances and a Matrix instance running on XCP-ng using ZFS, but all I have is 4x 512GB Silicon Power A55 SSDs and due to current world events I can’t afford any fancy storage within my budget.

How awful of an idea would it be to run an XCP-ng server with these SSDs in ZRAID2?

The server chassis is Poweredge R230 with the drives connected directly to the motherboard’s SATA controller and not utilizing the PERC controller

RAIDZ2 with 4 disks is an awful idea, because you get same if not less storage than for a striped mirrors. Pool geometry and padding. My guess is you are running RAW disks on 16k volblocksize zvols?

Running 4 times the same drive is a bad idea, because if these drives have a firmware bug, it affects 4 out of 4 drives and the pool is gone. We had that in the past twice with Samsung (shutdown instead of throttling, some TBW issues) and with broken sync write implementations for SSDs using Phison controllers.

That’s strongly worded. It’s definitely not the best idea, but there are absolutely reasons to do that. If you want to take advantage of RAIDZ expansion down the line, you could go that route, but striped mirrors can be expanded similarly, so it’s hard to justify.

Also worth mentioning that RAIDZ is always slower than mirrors because of the computation overhead with parity bits.

This is definitely a concern, but I wouldn’t worry too much about it. Many enterprise sites use the same thing. We sysadmins assume these black swan events won’t happen, but we maintain backups just in case.

What I’d be more worried about is SSD wearout. I’ve had a number of SSDs go read-only in a ZFS array simply due to volume of writes to them. That’s not to say they will always have that happen, but depending on your workload, it’s a distinct possibility.

I don’t see any TBW rating for those A55 SSDs, so I can’t say for sure how fitting they are for the workload. They’re obviously better than nothing though, so what I’d say is this:

Use them for now, and budget for replacing them after a year or so. ZFS makes it easy to simply do a zpool replace pool old_disk new_disk and it’ll move the data over to your new disk.

I forgot to mention that RAIDZ2 is mainly for 2 drive failure redundancy since they’re customer drives

By that logic, there is no need for RAIDZ2 instead of RAIDZ1 in a small pool and there is no need for a 3way mirror instead of a two way mirror.

Which I don’t disagree with :slightly_smiling_face: Not at all. A single 2 way mirror or in OPs case a striped 2 way mirror is IMHO more than enough availability for a homelab.

I don’t know if it’s that obvious. You get 1TB effective capacity either way. With Raidz2, you can survive losing two drives. With raid10 striped mirrors, you may or may not, depending on which drives. Most likely, it won’t make much difference in practice.

If I understood OP correctly, this is not a homelab but a small business.

These drives are rated at 0.4 DWPD.

However, these poor, trashy consumer drives make use of pseudo SLC cache, have some strange DRAM less HBM optimizations to write 4k, and writing 4k will probably result in some internal write amp, thous making the “real” DWPD even worse.

Not for the default zvol 16k volblocksize. You need padding, which brings down your efficiency to 44%, compared to 50% of mirror.

If I understood OP correctly, this is not a homelab but a small business.

If that is the case, I would simply get two good server or at least prosumer 1TB SSDs and put them in a mirror. These drives are not worth bothering in a SMB environment IMHO.

Not small business but it is kind of borderline SMB. It’s basically mainly hosting a mastodon & matrix server and bunch of sites for friends with static content. Primary concern is basically fault resilience because my homelab has a track record of just exploding with storage failures every time I leave on vacation for even just a week.

Left for vacation for a week once and came back to 4 different dead drives from different batches and sizes in different servers that died within the same week and survived only because of raid.

If it helps, graph of the hypervisor of the system I/O and traffic to gauge how bad those SSDs are gonna be

Honestly most of the time it’s supposed to be idle and only tank huge spikes in traffic when there’s a new upload before cloudflare takes over

Same.
Kingston DC2000B or DC600M depending on workload.

Maybe even set up some 2nd-hand office box with Veeam Community Edition to automate backups every 6/12/24 hours (depending on how frequently the data changes).

So I’ve been running this mess for a little while now

6 drive vdevs instead of 4, but I have to say the 2TB SP drives have the most reallocations and are the youngest drives in the whole array.

The teamgroup drives in comparison had 1 complete failure which was replaced under warranty but the wear seems fine.

I would go raidz2 over striped mirrors but I actually think raidz1 is fine as the time to rebuild with a cold or hot spare is so much shorter than spinners.

I dont think xcp-ng is a great choice personally but if you know its drawbacks and are comfortable with it, then go for it.

I have 4 x1TB SSDs in my desktop in a RAIDZ1 config. If I were you and cash was tight, I would use the 4 SSDs you have in a RAIDZ1 and then buy a new SSD and replace a drive in the array when funds allow until you have 4 new SSDs.

Here is a drive suggestion:

Micron 5300 MAX MTFDDAK960TDT 960GB SATA 2.5" Refurbished SSD — ServerPartDeals.com

A 4 SSDs wide RAIDZ1 will only give you 44% because of padding.

A 4 SSD mirror, consisting two striped mirrors, will offer 50% and better performance.

Running 4x Silicon Power A55 in RAIDZ2, a firmware bug could potentially destroy all 4 disks at the same time, which would result in a pool loss.

Running 2x Silicon Power A55 and 2x WD Red NAS (or whatever), in striped mirror, where there is one WD and one Silicon Power in the same vdev, a firmware bug could potentially destroy one disks in one vdev, which a mirror can handle an not result in a pool loss. Same would also be true for RAIDZ2 of course, but IMHO the less storage and performance is not worth the only slight security advantage.

But either way, both options are IMHO way more secure than running 4x Silicon Power A55 in RAIDZ2!

A RAIDZ1 of 4 x1TB SSDs will give 2.8TBs of usable space with 20% left over. Ask me how I know… Furthermore, I have found this ZFS capacity calculator to be spot on. Do it yourself.

According to the calculator that’s 70% usable.

Imho those are trash-tier drives that should be avoided, especially for running vms on zfs. For your workload i would feel more confident iwith just mechanical drives with zfs and sync=disabled to give it better write performance at the cost of some risk of data loss of 5 minutes or so of data.

The ssds will probably be faster but my proposal removes the very real risk of them burning all their flash and dying in a year.

Yeah with the consensus in the thread I think it’ll be better for me to use a pair of low capacity enterprise SSDs for the hypervisor and use a pair of two Dell certified 1TB HDDs for the VMs than to risk using those SSDs

That calculator assumes a 128k recordsize.

That is something completlely different from a 16 volblocksize.

Ohh this one I know, you did not test it and only looked at the webGUI! Because there it will show 3TB usable storage. What you won’t see in the GUI, is that a 1TB VM disk with 16k volblocksize takes up more than 1TB, because it needs padding.

Go ahead, create a RAIDZ2 4x 1TB wide. Create a VM with a 2TB RAW disk and then try to fill it with random data. Won’t work :wink:

Ask me how I know… no, don’t ask me, look at it for yourself opinions_about_tech_stuff/ZFS/The problem with RAIDZ.md at main · jameskimmel/opinions_about_tech_stuff · GitHub

BTW, nothing to be ashamed of, that error happens to many users. Proxmox forum is full of people that make your mistake.

There is a reason why Proxmox highly recommends you to use mirrors and steer clear of RAIDZ.

Since XCP-ng does not offer official support, I would steer clear of ZFS anyway. Or go with Proxmox instead.

Only supports it for the boot pool, just would prefer to avoid proxmox as in testing it didn’t really survive a smoke test for me when upgrading and with Xcp-ng I can just do a hot migration even over the internet

It is not officially supported but they care enough to package it and keep it updated, and afaik it does have some level of native integration, it is more of a long term beta.

It has been in for many years, 8 maybe

Like I said, I have 4 x 1TB SSDs in a RAIDZ1 in my desktop computer. It has more than 44% of the space available.