Mount the Windows server directory to the linux server
Mount the directory of the Windows server 172.17.43.56 (intranet address) to the directory of the CentOS server 172.17.43.57 (intranet address).
# Mount status of linux server
[root@iZ2zeoecj5h3z0720hZtmp] # df-hFilesystem Size Used Avail Use% Mounted on/dev/vda1 493G 87G 381G 19% / devtmpfs 1.9G 0 1.9G 0 / devtmpfs 1.9G 0 1.9G 0 / dev/shmtmpfs 1.9G 592K 1.9G 1% / runtmpfs 1.9G 01.9g 0% / sys/fs/cgrouptmpfs 380M 0380M 0% / run/user/0
# / mnt directory is empty
[root@iZ2zeoecj5h3z0720hZ/] # cd mnt/ [root@iZ2zeoecj5h3z0720hZmnt] # lltotal 0 [root@iZ2zeoecj5h3z0720hZmnt] # cd..
# Mount failed
[root@iZ2zeoecj5h3z0720hZ/] # mount-t cifs-ousername= "administrator" / / 172.17.43.56/bak / mntmount: / / 172.17.43.56/bakis write-protected, mounting read-onlymount: cannotmount / / 172.17.43.56/bak read-only [root@iZ2zeoecj5h3z0720hZ/] # cd mnt/ [root@iZ2zeoecj5h3z0720hZmnt] # lltotal 0 [root@iZ2zeoecj5h3z0720hZmnt] # cd.
# install cifs-utils
[root@iZ2zeoecj5h3z0720hZ /] # yum installcifs-utils.x86_64-y
# mount successfully again (requires the administrator password of the Windows server)
[root@iZ2zeoecj5h3z0720hZ /] # mount-t cifs-ousername= "administrator" / / 172.17.43.56/bak / mntPassword for administrator@//172.17.43.56/bak: * [root@iZ2zeoecj5h3z0720hZ /] # cd mnt/ [root@iZ2zeoecj5h3z0720hZ mnt] # ll-htotal 120G-rwxr-xr-x 1 root root 51G Oct 1818 ecyingusystem-20171018175058.bak-rwxr-xr-x 1 root root 9.8G Oct 1818: 17 ecyingusystem -20171018180614.bak-rwxr-xr-x 1 root root 9.2G Oct 1818: 51 ecyingusystem-20171018180614.rar
# there is no problem with copying the files in the mount directory
[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.bakdrwxr-xr-x 2root root 4096 Oct 16 17:12hsperfdata_root
# status after successful mount
[root@iZ2zeoecj5h3z0720hZ~] # df-hFilesystem Size Used Avail Use% Mounted on/dev/vda1 493G 116G 352G 25% / devtmpfs 1.9G 0 1.9G 0 / devtmpfs 1.9G 0 1.9G 0 0 / dev/shmtmpfs 1.9G 604K 1.9G 1% / runtmpfs 1.9G 0 1.9G 0 / sys/fs/cgrouptmpfs 380M 0380M 0% / run/user/0//172.17.43.56/bak 420G 224G 196G 54% / mnt
Reference documentation:
Several methods of Mutual access between http://os.51cto.com/art/201408/449273.htm--Windows and Linux File system
Http://blog.csdn.net/yasi_xi/article/details/38356247--inux mountWindows directory encountered a write-protected problem