找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 23029|回复: 369

【分享】玩客云刷armbian后通过cifs网络挂载NAS或者路由器的共享文件夹

 火... [复制链接]
发表于 2021-6-9 07:03 | 显示全部楼层 |阅读模式
本帖最后由 rad 于 2021-6-9 10:33 编辑

【分享】玩客云刷armbian后通过cifs网络挂载NAS或者路由器的共享文件夹

以下为实现步骤:
1、安装cifs-utils。命令为:
  1. apt-get install cifs-utils
复制代码


2、挂载nas或者路由器、电脑共享的文件夹。参考命令(IP地址、文件夹、用户名、密码改成自己的,如果挂载不成功可尝试版本改为 vers=1.0):
  1. mount.cifs //192.168.6.1/nas /mnt/nas -o username=user,password=password,vers=2.0
复制代码

3、设置开机自动挂载。步骤如下:①在/etc/rc.local的exit 0前加入上面测试好的挂载命令:
  1. #!/bin/sh -e
  2. #
  3. # rc.local
  4. #
  5. # This script is executed at the end of each multiuser runlevel.
  6. # Make sure that the script will "exit 0" on success or any other
  7. # value on error.
  8. #
  9. # In order to enable or disable this script just change the execution
  10. # bits.
  11. #
  12. # By default this script does nothing.

  13. sleep 10

  14. mount.cifs //192.168.6.1/nas /mnt/nas -o username=user,password=password,vers=2.0

  15. exit 0
复制代码



②补全rc-local.service文件使其能够开机运行。在/lib/systemd/system/rc-local.service的最后加上:
[Install]
WantedBy=multi-user.target

  1. #  SPDX-License-Identifier: LGPL-2.1+
  2. #
  3. #  This file is part of systemd.
  4. #
  5. #  systemd is free software; you can redistribute it and/or modify it
  6. #  under the terms of the GNU Lesser General Public License as published by
  7. #  the Free Software Foundation; either version 2.1 of the License, or
  8. #  (at your option) any later version.

  9. # This unit gets pulled automatically into multi-user.target by
  10. # systemd-rc-local-generator if /etc/rc.local is executable.
  11. [Unit]
  12. Description=/etc/rc.local Compatibility
  13. Documentation=man:systemd-rc-local-generator(8)
  14. ConditionFileIsExecutable=/etc/rc.local
  15. After=network.target

  16. [Service]
  17. Type=forking
  18. ExecStart=/etc/rc.local start
  19. TimeoutSec=0
  20. RemainAfterExit=yes
  21. GuessMainPID=no

  22. [Install]
  23. WantedBy=multi-user.target
复制代码


③重启机器,看能否开机自动挂载。如果还不行可以在SSH依次输入以下命令:
  1. sudo chmod +x /etc/rc.local

  2. sudo systemctl enable rc-local

  3. sudo systemctl start rc-local.service

  4. sudo systemctl status rc-local.service
复制代码


注:本文内容参考了以下文章:
http://www.ltk100.com/forum.php? ... n=printable&tid=235
https://blog.csdn.net/sea_snow/article/details/51051289
https://blog.csdn.net/Bennett_Doris/article/details/108337249


到此大功告成。此方法可以解决玩客云usb2.0的传输速度瓶颈。



评分

参与人数 2恩山币 +2 收起 理由
kuhoo + 1 亲测可用
aisong220 + 1 感谢你的分享,无论怎样,你都是最无私的人!来,说说,你E盘上还有啥一起给我吧!

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
发表于 2021-6-9 08:43 | 显示全部楼层
玩客云刷armbian后
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 09:44 | 显示全部楼层
酷酷酷看看
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 09:46 | 显示全部楼层
谢谢大佬分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 09:55 | 显示全部楼层
看看突突突突突突
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 10:06 | 显示全部楼层
谢谢分享……
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 10:09 | 显示全部楼层
俺来学习学习
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 10:11 | 显示全部楼层
看看学习学习
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 11:06 | 显示全部楼层
谢谢大佬分享!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 11:28 | 显示全部楼层
感谢分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 11:39 | 显示全部楼层
看看怎么解决usb2.0传输的物理瓶颈那么厉害,预判这是不可能的
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 16:09 | 显示全部楼层
看看吧,谢谢分享
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 17:26 | 显示全部楼层
谢谢楼主无私奉献
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 17:33 | 显示全部楼层
什么意思?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2021-6-9 17:39 | 显示全部楼层
玩客云刷armbian后
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-24 17:33

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表