温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Windows服务器目录挂载到linux服务器

发布时间:2020-07-27 23:02:21 来源:网络 阅读:1009 作者:YuriGagarin 栏目:系统运维

  把Windows服务器172.17.43.56(内网地址)的目录mountCentOS服务器172.17.43.57(内网地址)的目录上。

#linux服务器的挂载状态

[root@iZ2zeoecj5h3z0720hZtmp]# df -h
Filesystem      Size Used Avail Use% Mounted on
/dev/vda1       493G  87G  381G  19% /
devtmpfs        1.9G    0  1.9G   0% /dev
tmpfs           1.9G     0 1.9G   0% /dev/shm
tmpfs           1.9G 592K  1.9G   1% /run
tmpfs           1.9G     0 1.9G   0% /sys/fs/cgroup
tmpfs          380M     0  380M  0% /run/user/0

#/mnt目录为空

[root@iZ2zeoecj5h3z0720hZ/]# cd mnt/
[root@iZ2zeoecj5h3z0720hZmnt]# ll
total 0
[root@iZ2zeoecj5h3z0720hZmnt]# cd ..

#挂载失败

[root@iZ2zeoecj5h3z0720hZ /]# mount -t cifs -ousername="administrator" //172.17.43.56/bak /mnt
mount: //172.17.43.56/bakis write-protected, mounting read-only
mount: cannotmount //172.17.43.56/bak read-only
[root@iZ2zeoecj5h3z0720hZ/]# cd mnt/
[root@iZ2zeoecj5h3z0720hZmnt]# ll
total 0
[root@iZ2zeoecj5h3z0720hZ mnt]# cd ..

#安装cifs-utils

[root@iZ2zeoecj5h3z0720hZ /]#yum installcifs-utils.x86_64 -y

#再次挂载成功(需要Windows服务器的administrator用户密码)

[root@iZ2zeoecj5h3z0720hZ /]# mount -t cifs -ousername="administrator" //172.17.43.56/bak /mnt
Password for administrator@//172.17.43.56/bak:  ****************
[root@iZ2zeoecj5h3z0720hZ /]# cd mnt/
[root@iZ2zeoecj5h3z0720hZ mnt]# ll -h
total 120G
-rwxr-xr-x 1 root root  51G Oct 1818:03 ecyingusystem-20171018175058.bak
-rwxr-xr-x 1 root root 9.8G Oct 18 18:17 ecyingusystem-20171018180614.bak
-rwxr-xr-x 1 root root 9.2G Oct 18 18:51 ecyingusystem-20171018180614.rar

#复制挂载目录的文件没有问题

[root@iZ2zeoecj5h3z0720hZmnt]# cp ecyingusystem-20171018180614.bak /tmp/
[root@iZ2zeoecj5h3z0720hZmnt]# ll /tmp/
total 14380696
-rwxr-xr-x 1root root 10434044928 Oct 19 11:29 ecyingusystem-20171018180614.bak
drwxr-xr-x 2root root        4096 Oct 16 17:12hsperfdata_root

#挂载成功后的状态

[root@iZ2zeoecj5h3z0720hZ~]# df -h
Filesystem          Size Used Avail Use% Mounted on
/dev/vda1           493G 116G  352G  25% /
devtmpfs            1.9G     0 1.9G   0% /dev
tmpfs               1.9G     0 1.9G   0% /dev/shm
tmpfs               1.9G  604K 1.9G   1% /run
tmpfs               1.9G     0 1.9G   0% /sys/fs/cgroup
tmpfs               380M     0 380M   0% /run/user/0
//172.17.43.56/bak 420G  224G  196G 54% /mnt


参考文档:

http://os.51cto.com/art/201408/449273.htm——WindowsLinux文件系统互访的几种方法

http://blog.csdn.net/yasi_xi/article/details/38356247——inux mountWindows目录遇到 write-protected 问题

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI