NFSv3を使用する接続されたNFSサーバーがあり、NFSサーバーでNFSバージョンがNFSv4に更新されている場合は、DBMS_CLOUD_ADMIN.DETACH_FILE_SYSTEM、DBMS_CLOUD_ADMIN.ATTACH_FILE_SYSTEM(nfs_versionを4に設定したparamsパラメータを使用)を実行する必要があります。これにより、Autonomous DatabaseがNFSv4サーバーにアクセスできるように、一致するプロトコルでNFSがアタッチされます。デタッチしてから再アタッチしないと、NFSサーバーにアクセスできなくなり、"Protocol not supported"などのエラーが表示される場合があります。
Autonomous Databaseインスタンスに接続できるプライベート・サブネットで、Oracle Linux 8を含むOracle Cloud VMにNFSサーバーを設定します。
Compute Instance Image: Oracle-Linux-8.8-2023.09.26-0
$ sudo su -
$ mkdir /exports
$ chown nobody /exports
$ chgrp nobody /exports
# If the VM is using Linux 7, "data" directory may need having the privilege 777 so that ADB can have access to NFS.
uname -a
chmod 777 /exports/data
$ mkdir /exports/data
$ chown nobody /exports/data
$ chgrp nobody /exports/data
# Either the private IP or the private FQDN can be used in "/etc/exports".
# Both can be found in the information of the autonomous database on the OCI console.
$ tee -a /etc/exports <<'EOF'
/exports/data *(rw,insecure)
/exports/data example.adb.us-phoenix-1.oraclecloud.com(rw,insecure)
EOF
$ systemctl start nfs-server
$ systemctl enable nfs-server
# Configure the firewall to allow NFS connections. "public" is the default zone on Oracle Cloud VM.
$ firewall-cmd --get-default-zone
public
$ firewall-cmd --zone=public --add-service=nfs
$ firewall-cmd --permanent --zone=public --add-service=nfs
$ firewall-cmd --reload
# Display a list of the exported file systems.
$ showmount -e
# Displays all of the current clients and all of the file systems that the clients have mounted.
$ showmount -a