我在其中一部剧中遇到nfs mount问题。
游戏:
- path: /.../production/bookinfo
src: remote_server:/.../linux_shares/bookinfo-images
fstype: nfs
opts: rw,timeo=14,rsize=8192,wsize=8192,intr
state: mounted
错误:
failed: [test-server] (item={u'path': u'/.../production/bookinfo', u'state': u'mounted', u'src': u'dc1-filer-02:/.../linux_shares/bookinfo-images', u'opts': u'rw,timeo=14,rsize=8192,wsize=8192,intr', u'fstype': u'nfs'}) => {"failed": true, "item": {"fstype": "nfs", "opts": "rw,timeo=14,rsize=8192,wsize=8192,intr", "path": "/.../production/bookinfo", "src": "remote_server:/.../.../bookinfo-images", "state": "mounted"}, "module_stderr": "Shared connection to 10.10.28.93 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_C2X1_Q/ansible_module_file.py\", line 480, in <module>\r\n main()\r\n File \"/tmp/ansible_C2X1_Q/ansible_module_file.py\", line 359, in main\r\n changed = module.set_fs_attributes_if_different(file_args, changed, diff)\r\n File \"/tmp/ansible_C2X1_Q/ansible_modlib.zip/ansible/module_utils/basic.py\", line 1298, in set_fs_attributes_if_different\r\n File \"/tmp/ansible_C2X1_Q/ansible_modlib.zip/ansible/module_utils/basic.py\", line 1123, in set_mode_if_different\r\nOSError: [Errno 30] Read-only file system: '/.../production/bookinfo'\r\n", "msg": "MODULE FAILURE", "rc": 0}
现状:
drwxrwxrwx. 4 root root 4096 Jun 18 2015 bookinfo
(bookinfo以绿色突出显示蓝色字样)
此错误仅在初始运行后发生。我第二次运行游戏并得到上面的错误。即使出现错误,挂载也正常工作,因为我能够“访问”目录并访问远程数据。
背景资料:
这是在运行python 2.7.5的Centos 7 VM上。该文件夹在安装之前存在。
答案 0 :(得分:0)
我发现在我的选择线上我已经设置了&#39; rw&#39;用于读/写权限。我的源目标只允许只读。我通过改变&#39; rw&#39;到&#39; ro&#39;。