Linux挂载NAS共享文件夹

[root@ftp:/mnt]
> yum install rpcbind -y
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
base | 3.6 kB 00:00:00
epel | 3.2 kB 00:00:00
extras | 3.4 kB 00:00:00
salt-2016.11 | 2.9 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/3): epel/x86_64/updateinfo | 935 kB 00:00:00
(2/3): epel/x86_64/primary | 3.6 MB 00:00:02
(3/3): updates/7/x86_64/primary_db | 6.0 MB 00:00:03
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
epel 12742/12742
Resolving Dependencies
--> Running transaction check
---> Package rpcbind.x86_64 0:0.2.0-44.el7 will be installed
--> Processing Dependency: libtirpc >= 0.2.4-0.7 for package: rpcbind-0.2.0-44.el7.x86_64
--> Processing Dependency: libtirpc.so.1()(64bit) for package: rpcbind-0.2.0-44.el7.x86_64
--> Running transaction check
---> Package libtirpc.x86_64 0:0.2.4-0.10.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================
Package Arch Version Repository Size
===============================================================================================
Installing:
rpcbind x86_64 0.2.0-44.el7 base 59 k
Installing for dependencies:
libtirpc x86_64 0.2.4-0.10.el7 base 88 k

Transaction Summary
===============================================================================================
Install 1 Package (+1 Dependent package)

Total download size: 148 k
Installed size: 284 k
Downloading packages:
(1/2): rpcbind-0.2.0-44.el7.x86_64.rpm | 59 kB 00:00:01
(2/2): libtirpc-0.2.4-0.10.el7.x86_64.rpm | 88 kB 00:00:01
-----------------------------------------------------------------------------------------------
Total 107 kB/s | 148 kB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libtirpc-0.2.4-0.10.el7.x86_64 1/2
Installing : rpcbind-0.2.0-44.el7.x86_64 2/2
Verifying : libtirpc-0.2.4-0.10.el7.x86_64 1/2
Verifying : rpcbind-0.2.0-44.el7.x86_64 2/2

Installed:
rpcbind.x86_64 0:0.2.0-44.el7

Dependency Installed:
libtirpc.x86_64 0:0.2.4-0.10.el7

Complete!

[root@ftp:/mnt]
> systemctl restart rpcbind.service

[root@ftp:/mnt]
> systemctl enable rpcbind.service

[root@ftp:/mnt]
>

[root@ftp:/mnt]
> mount -o username=user01,password=1234567890 //192.168.31.20/share /mnt/nas

[root@ftp:/mnt]
> df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/centos_miwifi--r3l--srv-root xfs 47G 4.1G 43G 9% /
devtmpfs devtmpfs 226M 0 226M 0% /dev
tmpfs tmpfs 237M 16K 237M 1% /dev/shm
tmpfs tmpfs 237M 13M 224M 6% /run
tmpfs tmpfs 237M 0 237M 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 143M 872M 15% /boot
tmpfs tmpfs 48M 0 48M 0% /run/user/0
//192.168.31.20/share cifs 7.1T 3.4T 3.8T 48% /mnt/nas

[root@ftp:/mnt]

猜你喜欢

转载自www.cnblogs.com/liweiming/p/9836865.html