Rootop 服务器运维与web架构

ubuntu挂载共享mount error(95): Operation not supported

# 在ubuntu下挂载共享报错
root@venus:~# mount.cifs //192.168.10.5/DB_Backup /mnt/nas/ -o user=admin
Password for admin@//192.168.10.5/DB_Backup: ******
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

根据提示查看mount.cifs帮助文档的第8页
root@venus:~# man mount.cifs 8

原因可能是我nas设备(群晖)里面是SMB2.0的版本,然后ubuntu版本内核为4.15.0-39-generic,就自动协商为2.1版本没成功:
vers=arg
SMB protocol version. Allowed values are:

· 1.0 – The classic CIFS/SMBv1 protocol.

· 2.0 – The SMBv2.002 protocol. This was initially introduced in Windows Vista Service Pack 1, and Windows Server
2008. Note that the initial release version of Windows Vista spoke a slightly different dialect (2.000) that is
not supported.

· 2.1 – The SMBv2.1 protocol that was introduced in Microsoft Windows 7 and Windows Server 2008R2.

· 3.0 – The SMBv3.0 protocol that was introduced in Microsoft Windows 8 and Windows Server 2012.

· 3.1.1 or 3.11 – The SMBv3.1.1 protocol that was introduced in Microsoft Windows Server 2016.

Note too that while this option governs the protocol version used, not all features of each version are available.

The default since v4.13.5 is for the client and server to negotiate the highest possible version greater than or
equal to 2.1. In kernels prior to v4.13, the default was 1.0. For kernels between v4.13 and v4.13.5 the default is
3.0.

# 指定协议2.0版本解决。
root@venus:~# mount.cifs //192.168.10.5/DB_Backup /mnt/nas/ -o user=admin,pass=xxx,vers=2.0

原创文章,转载请注明。本文链接地址: http://www.rootop.org/pages/4165.html

作者:Venus

专注于 服务器运维与web架构 E-mail:venus#rootop.org

评论已关闭。