大网数据广告活动
服务器运维问答

ZFS on Linux - Debian - sharenfs datasets - can't write, only read

· 52CE 我爱测

Short version: mounted datasets are RO, even though I'm trying to make them RW. Long version: we currently have a working implementation of ZFS on Linux on Wheezy (which I inherited when the previous SE left) and we want to upgra…

问题原文

原帖链接 · amoreno · CC BY-SA 3.0

Short version: mounted datasets are RO, even though I'm trying to make them RW.

Long version: we currently have a working implementation of ZFS on Linux on Wheezy (which I inherited when the previous SE left) and we want to upgrade to Jessie...because...just because. Before upgrading production, I'm trying to replicate that environment (as much as possible) in a VM running on my local machine.

I've created the pool, and created a new dataset via:

root@zfstest1:~# zfs set sharenfs=rw=@10.1.2.3,insecure tank/vmware
root@zfstest1:~# zfs share -a
root@zfstest1:~# showmount -e

Export list for zfstest1:
/tank/vmware 10.1.2.3

I've compared permissions and properties and everything that I can think of against production, but regardless of whether I mount the datasets on my Mac or on a VMware host, the volume/datastore ends up being RO. Default permissions for /tank and child objects appears to be 755, and the only way I've found to make the mounted volumes on my Mac or VMware host RW, is to make them 777.

Some things that I know are different are the different zfs-debian, spl-dkms, etc packages. I just couldn't find the repository to get older ones (0.6.3-1~wheezy vs 0.6.5.2-2-wheezy)

Help on what I can look for to get this working would be greatly appreciated.

已采纳解答

原帖链接 · amoreno · CC BY-SA 3.0

So I've found that running

root@zfstest1:~# exportfs -v

gives me a different result on my test vm than on my production server. the thing i'm missing is that /etc/exports is default on both, and the results from

root@zfstest1:~# zfs get sharenfs

are the same, yet the /var/lib/nfs/etab file on production clearly has entries populated from somewhere...I just don't know from where, or how.

Ultimately, the difference is that the etab file has no_root_squash in it.

So I guess this actual issue can be considered solved, but now I have to figure out the other issue of where /var/lib/nfs/etab is getting that information from, and why our production server is populating it that way.

UPDATE: So, the exportfs -v command is getting it's information from the zfs share -a or zfs share [dataset] command. Doing a service nfs-kernel-server restart wipes that, or at least, running showmount -e or exportfs -v after restarting that service shows nothing. After running the share command, the etab is repopulated with the sharenfs entries.

...sigh...continually learning.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-11-09)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。