Subscribe

without specifying options how to export only a particular file system in /etc/exports?

I wante to export only a file system with all options specified in /etc/exports, I can use  the  command exportfs -io [options] path. However, since there are long options come with that path, I am wondering if there are any ways, I can only specify the path in /etc/exports, and don't need to specify the long options.

If I do exportfs -i path, it will export the file system, but all options get cut off.

Thank you!

Re: without specifying options how to export only a particular file system in /etc/exports?

The question is not clear. Do you wish to put all options into /etc/exports, or not? exportfs -i command is to "ignore" the options of a currently active export. If you want to pass all export options throgh CLI and write the same to /etc/exports file, try using "exportfs -p <options> <path>" (-p to make the export permanent). You may also check "man exportfs" to see what other options are available.

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Cannot find the answer you need? No need to open a support case - just CHAT and we’ll handle it for you.

Re: without specifying options how to export only a particular file system in /etc/exports?

Hi,

Hope the below link helps,

https://library.netapp.com/ecmdocs/ECMP1511537/html/man1/na_exportfs.1.html

Thanks

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: without specifying options how to export only a particular file system in /etc/exports?

the file system and along with the long options already in /etc/exports file. After I made a change, I want to re-export the entire entry, including options, but without typing the long options in the command line.

Since the entry is already in the file, and -p will add the entry in the file, so -p could not do the job.

hope it is more clear this time.

Re: without specifying options how to export only a particular file system in /etc/exports?

unexport only one directory by "exportfs -u <path> ( if you wish to do so)  and export all with "exportfs -a"

or use exportfs -r (exports which has no persistent entry in /etc/exports will be unexported if using -r)

from the man page,

-r
      Exports all file system paths specified in the /etc/exports file and unexports all file system paths not specified in the /etc/exports file. To export all file system paths specified in the /etc/exports file without unexporting any file system paths, use the -a option instead. Note: Data ONTAP re-exports a file system path only if its persistent export options (those specified in the /etc/exports file) are different from its current export options, thus ensuring that it does not expose NFS clients unnecessarily to a brief moment during a re-export in which a file system path is not available.
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Cannot find the answer you need? No need to open a support case - just CHAT and we’ll handle it for you.