Creating NFS shares


  • The redundancy mode of an NFS share cannot be changed after its creation.


To create an NFS share

Admin panel

  1. Open the Storage services > NFS > Shares screen, and then click Add share.
  2. In the Add share window, specify a unique name and IP address, which must be unused and, if authentication is enabled, domain resolvable. In addition, this IP address should be within the network subnet of the node’s interface.

  3. To authenticate clients in an NFS share, do the following:

    1. Create a principal with its key table for the share in Kerberos KDC (Key Distribution Center), as described in Authenticating NFS share users via Kerberos.
    2. Upload the corresponding keytab file.

  4. Click Next.
  5. On the next step, specify the share size, in gibibytes, and redundancy parameters, such as a storage tier, failure domain, and redundancy mode. For users accessing exports, the share size will be the size of the file system.

  6. Click Add.

After the share is created, you can proceed to create NFS exports.

Command-line interface

Use the following command:

vinfra service nfs share create --node <node> --ip-address <ip_address> --size <size> --tier {0,1,2,3}
                                (--replicas <norm> | --encoding <M>+<N>) --failure-domain {0,1,2,3,4} 
                                [--krb-keytab <krb-keytab>] <name>
--node <node>
Node ID
--ip-address <ip_address>
IP address of the NFS share
--size <size>
NFS share size, in bytes. You can also specify the following units: KiB for kibibytes, MiB for mebibytes, GiB for gibibytes, TiB for tebibytes, and PiB for pebibytes.
--tier {0,1,2,3}
Storage tier (default: 0)
--replicas <norm>

Storage replication mapping in the format:

  • norm: the number of replicas to maintain (default: 1)
--encoding <M>+<N>

Storage erasure encoding mapping in the format:

  • M: the number of data blocks
  • N: the number of parity blocks
--failure-domain {0,1,2,3,4}
Storage failure domain (default: 0)
--krb-keytab <krb-keytab>
Kerberos keytab file
NFS share name

For example, to create the NFS share share1 with the IP address on the node with the ID 923926da-a879-5f56-1b24-1462917ed335, run:

# vinfra service nfs share create share1 --node 923926da-a879-5f56-1b24-1462917ed335 \
--ip-address --size 107374182400 --tier 0 --encoding 1+2 --failure-domain 1

The created NFS share will appear in the vinfra service nfs share list output:

# vinfra service nfs share list
| name   | ip_address    | node                                     |
| share1 | | cfgd_id: 1                               |
|        |               | has_configd: true                        |
|        |               | id: 923926da-a879-5f56-1b24-1462917ed335 |
|        |               | ip_address: node001.vstoragedomain       |