exportfs(8) - 使い方

NFSでエクスポートするファイルシステムのリストを管理。
  • ディレクトリをエクスポートする
    [root@localhost ~]# service nfs start
    NFS サービスを起動中:                                      [  OK  ]
    NFS クォータを起動中:                                      [  OK  ]
    NFS デーモンを起動中:                                      [  OK  ]
    NFS mountd を起動中:                                       [  OK  ]
    [root@localhost ~]# showmount -e
    Export list for localhost.localdomain:
    [root@localhost ~]# exportfs *:/home/owner
    [root@localhost ~]# showmount -e
    Export list for localhost.localdomain:
    /home/owner *
    [root@localhost ~]#
  • ディレクトリをアンエクスポートする
    [root@localhost ~]# showmount -e
    Export list for localhost.localdomain:
    /home/owner *
    [root@localhost ~]# exportfs -u *:/home/owner
    [root@localhost ~]# showmount -e
    Export list for localhost.localdomain:
    [root@localhost ~]#
  • 最新の/etc/exports内容を反映する
    [root@localhost ~]# cat /etc/exports
    /home/owner *(ro)
    [root@localhost ~]# exportfs -r
    [root@localhost ~]# showmount -e
    Export list for localhost.localdomain:
    /home/owner *
    [root@localhost ~]# vi /etc/exports
    ...
    [root@localhost ~]# cat /etc/exports
    /home/owner localhost(ro)
    [root@localhost ~]# exportfs -r
    [root@localhost ~]# showmount -e
    Export list for localhost.localdomain:
    /home/owner localhost.localdomain
    [root@localhost ~]#

コメント