How to Use Autofs with Oracle RMAN and dNFS on Pure FlashBlade

See how to use autofs to manage access to FlashBlade NFS shares for use with Oracle Recovery Manager and Oracle Direct NFS.

Oracle

image_pdfimage_print

Autofs, also known as automounter, is a program designed to mount NFS shares. You can use it to mount Pure Storage® FlashBlade® NFS shares on demand whenever they’re accessed rather than having to maintain the mounts all the time. You can also use it to unmount filesystems after a period of inactivity on the mount, freeing up valuable system resources.

Keep reading for a walkthrough of using autofs to manage access to FlashBlade NFS shares for use with Oracle Recovery Manager (RMAN) and Oracle Direct NFS (dNFS).

autofs Installation

Install the autofs package.

This will create a number of files in /etc which you can see using ls -ls /etc/auto* for example:

The /etc/auto.master is the main configuration file and includes example mapping between mount points and a map file containing definitions of the remote filesystems that can be mounted.

Create Automounter Map

We can now create an automounter configuration for the NFS mount point and required timeout. Note: The file must end in .autofs otherwise it will be ignored.

Below is my file for my NFS mount of /mnt/orabkup referencing a map file called auto.fbnfs with a timeout of 180 (the default value is 300 seconds).

Create Map File

Below is a FlashBlade NFS share I’ve created as a destination for my Oracle RMAN backups.

FlashBlade NFS Share

To create the map file, I’ve provided my mounting options, the FlashBlade IP address, and FlashBlade (NFS) file system name.

This file can contain multiple mount points and shares as required. Just add additional lines. For example:

Access Mount Point

Before we try to access the mount point, let’s check it:

Now let’s move into the automount directory and repeat.

If we repeat for our DEMO mount point, we can see this also gets automounted.

Check autofs Auto unmount

Now let’s check the autofs unmount is working.

And wait…

And as if by magic, the mount has disappeared.

autofs and Oracle RMAN

What about RMAN? Can it use the automounter?

Good news: When the Oracle RMAN process tries to write to the NFS mount point, autofs detects the access and mounts the NFS share automatically as expected.

autofs and Oracle dNFS

Can Oracle dNFS work with autofs mounted NFS filesystems, without an /etc/fstab entry? Yes, Oracle can use the /etc/mtab -> /proc/self/mounts to see the active NFS share mounted by autofs and use it.

Let’s use some of the dNFS views I’ve previously blogged about to confirm Oracle dNFS is in use.

Summary

In this post, I’ve shown:

  • You can use autofs to automatically mount and unmount FlashBlade filesystems.
  • Autofs can detect when Oracle RMAN is requesting access to an NFS filesystem and mount the filesystem on demand.
  • Autofs can detect that the NFS filesystem is no longer required by RMAN and unmount the NFS share.
  • Oracle Direct NFS detects that RMAN is using an NFS share configured for use with dNFS and uses it.

Written By: