最近一直在做macos上的mount测试,涉及nfs和smb,也需要对比windows的行为,做个小小总结
pre-1. #### 首先要在server/cluster上 分别设置2个share point,nfs 和 smb
mkdir mpssmb
chmod -Rf 777 mpssmb
isi smb shares create --name mpssmb --path /ifs/data/mpssmb --auto-create-directory 1 --oplocks 0
isi smb shares permission modify mpssmb --wellknown Everyone --permission-type allow --permission full
isi nfs settings global view
mkdir -p /ifs/data/testmps
chmod 0777 /ifs/data/testmps
isi nfs exports create /ifs/data/testmps --all-dirs=yes --map-root=root
-
mount nfs on macos
1.1 mount nfsv3 on macos
mount -t nfs -o vers=3 10.224.38.244:/ifs/data/testmps /var/root/loadmaster0_node1
此时,无法使用acl的内容,当尝试用
chmod +a 'admin allow write' aaa
添加ace时,会报错chmod: Failed to set ACL on file 'aaa': Operation not supported
1.2 mount nfsv4 on macos
mount -t nfs -o vers=4 10.224.38.244:/ifs/data/testmps /var/root/loadmaster0_node1
此时,发现
chmod +a
依然无效,并且cluster上添加了acl的file/folder,在macos上展示不出来,用nfsstat -m
查看mount的具体信息:/Users/username/mountpoint from 10.224.38.244:/ifs/data/testmps Original mount options: General mount flags: 0x0 NFS parameters: vers=4 File system locations: /ifs/data/testmps @ 10.224.38.244 (10.224.38.244) -- Current mount parameters: General mount flags: 0x4000000 multilabel NFS parameters: vers=4.0,tcp,port=2049,hard,nointr,noresvport,callback,negnamecache,nonamedattr,noacl,noaclonly,locks,noquota,rsize=32768,wsize=32768,readahead=16,dsize=32768,nordirplus,nodumbtimr,timeo=10,maxgroups=16,acregmin=5,acregmax=60,acdirmin=5,acdirmax=60,nomutejukebox,noephemeral,nonfc,sec=sys File system locations: /ifs/data/testmps @ 10.224.38.244 (10.224.38.244) Status flags: 0x0
可以看到
NFS parameters
中,有个参数noacl
,需要把它改成acl
:mount -t nfs -o vers=4,acl 10.224.38.244:/ifs/data/testmps /var/root/loadmaster0_node1
然后可以通过
chmod +a
来给file/folder增加ace, server cluster上和macos client上增加ace的方式不一样:
假如我们有个用户名:owner1,那么赋予ta 读的权限,操作如下:
on cluster:
chmod +a user owner1 allow "dir_gen_read" aaa
on client:
chmod +a "owner1:allow:read" file
-
mount smb on macos client
mount -t smbfs //owner1@daaa.com/ifs/home/username/devcode /var/root/devcode
-
mount smb on windows client with domain name
比如:remote server: aaa.com, mount 路径是/ifs/home/devcode, domain:deskdomain, 用户名:owner1
net use U: \aaa.comifsdatampssmb /user:deskdomainowner1