aboutsummaryrefslogtreecommitdiff
path: root/scripts/hostname/nfs1
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/hostname/nfs1')
-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" \