把Windows服務器172.17.43.56(內網地址)的目錄mount到CentOS服務器172.17.43.57(內網地址)的目錄上。linux
#linux服務器的掛載狀態bash
[root@iZ2zeoecj5h2z0720hZtmp]# 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@iZ2zeoecj5h2z0720hZ/]# cd mnt/ [root@iZ2zeoecj5h2z0720hZmnt]# ll total 0 [root@iZ2zeoecj5h2z0720hZmnt]# cd ..
#掛載失敗ide
[root@iZ2zeoecj5h2z0720hZ /]# 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@iZ2zeoecj5h2z0720hZ/]# cd mnt/ [root@iZ2zeoecj5h2z0720hZmnt]# ll total 0 [root@iZ2zeoecj5h2z0720hZ mnt]# cd ..
#安裝cifs-utilsspa
[root@iZ2zeoecj5h2z0720hZ /]#yum installcifs-utils.x86_64 -y
#再次掛載成功(須要Windows服務器的administrator用戶密碼).net
[root@iZ2zeoecj5h2z0720hZ /]# mount -t cifs -ousername="administrator" //172.17.43.56/bak /mnt Password for administrator@//172.17.43.56/bak: **************** [root@iZ2zeoecj5h2z0720hZ /]# cd mnt/ [root@iZ2zeoecj5h2z0720hZ 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
#複製掛載目錄的文件沒有問題htm
[root@iZ2zeoecj5h2z0720hZmnt]# cp ecyingusystem-20171018180614.bak /tmp/ [root@iZ2zeoecj5h2z0720hZmnt]# 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
#掛載成功後的狀態blog
[root@iZ2zeoecj5h2z0720hZ~]# 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
參考文檔:ci
http://os.51cto.com/art/201408/449273.htm——Windows與Linux文件系統互訪的幾種方法文檔
http://blog.csdn.net/yasi_xi/article/details/38356247——inux mountWindows目錄遇到 write-protected 問題