16
9

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.

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

Last updated at Posted at 2019-10-09

原因

  • 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"
16
9
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
16
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?