API Doc
Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary

Managing NFS files

Creating an NFS file

Procedure

Run the following command on any node in the cluster to create an NFS file:

zbs-nfs file create <parent_id> <name>

Output example

-----------------  ------------------------------------
id                 fe4daff8-9cd3-494e
name               nfs4
pool               f6722181-7eb8-4ab4-ac39-7a06d29f6890
preallocate        False
volume             fe4daff8-9cd3-494e-8d22-bd5a4af2e54d
type               FILE
Encrypt Method     ENCRYPT_PLAIN_TEXT
mode               432
uid                0
gid                0
size               0.00 B
perf unique size   In Process
perf shared size   In Process
cap unique size    In Process
cap shared size    In Process
logical used size  In Process
prioritized        False
downgraded_prs     0.00 B
-----------------  ------------------------------------

Output note

ParameterDescription
preallocateWhether it is preallocated.
volumeThe ID of the allocated volume.
typeValid values: FILE or DIR.
Encrypt MethodThe data encryption algorithm of the file.
modeThe file permissions.
uidThe user ID.
gidThe group ID.
sizeThe file size.
perf unique sizeThe exclusive space occupied in the performance tier.
perf shared sizeThe performance tier space shared with other objects.
cap unique sizeThe exclusive space occupied in the capacity tier.
cap shared sizeThe capacity tier space shared with other objects.
logical used sizeThe allocated logical space.
prioritizedWhether all data is kept in the performance tier.
downgraded_prsThe space not yet promoted to the performance tier.

Cloning NFS files

Procedure

Run the following command on any node in the cluster:

zbs-nfs file clone <src_export_name> <src_path> <dst_export_name> <dst_path>

Output example

----------- -----------
id 6
name test1_clone
pool 7
preallocate False
volume 5
type 1
mode 420
uid 0
gid 0
size 2
----------- -----------

Output note

ParameterDescription
preallocateWhether the file is preallocated.
volumeThe ID of the volume allocated to the file.
typeThe file type.
modeThe file permissions.
uidThe user ID.
gidThe group ID.
sizeThe file size.

Increasing the NFS file replication factor

Procedure

Run the following command on any node in the cluster:

zbs-nfs file update [--replica_num REPLICA_NUM] <inode_id>

ParameterDescription
--replica_num REPLICA_NUMOptional. Resets the replication factor. Only increasing the replication factor is supported; decreasing it is not supported.
inode_idThe inode ID.

Output note

If the command succeeds, no output is displayed.

Converting NFS files to iSCSI LUNs

Procedure

Run the following command on a cluster node:

zbs-iscsi lun convert_from_nfs <target_name> <lun_id> <inode_path> [--lun_name <LUN_NAME>][--replica_num <REPLICA_NUM>][--thin_provision {true|false}] [--desc <DESC>] [--stripe_num <STRIPE_NUM>][--stripe_size <STRIPE_SIZE>]

ParameterDescription
target_nameThe name of the target to which the LUN belongs.
lun_idThe LUN ID.
inode_pathThe inode path.
--lun_name <LUN_NAME>Specifies the LUN name.
--replica_num <REPLICA_NUM>Specifies the LUN replication factor.
--thin_provision {true|false}Specifies whether the LUN is thin-provisioned.
--desc <DESC>The LUN description.
--stripe_num <STRIPE_NUM>The number of LUN stripes.
--stripe_size <STRIPE_SIZE>The size of each LUN stripe.

Output example

------------------  ------------------------------------
LUN Id              123
LUN Name            585db8a9-3054-4ca9-b93c-aa54ed4be3d3
Size                1024.00 MiB
Unique Size         In Process
Shared Size         In Process
Volume id           1664e191-c804-4911-98f5-4473ea3f0917
Replica Num         2
Creation Time       2022-11-22 19:46:28.676330094
Description
NAA                 3394d408ed191e466
Allowed Initiators  */*
Single Access       False
PR                  Details
Prefer CID          Unknown
------------------  ------------------------------------