找回密码
 加入我们
搜索
      
查看: 6581|回复: 24

[NAS] share一个不使用smb但超简单的存储扩容方案

[复制链接]
发表于 2023-4-6 11:12 | 显示全部楼层 |阅读模式
本帖最后由 BetaHT 于 2023-4-6 12:25 编辑

我的场景:单位抠,旧电脑容量大,新笔记本没有预留扩展位,加不了硬盘。同时不让使用smb。

方案,旧电脑装ubuntu,自启挂载ntfs分区,笔记本与旧电脑用网线直连,使用winscp通过ssh访问。

优点
0、特殊原因,绕开了samba,也绕开了收费win
1、充分的旧物利用,
2、不用把数据再挪来挪去
3、不吵
4、winscp功能强大,甚至有备份功能
5、ubuntu扩展潜力
6、ssh有密码保护,安全性相对高

缺点
1、无法everything直接检索
2、通过winscp操作,效率略低

update:
看到大伙力荐nfs,试了下,嘿嘿,一样用不了,和smb一样,能挂上但无法访问。也许是控制了,也许是配置不对。不过简单实用就好,ssh就很简单实用。
发表于 2023-4-6 11:24 | 显示全部楼层
你这说了好像ubuntu装不了samba服务器端一样,"apt install samba" 可还行?
发表于 2023-4-6 11:28 来自手机 | 显示全部楼层
T.JOHN 发表于 2023-4-6 11:24
你这说了好像ubuntu装不了samba服务器端一样,"apt install samba" 可还行?

apt-get吧
 楼主| 发表于 2023-4-6 11:33 | 显示全部楼层
T.JOHN 发表于 2023-4-6 11:24
你这说了好像ubuntu装不了samba服务器端一样,"apt install samba" 可还行?

前面漏说了,不让使用smb
发表于 2023-4-6 11:36 | 显示全部楼层

apt-get不能说不能用,只能说作为一个linux使用者,应该用apt而不是apt-get。正常的教程或者开源说明文档都不用apt-get
发表于 2023-4-6 11:39 来自手机 | 显示全部楼层
BetaHT 发表于 2023-4-6 11:33
前面漏说了,不让使用smb

为什么不让用smb?有啥版权问题 ?还是管理者随意?
发表于 2023-4-6 11:40 | 显示全部楼层
本帖最后由 T.JOHN 于 2023-4-6 11:42 编辑
BetaHT 发表于 2023-4-6 11:33
前面漏说了,不让使用smb


不让用smb可以用nfs,不让用nfs可以用webdav,每一个都比ssh专业。ssh是用来连shell用的,传文件只是兼职。
发表于 2023-4-6 11:42 来自手机 | 显示全部楼层
T.JOHN 发表于 2023-4-6 11:36
apt-get不能说不能用,只能说作为一个linux使用者,应该用apt而不是apt-get。正常的教程或者开源说明文档 ...

哈?!你这个“正常”哪来的,apt
 楼主| 发表于 2023-4-6 11:43 来自手机 | 显示全部楼层
crcrane 发表于 2023-4-6 11:39
为什么不让用smb?有啥版权问题 ?还是管理者随意?

smb有很多0-day的,单位一般要在受控网络下才能使用smb
发表于 2023-4-6 11:46 | 显示全部楼层
qjj2857 发表于 2023-4-6 11:42
哈?!你这个“正常”哪来的,apt

来自谷歌搜索的前三条结果
https://www.google.com/search?cl ... -get+apt+difference

1st result:
Again, unlike the apt update command, apt-get doesn't give the total number of packages available for upgrade. Also, it doesn't include any hint on the command to list these upgradable packages. Next, we'll download and install available updates using the apt-get upgrade command.

https://www.baeldung.com/linux/apt-vs-apt-get

2nd result
I hope I was able to explain the difference between apt and apt-get. In the end, to summarize the apt vs apt-get debate:

    apt is a subset of apt-get and apt-cache commands providing necessary commands for package management
    while apt-get won’t be deprecated, as a regular user, you should start using apt more often

https://www.howtogeek.com/791055 ... ifference-on-linux/

3rd result
The apt-get command isn’t updated often, and that’s a good thing. It has to maintain backward compatibility. Backward compatibility isn’t such a concern for apt. It is considered and treated as a user-facing command.

