我正在尝试创建件资源文件系统关于 Samba 共享 (cifs) 文件系统类型。
这是我用来创建 pcs 资源的命令。
root@shaunak-VirtualBox:~# pcs resource show SMBDiskResourceName
Resource: SMBDiskResourceName (class=ocf provider=heartbeat type=Filesystem)
Attributes: device=//192.168.1.6/my_data_share directory=/var/opt/my/data fstype=cifs options="vers=3.0,username=myuser,password=myuser,uid= 998,gid=998,file_mode=0777,dir_mode=0777"
这是我在启动资源时遇到的错误,
root@shaunak-VirtualBox:~# pcs resource debug-start SMBDiskResourceName
Error performing operation: Operation not permitted
Operation start for SMBDiskResourceName (ocf:heartbeat:Filesystem) returned 1
> stderr: INFO: Running start for //192.168.1.6/mssql_data_share on /var/opt/mssql/data
> stderr:
> stderr: Usage:
> stderr: mount [-lhV]
> stderr: mount -a [options]
> stderr: mount [options] [--source] <source> | [--target] <directory>
> stderr: mount [options] <source> <directory>
> stderr: mount <operation> <mountpoint> [<target>]
> stderr:
> stderr: Mount a filesystem.
> stderr:
.....
> stderr:
> stderr: For more details see mount(8).
> stderr: ocf-exit-reason:Couldn't mount filesystem //192.168.1.6/my_data_share on /var/opt/my/data
上面的错误表明,挂载没有发生,/192.168.1.6/my_data_share
但在我运行挂载命令的地方,我能够进行挂载。
请注意我在这里缺少什么。这是我成功执行的安装命令。
mount -t cifs //192.168.1.6/my_data_share /var/opt/my/data -o vers=3.0,username=myuser,password=myuser,uid=998,gid=998,file_mode=0777,dir_mode=0777