1、环境准备
1、系统:redhat7.5
2、使用工具:XSHELL7
3、一个已经共享出来的Windows共享盘
2、安装cifs-utils
yum install -y cifs-utils
3、挂载Windows共享磁盘
# 注意:此处使用的vers的值,选择其中一个即可 1.0 2.0 3.0 2.1
mount -t cifs //server_name/dirctory //host/dirctory -o username=xxx,password=xxx,rsize=65535,wsize=65535,cache=none,vers=1.0
4、参数解释
rsize,wsize,cache基本不用,但是必须要制定vers版本,否则读写速率会特别慢
CIFS(Common Internet File System)协议中的vers参数代表了SMB(Server Message Block)协议的版本。SMB协议是用于在Windows和其他操作系统之间进行文件共享和打印服务的协议。以下是CIFS/SMB协议的一些主要版本:
SMB 1.0 (或SMB1):这是较旧的版本,用于Windows 2000、Windows XP和Windows Server 2003。
SMB 2.0:这个版本在Windows Vista(SP1或更高版本)和Windows Server 2008中引入