labunix's blog

labunixのラボUnix

debian bookwormにfuse-sshfsを導入する

■debian bookwormにfuse-sshfsを導入する

$ lsb_release -d
No LSB modules are available.
Description:	Debian GNU/Linux 12 (bookworm)

$ apt-cache search sshfs
sshfs - SSH ファイル転送プロトコルを元にしたファイルシステムクライアント
4pane - four-pane detailed-list file manager
backintime-common - simple backup/snapshot system (common files)
vagrant-sshfs - vagrant plugin that adds synced folder support with sshfs

■以前にもやっていたことなので。。。

 CentOS7にfuse-sshfsを導入する。
 https://labunix.hateblo.jp/entry/20200608/1591545991

 sshfsでESXi6.0U2の内蔵HDD(datastore1)を有効活用する。
 https://labunix.hateblo.jp/entry/20170424/1493039845

■sshfsのインストール

$ sudo apt-get install -y sshfs

■マウント先のディレクトリを作成してマウント

$ mkdir target-host
$ sshfs target-host:/home/labunix ~/target-host/

$ df -h | grep host
target-host:/home/labunix   1.8T  1.7T   27G   99% /home/labunix/target-host

■アンマウントだけ注意

$ fusermount -u ~/target-host
$ df -h | grep host