sshfs

Docker container's sshfs mount freezes, but only when mounted by Python

浪尽此生 提交于 2021-02-07 12:49:21
问题 I have a development laptop ( Mint 19.3 ), and a test server ( Ubuntu 18.04.4 LTS ). The laptop is Docker version 19.03.5, build 633a0ea838 , the server is Docker version 19.03.12, build 48a66213fe I'm running Python 3.6 code inside the container, which uses subprocess (code below) to create an sshfs mount to a third server, after which the python code walks through the mounted directory. Everything works fine on my development laptop. But on the server, the directory mounts (and is seen with

How to install sshfs without sudo?

吃可爱长大的小学妹 提交于 2021-01-29 08:18:44
问题 I'm trying to build sshfs on a cluster where I don't have root access. Following these instructions I did: 1) Built and installed ninja and meson 2) Built libfuse with meson --prefix=/cluster/home/user/fuse The problem comes when trying to install libfuse ( ninja install ), which requires root credentials. I get the following error: Running custom install script '/cluster/home/user/fuse/libfuse/util/install_helper.sh /cluster/home/user/fuse/etc /cluster/home/user/fuse/bin /usr/lib/udev/rules

SSHFS使用实例

时间秒杀一切 提交于 2020-09-27 16:59:25
什么是SSHFS? SSHFS是一个通过SSH连接到服务器的 网络文件系统客户端 。 SSHFS允许您使用SFTP挂载远程文件系统。大多数VPS SSH服务器默认情况下都支持并启用此SFTP访问,因此SSHFS使用非常简单,无需在服务器端执行任何操作。 项目当前状态 SSHFS由所有主要的Linux发行版本提供,并且已经在多种系统上投入生产使用多年。但是,目前SSHFS没有任何活动的常规贡献者,并且存在许多已知问题(请参阅Bugtracker)。当前的维护者继续应用拉取请求并进行定期发布,但是不幸的是,除了解决高影响力的问题之外,它没有能力进行任何开发。报告错误时,请理解,除非您包含拉取请求或报告严重问题,否则您可能不会得到响应。 安装SSHFS 首先,从https://github.com/libfuse/sshfs/releases下载最新的SSHFS版本。在Linux和BSD上,您还需要安装libfuse 3.1.0或更高版本。在macOS上,您需要OSXFUSE。最后,您需要带有开发标头的Glib库(应该可以从操作系统的程序包管理器中获得)。 构建和安装,我们建议使用Meson(0.38版或更高版本)和Ninja。解压缩sshfs tarball之后,创建一个(临时)构建目录并运行Meson: $ mkdir build; cd build $ meson .. 通常

25个必须记住的SSH命令

*爱你&永不变心* 提交于 2020-08-07 19:07:50
http://www.cnblogs.com/weafer/archive/2011/06/10/2077852.html OpenSSH是SSH连接工具的免费版本。telnet,rlogin和ftp用户可能还没意识到他们在互联网上传输的密码是未加密的,但SSH是加密的,OpenSSH加密所有通信(包括密码),有效消除了窃听,连接劫持和其它***。此外,OpenSSH提供了安全隧道功能和多种身份验证方法,支持SSH协议的所有版本。 SSH是一个非常伟大的工具,如果你要在互联网上远程连接到服务器,那么SSH无疑是最佳的候选。下面是通过网络投票选出的25个最佳SSH命令,你必须牢记于心。 (注:有些内容较长的命令,在本文中会显示为截断的状态。如果你需要阅读完整的命令,可以把整行复制到您的记事本当中阅读。) 1、复制SSH密钥到目标主机,开启无密码SSH登录 ssh-copy-id user@host 如果还没有密钥,请使用ssh-keygen命令生成。 2、从某主机的80端口开启到本地主机2001端口的隧道 ssh -N -L2001:localhost:80 somemachine 现在你可以直接在浏览器中输入http://localhost:2001访问这个网站。 3、将你的麦克风输出到远程计算机的扬声器 dd if=/dev/dsp | ssh -c arcfour -C

sshfs, linux - how to mount with read-only access [closed]

