Add acl settings

This commit is contained in:
Daniel A. Maierhofer
2018-07-12 19:25:12 +02:00
parent 869dea7987
commit 077a119651

View File

@@ -52,13 +52,27 @@ zpool add zv1 log mirror /dev/nvme0n1p5 /dev/nvme1n1p5
zfs create zv1/homes zfs create zv1/homes
zfs create zv1/daten zfs create zv1/daten
zfs create zv1/fotos zfs create zv1/fotos
chown root:nogroup /zv1/homes
chown root:2000 /zv1/daten/ /zv1/fotos/
``` ```
### Set dataset quota ### Set dataset quota
```shell ```shell
zfs set quota=1T zv1/homes zv1/daten zv1/fotos 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 ### Transfer data
```shell ```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-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 --exclude Pictures root@atlas:/mnt/save/fet_daten/ /zv1/daten/
rsync --stats -avhP root@atlas:/mnt/save/fet_daten/Pictures/ /zv1/fotos/ rsync --stats -avhP root@atlas:/mnt/save/fet_daten/Pictures/ /zv1/fotos/
@@ -75,11 +89,6 @@ zfs import
```shell ```shell
zpool add zv1 log mirror /dev/nvme0n1p2 /dev/nvme1n1p2 zpool add zv1 log mirror /dev/nvme0n1p2 /dev/nvme1n1p2
``` ```
### If intend using ACL (not done!)
```shell
zfs set xattr=sa <dataset>
zfs set acltype=posixacl <dataset>
```
## ZFS Maintenance ## ZFS Maintenance
```shell ```shell
zpool status -v zpool status -v
@@ -88,6 +97,11 @@ zpool get all
zpool history zpool history
zpool scrub zv1 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 ## MDADM Maintenance
```shell ```shell
mdadm --misc --detail /dev/md0 mdadm --misc --detail /dev/md0