From 077a119651277d50b0186cae33cb06c81c74a0ef Mon Sep 17 00:00:00 2001 From: "Daniel A. Maierhofer" Date: Thu, 12 Jul 2018 19:25:12 +0200 Subject: [PATCH] Add acl settings --- doc/ariane.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/doc/ariane.md b/doc/ariane.md index 13f0560..0dd4521 100644 --- a/doc/ariane.md +++ b/doc/ariane.md @@ -52,13 +52,27 @@ zpool add zv1 log mirror /dev/nvme0n1p5 /dev/nvme1n1p5 zfs create zv1/homes zfs create zv1/daten zfs create zv1/fotos +chown root:nogroup /zv1/homes +chown root:2000 /zv1/daten/ /zv1/fotos/ ``` ### Set dataset quota ```shell zfs set quota=1T zv1/homes zv1/daten zv1/fotos ``` +### If intend using ACL someday +```shell +zfs set xattr=sa zv1 +zfs set acltype=posixacl zv1 +zfs set aclinherit=passthrough zv1 +``` +#### If ACL for ZFS NFS share is implemented someday (not done!) +```shell +setfacl -R --set u::rwX,g::rwX,o::rwX /zv1/{daten,fotos}/ +setfacl -d -R --set u::rwX,g::rwX,o::rwX /zv1/{daten,fotos}/ +``` ### Transfer data ```shell +# https://github.com/rubo77/rsync-homedir-excludes rsync --stats -avhP --exclude-from=/var/tmp/ignorelist root@atlas:/home/ /zv1/homes/ rsync --stats -avhP --exclude Pictures root@atlas:/mnt/save/fet_daten/ /zv1/daten/ rsync --stats -avhP root@atlas:/mnt/save/fet_daten/Pictures/ /zv1/fotos/ @@ -75,11 +89,6 @@ zfs import ```shell zpool add zv1 log mirror /dev/nvme0n1p2 /dev/nvme1n1p2 ``` -### If intend using ACL (not done!) -```shell -zfs set xattr=sa -zfs set acltype=posixacl -``` ## ZFS Maintenance ```shell zpool status -v @@ -88,6 +97,11 @@ zpool get all zpool history zpool scrub zv1 ``` +### show and delete all snapshots +```shell +zfs get mountpoint +zfs list -H -o name -t snapshot | xargs -n1 zfs destroy +``` ## MDADM Maintenance ```shell mdadm --misc --detail /dev/md0