荒凉一梦 提交于 2020-08-07 05:29:57
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Improve this question I need to mount other server via sshfs with read-only mode. My OS is Linux (Ubuntu). Is it possible to do that? My command used with that connection is: sudo sshfs user@123.123.123.123:/home/user /media/mountpoint/ -o allow_other After running that I have write

sshfs, linux - how to mount with read-only access [closed]

余生长醉 提交于 2020-08-07 05:28:32
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Improve this question I need to mount other server via sshfs with read-only mode. My OS is Linux (Ubuntu). Is it possible to do that? My command used with that connection is: sudo sshfs user@123.123.123.123:/home/user /media/mountpoint/ -o allow_other After running that I have write

sshfs, linux - how to mount with read-only access [closed]

梦想的初衷 提交于 2020-08-07 05:28:10
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Improve this question I need to mount other server via sshfs with read-only mode. My OS is Linux (Ubuntu). Is it possible to do that? My command used with that connection is: sudo sshfs user@123.123.123.123:/home/user /media/mountpoint/ -o allow_other After running that I have write

sshfs, linux - how to mount with read-only access [closed]

隐身守侯 提交于 2020-08-07 05:28:06
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Improve this question I need to mount other server via sshfs with read-only mode. My OS is Linux (Ubuntu). Is it possible to do that? My command used with that connection is: sudo sshfs user@123.123.123.123:/home/user /media/mountpoint/ -o allow_other After running that I have write

Mac上使用sshfs挂载远端目录到本地

天大地大妈咪最大 提交于 2020-04-21 02:26:17
最近换了一台新的工作电脑,用的是mac pro,但是开发呢又要在远程机器上,没办法,我只能想办法把它挂载到本地开发。我上网找了一下,发现可以用sshfs来挂载远端linux的目录到本地,挂载方法如下: 安装homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 安装sshfs brew install sshfs 发现报错了,丢失了osxfuse,先安装osxfuse(已安装请忽略) brew install Caskroom/cask/osxfuse 在重新安装sshfs 使用sshfs挂载远端目录到本地 sshfs - C - o reconnect user @hostname :remote_dir local_dir user 远程连接用户名 hostname 远程连接的主机名 remote_dir 远程目录 local_dir 本地目录 如果ssh的端口不是是22,加上-p xxx 之后你就可以去你的目录下看看是否挂载成功了,这样你就可以用本地编辑器打开敲写代码了,说明一下,你还可以用本地的软件,比如npm 相关问题 当我们的 mac 网络断开或者休眠或重启, 回来时发现挂载的失败了, 进入目录会提示 $ls

基于文件存储UFS的Pytorch训练IO五倍提升实践

我们两清 提交于 2020-03-28 00:45:10
我们在协助某AI客户排查一个UFS文件存储的性能case时发现,其使用的Pytorch训练IO性能和硬件的IO能力有很大的差距(后面内容有具体性能对比数据)。 让我们感到困惑的是: UFS文件存储,我们使用fio自测可以达到单实例最低10Gbps带宽、IOPS也可达到2w以上。该AI客户在高IOPS要求的AI单机小模型训练场景下,或者之前使用MXNet、TensorFlow框架时,IO都能跑到UFS理论性能,甚至在大型分布式训练场景中,UFS也可以完全胜任。 于是我们开启了和客户的一次深度联合排查。 初步尝试优化 一、调整参数: 基于上述情况,首先考虑是不是使用Pytorch的姿势不对?参考网上提到经验,客户调整batch_size、Dataloader等参数。 Batch_size 默认batch_size为256,根据内存和显存配置尝试更改batch_size大小,让一次读取数据更多,发现实际对效率没有提升。通过分析是由于batch_size设置与数据读取逻辑没有直接关系,IO始终会保留单队列与后端交互,不会降低网络交互上的整体延时(因为用的是UFS文件存储,后面会讲到为什么用)。 Pytorch Dataloader Pytorch框架dataloader的worker负责数据的读取和加载、分配。通过batch_sampler将batch数据分配给对应的worker