API Doc
Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary

Managing NFS Exports

Creating an NFS Export

Procedure

Run the following command on any node in the cluster to create an NFS Export with the specified name:

zbs-nfs export create <export_name>

Output example

---------------  ------------------------------------
ID               8dedc9e8-d1ed-4451-abb9-48bd0804734b
Name             ex5
Storage Pool     system
Creation Time    2024-06-18 14:59:54.769150602
Resiliency Type  RT_REPLICA
Encrypt Method   ENCRYPT_PLAIN_TEXT
Replica#         2
EC Param
Thin             True
Description
Whitelist        */*
Stripe Num       4
Stripe Size      262144
---------------  ------------------------------------

Output note

ParameterDescription
Resiliency TypeThe redundancy mode.
Replica#The replication factor in replication redundancy mode.
Encrypt MethodThe datastore encryption method.
EC ParamThe EC parameters in EC redundancy mode.
ThinWhether it is thin-provisioned.
DescriptionThe NFS Export description.
WhitelistThe IPv4 allowlist.
Stripe NumThe number of stripes.
Stripe SizeThe size of a single stripe. The unit: bytes.

Viewing NFS Exports

Procedure

Run the following command on any node in the cluster to view NFS Exports:

zbs-nfs export list

Output example

ID                                    Name                                                                Storage Pool    Creation Time                  Resiliency Type      Replica#  EC Param    Thin    Description         Whitelist                                 Stripe Num    Stripe Size
------------------------------------  ------------------------------------------------------------------  --------------  -----------------------------  -----------------  ----------  ----------  ------  ------------------  --------------------------------------  ------------  -------------
3d3b3d48-2e74-448e-8af0-9981c117e557  advanced-monitoring-instances-fef6f2ea-e2fd-44ba-ac17-f78555e74e7e  system          2024-06-17 14:09:59.169416063  RT_REPLICA                  3              True                        */*                                                4         262144
5a7f9661-ec37-4417-9277-4adcfaf26f55  zbs-images                                                          system          2024-06-17 14:12:43.298885514  RT_REPLICA                  3              True    Auto create export  10.2.234.196,10.2.234.198,10.2.234.197             4         262144
615b512f-5c66-436e-9139-a74a9d3ecf0b  nfs-volume-template                                                 system          2024-06-17 14:12:44.165056027  RT_REPLICA                  3              True    Auto create export  10.2.234.196,10.2.234.198,10.2.234.197             4         262144
8dedc9e8-d1ed-4451-abb9-48bd0804734b  ex5                                                                 system          2024-06-18 14:59:54.769150602  RT_REPLICA                  2              True                        */*                                                4         262144
b2640265-e6af-4854-9efb-4ccbbe7739ba  e1                                                                  system          2024-06-17 19:29:30.378361779  RT_REPLICA                  2              True                        */*                                                4         262144
ce75ff79-bb94-4ac5-8c61-1709bc3f925d  advanced-monitoring-images-fef6f2ea-e2fd-44ba-ac17-f78555e74e7e     system          2024-06-17 14:09:53.882235699  RT_REPLICA                  3              True                        */*                                                4         262144
f6722181-7eb8-4ab4-ac39-7a06d29f6890  zbs-volumes                                                         system          2024-06-17 14:12:43.740327641  RT_REPLICA                  3              True    Auto create export  10.2.234.198,10.2.234.197,10.2.234.196             4         262144

Output note

ParameterDescription
Resiliency TypeThe redundancy mode.
Replica#The replication factor in replication redundancy mode.
Encrypt MethodThe datastore encryption method.
EC ParamThe EC parameters in EC redundancy mode.
Stripe NumThe number of stripes.
ThinWhether it is thin-provisioned.
DescriptionThe NFS Export description.
WhitelistThe IPv4 allowlist.
Stripe SizeThe size of a single stripe. The unit: bytes.

Updating NFS Exports

Users can use commands to update the following information about NFS Exports:

  • Name, description
  • Provisioning mode
  • Replication factor
  • Allowlist

Procedure

Run the following command on any node in the cluster to update the NFS Export with the specified name:

zbs-nfs export update <export_name> [optional arguments]

Parameter Description
--new_name <new_name>

Renames the NFS Export from export_name to new_name. For example:

zbs-nfs export update Colour --new_name Couleur

Rename the NFS Export named Colour to Couleur.

--thin_provision {true|false}

Specifies whether the NFS Export is thin-provisioned. For example:

zbs-nfs export update Export-centre --thin_provision false

Specifies the NFS Export named Export-centre to be non-thin-provisioned.

--replica_num <replica_factor>

Resets the replication factor of the NFS Export. Valid values: 2 or 3. Values outside this range result in an error. For example:

zbs-nfs export update Organised-exporter --replica_num 3

Specifies the replication factor of the NFS Export named Organised-exporter to 2.

--des <description>

Updates the NFS Export description. For example:

zbs-nfs export update Organised-exporter --des "Organised-exporter"

Specifies the description of the NFS Export named Organised-exporter to Organised-exporter.

--whitelist <white_list>

Update the NFS Export allowlist. The IPs in the allowlist can access this NFS Export. Valid values:

  • A single IP, e.g., 192.168.67.25

  • A CIDR block, e.g., 192.168.10.0/24

  • */*: indicates that any IP can access this Export.

For example:

zbs-nfs export update zpp-exporter --whitelist */*

zbs-nfs export update zpp-exporter --whitelist 192.168.10.0/24

Output note

If the command succeeds, no output is displayed.

Deleting NFS Exports

Procedure

Run the following command on any node in the cluster to delete an NFS Export with the specified name:

zbs-nfs export delete <export_name>

Output note

If the command succeeds, no output is displayed.