メインコンテンツへ移動
AnyStorage
無料ダウンロード

rclone

rclone mount の FUSE エラー:三 OS 別の対処

fusermount3 が無い、cgofuse が winfsp を見つけられない、mount point in use、macFUSE 未導入。各エラーの真因と、その全部に共通するドライバー要件。

rclone mount が各プラットフォームで出す四つの FUSE エラー、rclone 自身のドキュメントが要求するもの、そしてローカル WebDAV ならドライバーが不要な理由。

rclone mount fuse エラー、fusermount3 not found、cgofuse cannot find winfsp

四つのエラー、要件は一つ

rclone mount は実のところ rclone の機能ではありません。rclone が動かしているファイルシステムドライバーの機能で、以下のエラーはすべて、そのドライバー層が協力を拒んでいる音です。実際に遭遇する四つを、報告されたままの形で並べます。

text

Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount3": executable file not found in $PATH

text

panic: cgofuse: cannot find winfsp

text

Cannot create WinFsp-FUSE file system: mount point in use.
Fatal error: failed to mount FUSE fs: mount stopped before calling Init: mount failed

text

NOTICE: mount helper error: fusermount3: mount failed: Permission denied
CRITICAL: Fatal error: failed to mount FUSE fs: fusermount: exit status 1
エラー・プラットフォーム・原因・対処
エラープラットフォーム原因対処
fusermount3 ... not found in $PATHLinuxFUSE 3 のユーザー空間ツールが未導入fuse3 パッケージを入れる
mount helper error: fusermount3: mount failed: Permission deniedLinux新しめの Ubuntu の AppArmor 制限sudo aa-disable /usr/bin/fusermount3
cgofuse: cannot find winfspWindowsWinFsp が未導入WinFsp をインストール
mount point in useWindows対象フォルダーが既に存在する削除する、または空きドライブレターを使う
/dev/fuse が無い、何もマウントされないmacOSmacFUSE か FUSE-T が無いどちらかを入れ、拡張を承認する
マウントはできるが書き込みで止まる/エラー全 OSVFS キャッシュモードが用途に足りない--vfs-cache-mode writesfull

Linux:まずツール、次に AppArmor

一つ目は書いてあるとおりです。rclone は FUSE のマウントヘルパーを外部コマンドとして呼び、FUSE 3 のシステムではそのバイナリ名が fusermount3 です。最小構成のコンテナやアプライアンス系ディストリでよく欠けており、無ければ rclone 側の設定は何の意味も持ちません。

sh

which fusermount fusermount3
sudo apt install fuse3        # Debian, Ubuntu
sudo dnf install fuse3        # Fedora, RHEL

二つ目は新しめの症状で、rclone のマウントドキュメント自身が名指ししています。「On newer versions of Ubuntu, you may encounter the following error when running rclone mount」——続くのが上の mount helper error の文です。文書化された原因は AppArmor で、「This may be due to newer Apparmor restrictions, which can be disabled with sudo aa-disable /usr/bin/fusermount3 (you may need to sudo apt install apparmor-utils beforehand).」

アンマウントも同じヘルパーを使います。半端に死んだマウントポイントは次回に紛らわしいエラーを生むので、覚えておく価値があります。

sh

fusermount -u /path/to/local/mount
fusermount3 -u /path/to/local/mount

Windows:WinFsp は任意ではない

rclone のドキュメントは明快です。「To run rclone mount on Windows, you will need to download and install WinFsp. WinFsp is an open-source Windows File System Proxy which makes it easy to write user space file systems for Windows. It provides a FUSE emulation layer which rclone uses in combination with cgofuse.」

無ければ出るのが panic: cgofuse: cannot find winfsp のスタックトレースです。丁寧なメッセージではなく panic なのは、FUSE 層の初期化すらできないからです。WinFsp 自身は「system software that provides runtime and development support for custom file systems on Windows computers」と自己紹介しており、UNIX 系の FUSE に相当するものだと説明しています。入れて、必要なら再起動して、もう一度。

Windows 側の二つ目は別種です。Cannot create WinFsp-FUSE file system: mount point in use. はたいてい、指定したフォルダーが既に存在するという意味です。報告者は自力で二分で解決しています。「All I have to do is make sure that the mount folder does not exist. I already created the folder hence the error.」本当に空いているドライブレターを使うのも同じく有効です。

powershell

rclone mount remote: X: --vfs-cache-mode writes
rclone mount remote: C:\path\parent\mount --vfs-cache-mode writes

macOS:ドライバーは二つ、選ぶのは一つ

