• 6 posts
  • 82 comments
Joined 3 years ago
Cake day: June 14th, 2023
  • No, you actually caught be at the perfect time, the transfer to my temporary pool is almost done. I was just curious how inheritance worked on a pool but after giving it some thought, your recommendation makes more sense; turn it on when I know I need it vs turn it off when I know I don’t. Thanks for the advice.

  • Yeah I’m not excited about the write and rebuild times being slower but the read times should still be pretty good. Considering I don’t have any more space for drives in my server and I don’t know how crazy hdd drive prices will get in the next 12 months, the guaranteed 2 drive failure resiliency is more important to me at the moment. My current 1 drive failure resiliency, 2 if I’m lucky, has me worried. My backups are on shucked drives and I don’t want to be put in a situation where I have to rely on them to restore 😅

Raid Z2 help

English

tldr: I’m going to set up raid z2 with 4x8TB hard drives. I’ll have photos, documents (text, pdf, etc.), movies/tv shows, and music on the pool. Are the below commands good enough? Anything extra you think I should add?

sudo zpool create mypool raidz2 -o ashift=12 /dev/disk/by-id/12345 ...

zfs set compression=lz4 mypool #maybe zstd?
zpool set autoexpand=on mypool
zpool set autoreplace=on mypool #I might keep this off. I can see myself forgetting in the future
zpool set listsnapshots=on mypool

With ai raising hard drive prices, I over spent on 3x10TB drives in order to reorganize my current pool and have 3 hard drives sitting on a shelf in the event of a failure. My current pool was built over time but it currently consists of 4x8TB drives. They are a mirrored stripe so a usable 16TB. If I understand it correctly, I can lose 1 drive for sure without losing data and maybe a second drive depending on which drive fails. Because of that, I want to move to raid z2 to ensure I can lose 2 drives without data loss. I’m going to move data from my 4x8TB drives, to the 3x10TB, reconfigure the 4x8TB, and move everything back. I run Immich, plex/jellyfin, and navidrome off the pool. All other documents are basically there for long term storage just in case. What options should I use for raid z2 when setting it up?

I know I can look this stuff up. I have been and continue to do so, I was just hoping for some advise from people that are more knowledgeable about this than me. The move from the 4x8TB drives to the 3x10TB is going to take ~3 days so I really don’t want to mess this up and have to start over 😅

Edit:

After looking up each property, this is the command I will probably end up using to create the raid z2 pool, thanks Avid Amoeba:

sudo zpool create
-o ashift=12 -o acltype=posixacl -o xattr=sa
-o compression=lz4 -o dnodesize=auto -o relatime=on
-o normalization=formD
raidz2
mypool
/dev/disk/by-id/12345 …

Edit2:

Above command didn’t work on my machine. The order and uppercase “O” matters. Had to do this:

sudo zpool create \
  mypool \
  raidz2 \
  -o ashift=12 -O compression=lz4 \
  -O normalization=formD -O acltype=posixacl \
  -O xattr=sa -O dnodesize=auto \
  -O relatime=on \
  /dev/disk/by-id/12345 ...

Edit3:

And finally, after all this, I set up my tmp pool of 3x10TB disks as a raid z2 instead of raid z1. Spent a day and a half transferring before I finally saw my mistake after running out of space 🫠

  • I’m currently not in a situation where swap is being used so I think my system is doing fine right now. I’m not against swap, I get it’s better to have it than not but my intention was to figure out how close is my system getting to using swap. If it went from not using swap at all to using it constantly, I’d probably want to upgrade my ram, right? If nothing else just to avoid system slow downs and unneeded wear on my SSD

  • From what I can tell, my system isn’t currently using swap at all but it does have 8GB of available swap if needed.

    To make sure I’m following what you are saying, if I upgraded my system to 64GB and changed nothing else, and let’s assume ZFS didn’t trying caching more stuff, would there still be a potential for my system to use swap just because the system wanted to even if it wasn’t memory constrained?

  • You’re an angel. I don’t know what the fuck htop is doing showing 8GB in use Based on another user comment in this thread, htop is showing a misleading number. For anyone else who comes across this, this is what I have. This makes the situation seem a little more grim. I have ~2GB free, ~28GB in use , and of that ~28GB only ~3GB is cache that can be closed. For reference, I’m using ZFS and roughly 27 docker containers. It doesn’t seem like there is much room for future services to selfhost.

    MemTotal:           30.5838      GB
    MemFree:            1.85291      GB
    MemAvailable:       4.63831      GB
    Buffers:            0.00760269   GB
    Cached:             3.05407      GB