Help us understand the problem. What is going on with this article?

macOS Catalina で NFS が動かない問題に対応する

原因

  • NFS パスの先頭に /System/Volumes/Data/ をつけることで回避できる

対応手順

/etc/exports を編集する

要 root

/etc/exports_変更例.diff
- "/Users/user/hoge/fuga" localhost -alldirs -mapall=501:20
+ "/System/Volumes/Data/Users/user/hoge/fuga" localhost -alldirs -mapall=501:20
  • パスの先頭に /System/Volumes/Data を追加した形
  • nfsd checkexports でエラーがないか確認できる

変更を反映

sudo nfsd restart
  • showmount -e でエクスポートしているディレクトリ一覧が確認できる
    • 何も出てこないと間違っている可能性がある

Docker や Vagrant の NFS 設定を更新

  • NFS の設定パスの先頭に /System/Volumes/Data/ を追加
    • 下記は手元の docker-compose.yml の例
  • 変更後 docker-compose を再読み込み
docker-compose.yml.diff
      driver: local
      driver_opts:
        type: nfs
        o: addr=host.docker.internal,actimeo=1
-       device: ":${PWD}/app/hoge"
+       device: ":/System/Volumes/Data${PWD}/app/hoge"
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away