307
submitted 1 day ago* (last edited 1 day ago) by [email protected] to c/[email protected]

Just got all the hardware set up and working today, super stoked!

In the pic:

  • Raspberry Pi 5
  • Radxa Penta SATA hat for Pi
  • 5x WD Blue 8TB HDD
  • Noctua 140mm fan
  • 12V -> 5V buck convertor
  • 12V (red), 5V (white), and GND (black) distribution blocks

I went with the Raspberry Pi to save some money and keep my power consumption low. I'm planning to use the NAS for streaming TV shows and movies (probably with Jellyfin), replacing my google photos account (probably with Immich), and maybe steaming music (not sure what I might use for that yet). The Pi is running Raspberry Pi Desktop OS, might switch to the server version. I've got all 5 drives set up and I've tested out streaming some stuff locally including some 4K movies, so far so good!

For those wondering, I added the 5V buck convertor because some people online said the SATA hat doesn't do a great job of supplying power to the Pi if you're only providing 12V to the barrel jack, so I'm going to run a USB C cable to the Pi. Also using it to send 5V to the PWM pin on the fan. Might add some LEDs too, fuck it.

Next steps:

  • Set up ~~RAID 5~~ ZFS RAIDz1?
  • 3D print an enclosure with panel mount connectors

Any tips/suggestions are welcome! Will post again once I get the enclosure set up.

you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 20 points 1 day ago* (last edited 1 day ago)

Ultimately I would love to use ZFS but I read that it's difficult to expand/upgrade. Not familiar with ZFS RAIDz1 though, I'll look into it. Thanks!

I build robots for a living, the power is fine, at least for a rough draft. I'll clean everything up once the enclosure is set up. The 12V supply is 10A which is just about the limit of what a barrel jack can handle and the 5V buck is also 10A, which is about double what the Pi 5 power supply can provide.

[-] [email protected] 13 points 1 day ago* (last edited 1 day ago)

Z1 is just single parity.

AFAIK expanding a ZFS pool is a new feature. Its used in Proxmox but their version hasn't been updated yet, so I don't have the ability to try it out yet. It t should be available to you otherwise.

Sweet build! I have all these parts laying around so this would be a fun project. Please share your enclosure design if you'd like!

[-] [email protected] 6 points 1 day ago* (last edited 1 day ago)

Basically the equivalent of RAID 5 in terms of redundancy.

You don't even need to do RAIDz expansion, although that feature could save some space. You can just add another redundant set of disks to the existing one. E.g. have a 5-disk RAIDz1 which gives you the space of 4 disks. Then maybe slap on a 2-disk mirror which gives you the space of 1 additional disk. Or another RAIDz1 with however many disks you like. Or a RAIDz2, etc. As long as the newly added space has adequate redundancy of its own, it can be seamlessly added to the existing one, "magically" increasing the available storage space. No fuss.

[-] [email protected] 4 points 1 day ago

Doesn’t losing a vdev cause the entire pool to be lost? I guess to your point with sufficient redundancy for new vdev 1 drive redundancy whether 3 disks or 5 is essentially the same risk. If a vdev is added without redundancy that would increase risk of losing the entire pool.

[-] [email protected] 2 points 1 day ago
[-] [email protected] 3 points 1 day ago

Awesome. It's my understanding that ZFS can help prevent bit rot, so would ZFS RAIDz1 also do this?

I found this, it seems to show all the steps I would need to take to install RAIDz1: https://www.jeffgeerling.com/blog/2021/htgwa-create-zfs-raidz1-zpool-on-raspberry-pi

[-] [email protected] 3 points 1 day ago* (last edited 1 day ago)

Yes, it prevents bit rot. It's why I switched to it from the standard mdraid/LVM/Ext4 setup I used before.

The instructions seem correct but there's some room for improvement.

Instead of using logical device names like this:

sudo zpool create zfspool raidz1 sda sdb sdc sdd sde -f

You want to use hardware IDs like this:

sudo zpool create zfspool raidz1 /dev/disk/by-id/ata-ST8000VN0022-2EL112_ZA2FERAP /dev/disk/by-id/wwn-0x5000cca27dc48885 ...

You can discover the mapping of your disks to their logical names like this:

ls -la /dev/disk/by-id/*

Then you also want to add these options to the command:

sudo zpool create -o ashift=12 -o autotrim=on -O acltype=posixacl -O compression=lz4 -O dnodesize=auto -O normalization=formD -O relatime=on -O xattr=sa zfspool ...

These do useful things like setting optimal block size, compression (basically free performance), a bunch of settings that make ZFS behave like a typical Linux filesystem (its defaults come from Solaris).

Your final create command should look like:

sudo zpool create  -o ashift=12 -o autotrim=on -O acltype=posixacl -O compression=lz4 -O dnodesize=auto -O normalization=formD -O relatime=on -O xattr=sa zfspool raidz1 /dev/disk/by-id/ata-ST8000VN0022-2EL112_ZA2FERAP /dev/disk/by-id/wwn-0x5000cca27dc48885 ...

You can experiment till you get your final creation command since creation/destruction is nearly instant. Don't hesitate to create/destroy multiple times till you got it right.

[-] [email protected] 2 points 1 day ago* (last edited 1 day ago)

Updated ☝️ 👇

[-] [email protected] 7 points 1 day ago* (last edited 1 day ago)

ZRAID expansion is now better than ever before!

In the beginning of this year (with ZFS 2.3.0) they added zero-downtime expansion along with some other things like enhanced deduplication.

[-] [email protected] 5 points 1 day ago* (last edited 1 day ago)

ZFS is so.. So much better. In every single way. Change now before it's too late, learn and use the features as you go.

[-] [email protected] 7 points 1 day ago

Easier to expand than a typical raid 5 array

[-] [email protected] 8 points 1 day ago

This. Also it's not difficult to expand at all. There are multiple ways. Just ask here. You could also ask for hypothetical scenarios now if you like.

[-] [email protected] 1 points 1 day ago

Could also google it lol

[-] [email protected] 4 points 1 day ago

ZFS, specifically RaidZx, can be expanded like and raid 5/6 these days, assuming support from the distro (works with TrueNAS for example). The patches for this have been merged years ago now. Expanding any other array (like a striped mirror) is even simpler and is done by adding VDevs.

this post was submitted on 17 Jul 2025
307 points (97.8% liked)

Selfhosted

49587 readers
493 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS