aboutsummaryrefslogtreecommitdiff
path: root/scripts/hostname
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-10-22 22:01:49 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-10-22 22:01:49 -0400
commitf9301e0fe52313581920026a186955c78fcbe831 (patch)
tree9a9d8ea8df1bbf2e5d1253d2398ad469acd96b12 /scripts/hostname
parent39358af4e65a0bcd193797ac5003b0adc9b4225b (diff)
downloadinfrastructure-f9301e0fe52313581920026a186955c78fcbe831.tar.gz
zfs autosnapshots, syncthing, pam cleanup
Diffstat (limited to 'scripts/hostname')
-rw-r--r--scripts/hostname/nfs1/10-homedirs6
-rw-r--r--scripts/hostname/nfs1/20-shares5
2 files changed, 11 insertions, 0 deletions
diff --git a/scripts/hostname/nfs1/10-homedirs b/scripts/hostname/nfs1/10-homedirs
index f2cd25c..3a6d923 100644
--- a/scripts/hostname/nfs1/10-homedirs
+++ b/scripts/hostname/nfs1/10-homedirs
@@ -14,6 +14,9 @@ for userquota in ${nfs_homedirs:-}; do
zfs set "refquota=${privquota:-$default_priv_quota}" "${nfs_dataset}/user/${user}/priv"
zfs set "refquota=${pubquota:-$default_pub_quota}" "${nfs_dataset}/user/${user}/pub"
+ zfs set 'com.sun:auto-snapshot=true' \
+ "${nfs_dataset}/user/${user}/priv" \
+ "${nfs_dataset}/user/${user}/pub"
chown "${user}:${user}" \
"${nfs_root}/user/${user}/priv" \
@@ -34,6 +37,9 @@ for groupquota in ${nfs_groupdirs:-}; do
zfs set "refquota=${privquota:-$default_priv_quota}" "${nfs_dataset}/group/${group}/priv"
zfs set "refquota=${pubquota:-$default_pub_quota}" "${nfs_dataset}/group/${group}/pub"
+ zfs set 'com.sun:auto-snapshot=true' \
+ "${nfs_dataset}/group/${group}/priv" \
+ "${nfs_dataset}/group/${group}/pub"
chown "root:${group}" \
"${nfs_root}/group/${group}/priv" \
diff --git a/scripts/hostname/nfs1/20-shares b/scripts/hostname/nfs1/20-shares
index ef013cc..beb3b11 100644
--- a/scripts/hostname/nfs1/20-shares
+++ b/scripts/hostname/nfs1/20-shares
@@ -2,6 +2,11 @@
# media/music
create_dataset -p "${nfs_dataset}/media/music"
+zfs set \
+ compression=off \
+ com.sun:auto-snapshot:daily=true \
+ com.sun:auto-snapshot:weekly=true \
+ "${nfs_dataset}/media/music"
chgrp media-admin "${nfs_root}/media/music"
chmod 2770 "${nfs_root}/media/music"
set_facl "${nfs_root}/media/music" \