9 Configuring NFS Server on Oracle Database Appliance

If either NAS or Oracle Object Storage is not an option, then configure NFS on one of the Oracle Database Appliance to take a backup of the source database and to restore it as a standby on the target system.

NFS server must be configured on the bare system location of the primary and the standby, for both Oracle Data Guard on bare metal system or DB system.

Follow these steps:
  1. Create an ADVM volume on source bare metal system node0 as the grid operating system user.
    [grid@odabm1 ~]$ asmcmd 
    asmcmd> volcreate -G data -s 100G backup
    ASMCMD> volinfo -G data backup 
    Diskgroup Name: DATA 
    Volume Name: BACKUP 
    Volume Device: /dev/asm/backup-322 
    State: ENABLED 
    Size (MB): 102400 
    Resize Unit (MB): 64 
    Redundancy: HIGH 
    Stripe Columns: 8 
    Stripe Width (K): 4096 
    Usage: Mountpath:
  2. Format the volume as Oracle ACFS.
    [grid@odabm1 ~]$ mkfs -t acfs /dev/asm/backup-322 
    mkfs.acfs: version = 19.0.0.0.0 
    mkfs.acfs: on-disk version = 46.0 
    mkfs.acfs: volume = /dev/asm/backup-322 
    mkfs.acfs: volume size = 107374182400 ( 100.00 GB ) 
    mkfs.acfs: Format complete.
  3. Create a mount point on both nodes. Run the command on both nodes on the bare metal system:
    # mkdir /backup
  4. Register the file system with Oracle Clusterware and start it as root operating system user.
    [root@odabm1 ~]# /u01/app/19.15.0.0/grid/bin/srvctl add filesystem -d /dev/asm/backup-322 -path /backup -mountowner oracle -mountgroup dba 
    [root@odabm1 ~]# /u01/app/19.15.0.0/grid/bin/srvctl start filesystem -d /dev/asm/backup-322
  5. Append to /etc/exports on node0 on the bare metal system and make it active.
    [root@odabm1 ~]# vi /etc/exports 
    /backup *(rw,sync,no_root_squash) 
    
    //or add each source and target nodes separately:
    /backup primary1(rw,sync,no_root_squash) 
    /backup primary2(rw,sync,no_root_squash) 
    /backup standby1(rw,sync,no_root_squash) 
    /backup standby2(rw,sync,no_root_squash)
     
    //where primary1, primary2 nodes refer to the nodes hosting the primary database and standby1, 
    //standby2 refer to the nodes hosting the standby
    [root@odabm1 ~]# exportfs -a 
    [root@odabm1 ~]# exportfs -v 
    ... 
    /backup *(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,no_root_squash,no_all_squash)
  6. Create a mount point on the source and the target nodes using the same mount point name.
    # mkdir /odabackup
  7. Mount the file system on both nodes using the public IP address of node0 on the source bare metal system.
    # mount -t nfs 192.168.17.2:/backup /odabackup
  8. As the oracle user ID may be different between the source and target, create a subfolder under /odabkp and change the ownership to oracle:dba on it.
    # mkdir /odabackup/db 
    
    If the DB is TDE enabled, then one more folder is required:
    # mkdir /odabackup/tde 
    # chown -R oracle:dba /odabackup
  9. After configuring NFS on both source and target, follow the Oracle Data Guard configuration process till the step to restore the database as a standby.
  10. Before restoring the database, change the ownership to oracle:dba on the target. The user and group IDs may be different between the source and target.
    # chown -R oracle:dba /odabackup
  11. Complete the Oracle Data Guard configuration.
  12. After configuring Oracle Data Guard, revert all NFS-related changes.
    1. Unmount /odabackup on source and target nodes.
      # unmount /odabackup
    2. Unmount /backup on all bare metal system nodes.
      # unmount /backup
    3. Remove /backup from /etc/exports.
    4. Update the NFS configuration on the first bare metal system node.
      [root@odabm1 ~]# exportfs -a
    5. Delete the backup Oracle ACFS file system from the Oracle Clusterware configuration.
      [root@odabm1 ~]# /u01/app/19.15.0.0/grid/bin/srvctl stop filesystem -d /dev/asm/backup-322 
      [root@odabm1 ~]# /u01/app/19.15.0.0/grid/bin/srvctl remove filesystem -d /dev/asm/backup-322
    6. Delete the backup related Oracle ADVM volume as the grid operating system user on the bare metal system node.
      [grid@odabm1 ~]$ asmcmd 
      ASMCDM> voldelete -G data backup
    7. Reassign the original backup configuration to the primary database. By default, the value is default.
      [root@proddb1 ~]# odacli modify-database -in databasename -bin default