For day-to-day use, use apt.

https://itsfoss.com/apt-vs-apt-get-difference/
发表于 2023-4-6 11:48 | 显示全部楼层
你都搞 ubuntu 了,直接用 nfs 不好吗? ubuntu 下安装 nfs-server 也就是一条 apt 命令的事情,然后稍微配置一下 export 就好了。

linux 下还是别 ntfs 格式了,容易出各种问题,直接 ext4 吧。
发表于 2023-4-6 11:52 | 显示全部楼层
直接DAS不就完了
 楼主| 发表于 2023-4-6 11:59 来自手机 | 显示全部楼层
T.JOHN 发表于 2023-4-6 11:40
不让用smb可以用nfs,不让用nfs可以用webdav,每一个都比ssh专业。ssh是用来连shell用的,传文件只是兼职 ...

这是偏见哈。ssh是用于系统管理和文件传输的。它的文件管理全部依赖原系统,在我的场景里反而成了优点,简单无脑。
 楼主| 发表于 2023-4-6 12:04 来自手机 | 显示全部楼层
happysun110 发表于 2023-4-6 11:48
你都搞 ubuntu 了,直接用 nfs 不好吗? ubuntu 下安装 nfs-server 也就是一条 apt 命令的事情,然后稍微配 ...

这么多人是nfs粉丝啊,我一会也试试看
发表于 2023-4-6 14:56 | 显示全部楼层
BetaHT 发表于 2023-4-6 12:04
这么多人是nfs粉丝啊,我一会也试试看

nfs 是 linux 下标准的文件共享方式,等同于 smb 在 windows 下的定位。

smb 在 linux 下使用最大的麻烦是有些 smb 错误在windows下可以正常的纠正,在 linux 下就只能报错,甚至需要把硬盘拆下来放到windows下修正之后才能继续使用,这种问题一旦发生很麻烦的。
发表于 2023-4-6 15:49 | 显示全部楼层
BetaHT 发表于 2023-4-6 12:04
这么多人是nfs粉丝啊,我一会也试试看

啥单位啊,连内部SMB都禁,VLAN不好使吗?
Win现在对NFS的支持也不错了,挂载后跟SMB没什么区别,everything也能索引。
发表于 2023-4-6 15:51 | 显示全部楼层
qjj2857 发表于 2023-4-6 11:42
哈?!你这个“正常”哪来的,apt

这个是有说过尽可能不要加-get,但我自己还是习惯多手加上
发表于 2023-4-6 20:26 | 显示全部楼层
smb->nfs->iscsi
发表于 2023-4-7 13:02 来自手机 | 显示全部楼层
T.JOHN 发表于 2023-4-6 11:46
来自谷歌搜索的前三条结果
https://www.google.com/search?client=firefox-b-d&q=apt-get+apt+difference
...

“正常的教程或者开源说明文档”

我说的是这个,至于wiki和问答,不用你搜

我比较好奇的是哪个开源项目这么闲的蛋疼,会在readme中说apt和apt-get的事情
发表于 2023-4-7 13:12 | 显示全部楼层
装个 server 版,搞一个 iscsi ?
发表于 2023-4-27 23:22 | 显示全部楼层
nfs的效率高
发表于 2023-4-27 23:46 来自手机 | 显示全部楼层
如果有管理员权限的话,可以装fuse和sshfs,直接把ssh挂载来用。甚至可以试试net block device,或者iSCSI。
https://github.com/winfsp/winfsp
https://github.com/cloudbase/wnbd
发表于 2023-4-27 23:47 来自手机 | 显示全部楼层
crcrane 发表于 2023-4-6 11:28
apt-get吧


apt-get和apt都行,后者主要是给用户敲命令用,新版本可能会有改动,前者是给脚本用的,会保证命令兼容性
发表于 2023-4-28 02:09 来自手机 | 显示全部楼层
Sshfs了解下
发表于 2023-4-28 06:03 来自手机 | 显示全部楼层
vscode remote ssh
您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

Archiver|手机版|小黑屋|Chiphell ( 沪ICP备12027953号-5 )沪公网备310112100042806 上海市互联网违法与不良信息举报中心

GMT+8, 2025-2-2 22:41 , Processed in 0.012008 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2007-2024 Chiphell.com All rights reserved.

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