Change NFS mount options using chnfsmnt.

AIX offers tools that allow the administrator to change configration files without editing them directly, thus reducing the possibility of causing a service outage caused by a typo in the configuration file, as described in more detail here.

In this example I have a NFS client with a filesystem mounted from the server cosmos in order to change the mount options so that the filesystem is mounted with the options soft and bg (background) I use the following command instead of directly editing /etc/filesystems.

# chnfsmnt -f /cosmos -d /strom -h cosmos -w bg -S

-f Local mount point
-d Remote direcoty
-h Remote host name
-w fg/bg
-S Makes the mount a soft mount

The chnfsmnt command will edit the /etc/filesystems file and remount the filesystem with new options.

/etc/filesystems/ before chnfsmnt execution:

/cosmos:
        dev             = "/strom"
        vfs             = nfs
        nodename        = cosmos
        mount           = true
        options         = intr
        account         = false

After:

/cosmos:
        dev             = "/strom"
        vfs             = nfs
        nodename        = cosmos
        mount           = true
        options         = rw,bg,soft,intr
        account         = false
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: