0
0

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 1 year has passed since last update.

Ubuntu22.04でAutofsを使ってNFS(主にQNAP製)上のホームディレクトリをマウントする方法

Posted at

起きる問題

一般的にいろいろ調べるとだいたいこんな感じの設定ファイルの書かれ方をする。

[auto.master]
/home /etc/auto.home --timeout=600
[auto.home]
*   -fstype=nfs,soft,rw,noatime,rsize=32768,wsize=32768 example.com:/home/&

こうやるとNFSのホームディレクトリをログインしたユーザーごとにマウントする、というものなのだが特定の条件下においてこれはうまくいかない。それがこれ
https://qiita.com/hello_yu_suzuki/items/4b0e4770d9396a6346df
要約すると

  • ubuntu22.04
    • 現行のnfs4.xを使おうとする
  • QNAPを使ってる
    • nfs4.0を使おうとする

ということでうまく接続できないので通常のNFS接続をするためにはverを4.0と指定しなければならない為、autofsでも同様の設定を行わなければらない。

解決策

上記であればauto.homeを以下のように変更すればよい。

[auto.home]
*   -fstype=nfs,vers=4.0,soft,rw,noatime,rsize=32768,wsize=32768 example.com:/home/&

分かってしまえば簡単だが、世の中のWebページにはNFSのバージョン指定を行っているものは存在しないので備忘録として記録しておく。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?