zfsonlinux / pkg-zfs

Native ZFS packaging for Debian and Ubuntu
https://launchpad.net/~zfs-native/+archive/daily
308 stars 55 forks source link

sharenfs: no_root_squash ignored after update to 2.6.5 #167

Closed ggzengel closed 8 years ago

ggzengel commented 9 years ago
# uname -a
Linux xenserver1 4.1.0-0.bpo.2-amd64 #1 SMP Debian 4.1.6-1~bpo8+1 (2015-09-09) x86_64 GNU/Linux

# cat /etc/apt/sources.list.d/zfsonlinux.list 
deb http://archive.zfsonlinux.org/debian jessie main

Before update: no_root_squash is set

# zfs get sharenfs
zpool1/media                                   sharenfs  async,no_subtree_check,no_root_squash,no_all_squash,rw,nohide,insecure  local

# exportfs -v
/srv/nfs/media
        <world>(rw,wdelay,nohide,insecure,no_root_squash,no_subtree_check,sec=sys,rw,no_root_squash,no_all_squash)

After update: no_root_squash is ignored

# zfs get sharenfs
zpool1/media                                   sharenfs  async,no_subtree_check,no_root_squash,no_all_squash,rw,nohide,insecure  local

# exportfs -v
/srv/nfs/media
        <world>(rw,wdelay,nohide,insecure,root_squash,no_subtree_check,sec=sys,rw,root_squash,no_all_squash)

Fix: changing order of no_all_squash

# zfs get sharenfs
zpool1/media                                   sharenfs  async,no_subtree_check,no_all_squash,rw,nohide,no_root_squash,insecure  local

# exportfs -v
/srv/nfs/media
        <world>(rw,wdelay,nohide,insecure,no_root_squash,no_subtree_check,sec=sys,rw,no_root_squash,no_all_squash)

Is this special (undocumented) code of Turbo? I can't see any changes on github.

FransUrbo commented 9 years ago

Have a look at /usr/share/doc/zfsutils/README.Debian. Also try to put rw first in the list.

ggzengel commented 9 years ago

But there is no code which has been changed between 2.6.4 and 2.6.5. Next time the system can go down I will try to put rw in front.

This was the second time you drop a clanger.

FransUrbo commented 9 years ago

Yeah, and it probably won't be the last :(. I fix one thing in sharenfs and another crops up :(. Which I could get some help debugging this...

FransUrbo commented 8 years ago

If I'm not mistaken, this is fixed.