8

In ZFS, you can build your filesystem hiearchy to include different fs-attributes per filesystem. For insance, compression in one area, no-exec/suid in others, noatime.

For example, a HOWTO for FreeBSD suggests creating the following filesystems:

zfs create -o compression=off   -o atime=off                    zroot/root
zfs create -o compression=on    -o setuid=off                   zroot/tmp
zfs create -o                                                   zroot/usr
zfs create -o                                                   zroot/usr/home
zfs create -o compression=lzjb                  -o setuid=off   zroot/usr/ports
zfs create -o compression=off   -o exec=off     -o setuid=off   zroot/usr/ports/distfiles
zfs create -o compression=off   -o exec=off     -o setuid=off   zroot/usr/ports/packages
zfs create -o compression=lzjb  -o exec=off     -o setuid=off   zroot/usr/src
zfs create                                                      zroot/var
zfs create -o compression=lzjb  -o exec=off     -o setuid=off   zroot/var/crash
zfs create                      -o exec=off     -o setuid=off   zroot/var/db
zfs create -o compression=lzjb  -o exec=on      -o setuid=off   zroot/var/db/pkg
zfs create                      -o exec=off     -o setuid=off   zroot/var/empty
zfs create -o compression=lzjb  -o exec=off     -o setuid=off   zroot/var/log
zfs create -o compression=gzip  -o exec=off     -o setuid=off   zroot/var/mail
zfs create                      -o exec=off     -o setuid=off   zroot/var/run
zfs create -o compression=lzjb  -o exec=on      -o setuid=off   zroot/var/tmp

Something I had heard said do not turn on compression or other features with Linux native ZFS on /var, because it will crash. What should ZFS filesystem structure and features (compression, atime, disabling setuid, etc) be on a linux system?

1

follow step to change and find your volume attribute

find volume name by run command :

zpool list

find volume monuted in linux OS :

mount | grep volume_name

You can check status of Attribute by grep item in get all command :

zfs get all volume_name | grep time

Sample Result:

volume_name atime                 on                    local
volume_name relatime              off                    default

change attribute by set command :

zfs set atime=off volume_name 

check status of attribute again

zfs get all volume_name | grep time

sample result :

volume_name atime                 off                    local
volume_name relatime              off                    default

also you can check linux mount command to verify attribute set for your volume :

mount | grep volume_name 

sample result with noatime attribute assigned to your volume :

volume_name on /volume_name type zfs (rw,noatime,xattr,noacl)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.