macOS では rclone が三つの選択肢を挙げ、トレードオフまで正確に書いています。「Mounting on macOS can be done either via built-in NFS server, macFUSE (also known as osxfuse) or FUSE-T. macFUSE is a traditional FUSE driver utilizing a macOS kernel extension (kext). FUSE-T is an alternative FUSE system which 'mounts' via an NFSv4 local server.」

判断材料はこの一文でほぼ足ります。macFUSE はカーネル拡張なので、現行 macOS ではシステム設定での承認と、多くの場合再起動が必要です。FUSE-T はそれを避けます。プロジェクト側は「Kext-less design with no kernel extension required」と説明し、NFS・SMB・ネイティブ FSKit をバックエンドとするローカルサーバー経由でマウントします。

どちらも癖はあり、rclone はそれも列挙しています。FUSE-T では、プロジェクト wiki の記述として「File access and modification times cannot be set separately as it seems to be an issue with the NFS client which always modifies both」——つまり Finder がマウントを覗くだけで更新時刻が変わり、rclone がファイル全体を再アップロードしかねません。また --read-only での書き込みは「fail silently as opposed to with a clear warning as in macFUSE」です。

dmg ではなく MacPorts で macFUSE を入れた場合、rclone がライブラリを見つけるための追加手順が文書化されています。

sh

sudo mkdir /usr/local/lib
cd /usr/local/lib
sudo ln -s /opt/local/lib/libfuse.2.dylib

マウントできたのに挙動が変なとき

ドライバーが入った後の不満は、ほとんど VFS キャッシュの話です。rclone は四つのモードを文書化していて、違いは小さくありません。--vfs-cache-mode off は「read directly from the remote and write directly to the remote without caching anything on disk」。minimal は「very similar to 'off' except that files opened for read AND write will be buffered to disk」。writes では「files opened for read only are still read directly from the remote, write only and read/write files are buffered to disk first」。full は「all reads and writes are buffered to and from disk」。

読み書き両用で開き、後方シークし、その場でリネームするアプリ——つまりほとんどのデスクトップソフト——には少なくとも writes が必要です。残りは full で直りますが、ディスクを払います。

ドライバーを消してしまう設計

このページのエラーはすべて、同じ設計上の選択から来ています。カーネルの中にファイルシステムドライバーを置くという選択です。ドライブを得る方法はもう一つあり、しかもこの三つの OS すべてで FUSE より歴史が長い——WebDAV です。三 OS ともインストール無しでマウントできます。

AnyStorage(v0.2.24;macOS 11 以降 / Windows 10 以降 / Ubuntu 20.04 以降)はその道を採っています。内蔵の WebDAV サーバーを http://127.0.0.1:3211 で動かし、アプリで開いている各接続——パススタイルとカスタムリージョンに対応した S3 互換エンドポイント、Cloudflare R2、MinIO、Backblaze B2、鍵認証の SFTP、WebDAV——がそのルート配下のフォルダーとして並びます。FUSE も WinFsp も macFUSE も、承認すべきカーネル拡張も、$PATHfusermount3 も不要。無料プランの接続数は 2 つ。

正直な注意点も一つ。OS 側の WebDAV クライアントにも固有の上限があり、Windows のリダイレクターには既定 50,000,000 バイトのファイルサイズ上限が文書化されています(50 MB 制限の記事)。ただしそれはドライバーのインストールではなくレジストリ値であり、この比較の要点はそこです。

WinFsp と rclone の cmount、両方必要ですか?

不要です。WinFsp を入れれば、rclone は cgofuse 経由で自動的に使います。Windows 側で他に設定することは、既に存在しないマウントポイントを選ぶこと以外ありません。

rclone には FUSE-T と macFUSE のどちらが良い?

macFUSE はカーネル拡張を伴う伝統的なドライバー、FUSE-T は kext 不要でローカル NFSv4 サーバー経由。カーネル拡張を承認できない/したくないなら FUSE-T、更新時刻の厳密さと読み取り専用時の明確なエラーが必要なら macFUSE です。

Docker の中だけ rclone mount が失敗します

コンテナには通常 /dev/fuse と必要な capability がありません。デバイスの受け渡しと SYS_ADMIN、そしてイメージ内の fuse3 パッケージが必要です。だから多くの人は、代わりにコンテナから WebDAV を出します。

ドライバーを一切入れられない場合の代替は?

rclone serve webdav などのローカル WebDAV サーバーを立て、それを OS のクライアントでマウントします。AnyStorage と同じ取引を、より多い部品数で行う形です。

次に読む