星空网 > 软件开发 > 操作系统

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]

 

 

Linux挂载NAS共享文件夹images/loading.gif' data-original="https://img2018.cnblogs.com/blog/1124359/201810/1124359-20181023152539633-965623550.png" />

 

 

[root@ftp:/root]
> yum install -y autofs
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
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package autofs.x86_64 1:5.0.7-83.el7 will be installed
--> Processing Dependency: libhesiod.so.0()(64bit) for package: 1:autofs-5.0.7-83.el7.x86_64
--> Running transaction check
---> Package hesiod.x86_64 0:3.2.1-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================
Package Arch Version Repository Size
===============================================================================================
Installing:
autofs x86_64 1:5.0.7-83.el7 base 811 k
Installing for dependencies:
hesiod x86_64 3.2.1-3.el7 base 30 k

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

Total download size: 840 k
Installed size: 5.1 M
Downloading packages:
(1/2): hesiod-3.2.1-3.el7.x86_64.rpm | 30 kB 00:00:01
(2/2): autofs-5.0.7-83.el7.x86_64.rpm | 811 kB 00:00:01
-----------------------------------------------------------------------------------------------
Total 479 kB/s | 840 kB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : hesiod-3.2.1-3.el7.x86_64 1/2
Installing : 1:autofs-5.0.7-83.el7.x86_64 2/2
Verifying : 1:autofs-5.0.7-83.el7.x86_64 1/2
Verifying : hesiod-3.2.1-3.el7.x86_64 2/2

Installed:
autofs.x86_64 1:5.0.7-83.el7

Dependency Installed:
hesiod.x86_64 0:3.2.1-3.el7

Complete!

[root@ftp:/root]
>

 

原标题:Linux挂载NAS共享文件夹

关键词:linux

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流