我遇到了OS X上的文件locking和自动安装问题。
这是我的auto_master
文件:
# # Automounter master map # +auto_master # Use directory service /net -hosts -nobrowse,hidefromfinder,nosuid /home auto_home -nobrowse,hidefromfinder /Network/Servers -fstab /- -static /- /etc/auto_nfs
这里是auto_nfs
:
# Common Configuration /Shared/Family -fstype=nfs,rw,nodev,nosuid,nfc,locallocks nfs://10.0.0.11/Volumes/PDISK3/VDISKS/General1/Groups/Family\ Shared /Shared/Users/christopher -fstype=nfs,rw,nodev,nosuid,nfc,locallocks nfs://10.0.0.11/Volumes/PDISK3/VDISKS/General1/Users/christopher /Shared/Scratch1 -fstype=nfs,rw,nodev,nosuid,nfc,locallocks nfs://10.0.0.11/Volumes/PDISK2/VDISKS/Scratch1 # END Common Configuration
看起来好像locallocks
被忽略 ( mount
命令不显示它, chflags
失败,Finder的信息窗口有一个灰色的locking框)。 我尝试过所有的组合(例如nolocks
, nolocks,locallocks
等)无济于事。
虽然在NFS一般没有locking的情况下,如果我尝试在NFS挂载上拥有主目录,那么缺less连锁的外观会导致OS X 疯狂 。
所以:我如何获得锁(甚至是锁的外观)在NFS共享上工作?
其他细节:
该服务器是Linux Mint上的NFS4服务器,其输出如下所示:
/Volumes/PDISK2 10.0.0.2(rw,async,no_subtree_check,insecure,no_root_squash) 10.0.0.3(rw,async,no_subtree_check,insecure,no_root_squash) 10.0.0.0/16(rw,async,no_subtree_check,insecure) /Volumes/PDISK3 10.0.0.2(rw,async,no_subtree_check,insecure,no_root_squash) 10.0.0.3(rw,async,no_subtree_check,insecure,no_root_squash) 10.0.0.0/16(rw,async,no_subtree_check,insecure) /Volumes/PDISK4 10.0.0.2(rw,async,no_subtree_check,insecure,no_root_squash) 10.0.0.3(rw,async,no_subtree_check,insecure,no_root_squash) 10.0.0.0/16(rw,async,no_subtree_check,insecure)
(注意:这台计算机不是给定root权限的计算机之一,并将保持这种状态)。
如果我在服务器上设置了no_auth_rlm
,那么lockingcheckbox不会在Finder中变灰,但它不会让我检查它(它不会自己检查)。 如果我这样做: touch a ; chflags uchg a
touch a ; chflags uchg a
在一个坐骑上,我得到:
chflags: a: Operation not supported
有趣的是, chflags nouchg a
作品,但仍然不允许chflags uchg a
之后。 请注意,它也不能以root身份从根目录访问。
这些帐户全部来自OS X El Capitan Open Directory服务器。 是的,它设置正确(我可以绝对访问/编写/编辑/等等的一切,除了什么显然是一个OS X的错误从删除目录从Finder)。
这是交叉发布的,因为有两个主要的群体可能遇到过这个问题:系统pipe理员已经将OS X集成到目录组(因此ServerFault)和OS-X爱好者谁试图做同样的事情个人或小企业并有问题(因此认为不同)。
更多信息由“Heinrich”提供:
这不是一个真正的自动安装问题。 似乎挂载(8)或mount_nfs(8)程序简单地忽略了大多数选项:
> mount_nfs -o lock,rsize=65535 newserver:/Volumes/Newdata/kits /mnt > mount|grep /mnt newserver:/Volumes/Newdata/kits on /mnt (nfs) > umount /mnt > mount_nfs -o lock,nodev newserver:/Volumes/Newdata/kits /mnt > mount|grep /mnt newserver:/Volumes/Newdata/kits on /mnt (nfs, nodev)
“nodev”很荣幸,但其他一切似乎都被忽略了。
看起来挂载选项实际上并没有被忽略,只是mount
不显示它们。 nfsstat -m
显示给定的NFS参数以及当前正在使用的每个安装的实际安装选项。
特别是 locallocks
有一个作用:在我的设置(macOS Sierra,从Linux服务器挂载NFS),Photos应用程序最初没有在NFS挂载(它刚挂在启动时)的库上工作。 只有在设置locallocks
之后才能使用Photos应用程序。