Posts tagged: zfs
All posts with the tag "zfs"
sudo apt-get install -y samba \ then set sharesmb=on \ chown the user \ smbpasswd
Recovering from zpool corruption when you’re short a drive
Htop #
I recently have been having significant home server issues, and that’s not the point of this - today I learned what D state is when looking at htop.
Apparently this means “uninterruptable sleep” and it’s a dev’s nightmare…
Context #
The issue I was having was that some zfs rollback commands were hung - for hours… I wasn’t sure what was going on, rollbacks should be instant but I figured it was just an artifact of these issues.
Turns out I still don’t know what locked the disks up but I learned why <C>-c did nothing…
the more you know
lsof | grep /tank/nas shows me what is using my nas at any time!
➜ pihole sudo zfs load-key -L file:///path/to/.zfs.tank.key tank/encrypted/vms/arch-sandbox ➜ pihole sudo zfs change-key -o keylocation=file:///path/to/.zfs.tank.key -o keyformat=raw tank/encrypted/vms/arch-sandbox Need to load-key for each individual dataset, then change key location to be a file instead of the prompt
Systemd timer for syncoid
zfs list has a flag -r, but if you use zfs driver for docker then you’ll get flooded with every docker volume in the world. zfs list -r -d N will limit the dept of the print out, so zfs list -r -d 2 gives me tank, tank/encrypted, tank/encrypted/docker -> but then I don’t see all the continer volumes
Assuming you have a pool called tank…
And assuming you have an encrypted dataset (See Jim Saltar’s short intro)
- Create a group for permissions - in my case I have one called
home - Then if there’s anything in
/tank/encryptedhis it withchgrp -R home /tank/encryptedto give thehomegroup ownership - Next we need to make sure that the members of
homecan do the writing… sochmod 775 -R /tank/encryptedwill do the trick - Finally we want to make sure that all data created inside our dataset has
the same set of permissions with
chmod g+s /tank/encryptedandchmod g+w /tank/encrypted