6.3.3.5.4. サブディレクトリーのエクスポート
以下の 2 つの方法のいずれかに従って、NFS-ganesha にサブディレクトリーをエクスポートすることができます。
方法 1: 個別のエクスポートファイルを作成します。これにより、他の共有に接続された既存のクライアントを中断せずにサブディレクトリーの共有をエクスポートします。
- サブディレクトリー用の個別のエクスポートファイルを作成します。
# cat export.ganesha-dir.conf # WARNING : Using Gluster CLI will overwrite manual # changes made to this file. To avoid it, edit the # file and run ganesha-ha.sh --refresh-config. EXPORT{ Export_Id = 3; Path = "/ganesha/dir"; FSAL { name = GLUSTER; hostname="localhost"; volume="ganesha"; volpath="/dir"; } Access_type = RW; Disable_ACL = true; Squash="No_root_squash"; Pseudo="/ganesha/dir"; Protocols = "3", "4"; Transports = "UDP","TCP"; SecType = "sys"; }
Export_ID
を一意の未使用の ID に変更します。Path
およびPseudo
パラメーターを編集して、volpath エントリーをエクスポートファイルに追加します。- サブディレクトリーに新しいエクスポートファイルを作成した場合は、
ganesha.conf
ファイルにそのエクスポートファイルを追加する必要があります。%include "/var/run/gluster/shared_storage/nfs-ganesha/exports/export.<share-name>.conf"
注記3.5 Batch Update 3 のリリースにより、共有ストレージのマウントポイントが /var/run/gluster/ から /run/gluster/ に変更されました。以下に例を示します。%include "/var/run/gluster/shared_storage/nfs-ganesha/exports/export.ganesha.conf" --> Volume entry %include >/var/run/gluster/shared_storage/nfs-ganesha/exports/export.ganesha-dir.conf" --> Subdir entry
- 以下のスクリプトを実行して、他の共有に接続した既存のクライアントを中断せずにサブディレクトリー共有をエクスポートします。
# /usr/libexec/ganesha/ganesha-ha.sh --refresh-config <HA_CONF_DIR> <share-name>
以下に例を示します。/usr/libexec/ganesha/ganesha-ha.sh --refresh-config /run/gluster/shared_storage/nfs-ganesha/ ganesha-dir
方法 2: そのサブディレクトリーエントリーを含むボリュームエクスポートファイルを編集します。このメソッドは、親ボリュームではなく、サブディレクトリーのみをエクスポートします。
- subdir エントリーでボリュームエクスポートファイルを編集します。以下に例を示します。
# cat export.ganesha.conf # WARNING : Using Gluster CLI will overwrite manual # changes made to this file. To avoid it, edit the # file and run ganesha-ha.sh --refresh-config. EXPORT{ Export_Id = 4; Path = "/ganesha/dir1"; FSAL { name = GLUSTER; hostname="localhost"; volume="ganesha"; volpath="/dir1"; } Access_type = RW; Disable_ACL = true; Squash="No_root_squash"; Pseudo="/ganesha/dir1"; Protocols = "3", "4"; Transports = "UDP","TCP"; SecType = "sys"; }
Export_ID
を一意の未使用の ID に変更します。Path
およびPseudo
パラメーターを編集して、volpath エントリーをエクスポートファイルに追加します。- 以下のスクリプトを実行して、他の共有に接続した既存のクライアントを中断せずにサブディレクトリー共有をエクスポートします。
# /usr/libexec/ganesha/ganesha-ha.sh --refresh-config <HA_CONF_DIR> <share-name>
以下に例を示します。/usr/libexec/ganesha/ganesha-ha.sh --refresh-config /run/gluster/shared_storage/nfs-ganesha/ ganesha
注記同じエクスポートファイルに複数の EXPORT{} エントリーが含まれる場合は、ボリュームの再起動または nfs-ganesha サービスの再起動が必要です。
6.3.3.5.4.1. all_squash オプションの有効化
all_squash を有効にするには、以下のパラメーターを編集します。
Squash = all_squash ; # To enable/disable root squashing