nfs: NCM component for /etc/exports and /etc/fstab


The nfs component manages entries for NFS in the /etc/exports and NFS/PanFS/bind mount in the /etc/fstab files.


  • /software/components/nfs/exports

    This is a list of named lists with "path" giving the export path and "hosts" being a nlist of host/option entries where the key is the escaped host name and the value the export options(e.g. for "", key will be escape("") and value will be 'rw'). Note that the values in "hosts" may NOT contain embedded spaces and should not contain the enclosing '()'. This restriction is not checked in the schema!

    If a path is listed more than once, then the last entry will be used to generate the exports file.

  • /software/components/nfs/mounts

    This is a list of named lists. The named lists must include values for "device", "mountpoint", and "fstype". The named lists may contain values for "options", "freq", and "passno". the defaults being "defaults", 0, and 0, respectively.

    If a device is listed multiple times, then the last entry will be used to generate a line in the /etc/fstab file. Entries are added in the order given in the list AFTER preexisting entries in the fstab file.

    If the mounts change, then the component will attempt to unmount any mounts which are removed and mount any new ones. If the options change, then the volume will be remounted.


prefix "/software/components/nfs";
"/software/components/nfs/exports" = append(dict(
    "path", "/shared/path/",
    "hosts", dict(
        "server*", "no_root_squash",

"mounts" = append(SELF, dict(
    "device", "",
    "mountpoint", "/mnt/foreign",
    "fstype", "nfs",
    "options", "rw",