By default, zfs filesystems are mounted with the following options:
/tank on tank read/write/setuid/devices/exec/xattr/atime/dev=2d9002e on Tue May 15 09:16:46 2007
Looking at the mount output for the a zfs root filesystem, we have:
/ on tank/rootfs-nv_64 read/write/setuid/devices/noatime/dev=2d90002 on Tue May 15 09:16:46 2007
- this seems impossible. Since we're able to run stuff in /usr
(not a separate filesystem in thiscase) we must have exec permission
even though the mount output doesn't show it.
Sure enough,
timf@haiiro[7] zfs get exec tank/rootfs-nv_64
NAME PROPERTY VALUE SOURCE
tank/rootfs-nv_64 exec on default
However, we actually don't have xattr support for the root filesystem:
# touch /foo
# runat /foo cp /etc/passwd .
runat: cannot open attribute directory for /foo: Invalid argument
#
This conflicts with what zfs get tells us:
timf@haiiro[8] zfs get xattr tank/rootfs-nv_64
NAME PROPERTY VALUE SOURCE
tank/rootfs-nv_64 xattr on default
(a UFS rooted system has the following mount options
/ on /dev/dsk/c0t1d0s0 read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=800000 on Tue May 22 16:17:17 2007 )
I added a normal legacy zfs filesystem entry in /etc/vfstab:
tank/filesystem - /a zfs - yes -
and this was mounted as expected and xattrs were working:
timf@usuki[1] mount | grep tank/filesystem
/a on tank/filesystem read/write/setuid/devices/exec/xattr/atime/dev=2d90003 on Thu May 24 12:01:55 2007
timf@usuki[2] cd /a
timf@usuki[3] su root
Password:
# touch foo
# runat foo cp /etc/passwd .
# runat foo ls -al
total 3
drwxrwxrwt 2 root root 3 May 24 12:14 .
-rw-r--r-- 1 root root 0 May 24 12:14 ..
-rw-r--r-- 1 root root 942 May 24 12:14 passwd
#