1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

LXCゲスト環境からwebdavがマウントできないので、LXCホストからbindしてアクセスする

Last updated at Posted at 2014-08-09

LXCゲストからwebdavフォルダをマウント

LXCゲストからwebdavフォルダ(ReadyNAS)をマウントしようとすると、以下のエラーメッセージが出力される。

mount -t davfs https://path/to/webdav /mnt/webdav/
Username:
Password:
Accept certificate for this session? [y,N]
/sbin/mount.davfs: can't open fuse device
/sbin/mount.davfs: trying coda kernel file system
/sbin/mount.davfs: no free coda device to mount

ゲスト、ホストともにfuseはサポート済みだが解決策が不明。
ホスト側では問題なくマウント可能のため、
ホスト側のマウントしたディレクトリをゲストへbindしてアクセスさせる。

ホスト側設定

上記の手順でwebdavフォルダをマウントした後、
LXCゲストのfstabに以下を追加

/var/lib/lxc/guest/fstab
/path/to/hostdir path/to/guestdir none bind,create=dir

ゲスト側(path/to/guestdir)は相対パスであることに注意する。

参考:LXC 1.0: コンテナーの高度な使い方 [3/10]

ゲスト側確認

LXCを再起動するとマウントされている。

lxc-guest:/path/to# df
ファイルシステム                  1K-ブロック     使用    使用可 使用% マウント位置
https://path/to/webdav          26666664 13333332  13333332   50% /path/to/guestdir
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?