O'Reilly logo

Learning RHEL Networking by Andrew Mallett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using exportfs to create temporary exports

It's not always desirable to create permanent exports within the /etc/exports file. Should you want to define a new export temporarily, you can use the exportfs command. As we have already defined the NFS root to be /var/exports, all directories that we export must be after that structure. Let's temporarily export /var/export/doc to all hosts. We can do so using the following command:

$ sudo exportfs *:/var/exports/doc

On the next restart of nfs-server, this export will be lost; however, if you need to delete it ahead of this, you can implement the following command:

$ sudo exportfs -u *:/var/exports/doc

Should you need to include export options with the temporary export, use the -o option in a similar ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required