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
| Parameter | Description |
|---|---|
preallocate | Whether it is preallocated. |
volume | The ID of the allocated volume. |
type | Valid values: FILE or DIR. |
Encrypt Method | The data encryption algorithm of the file. |
mode | The file permissions. |
uid | The user ID. |
gid | The group ID. |
size | The file size. |
perf unique size | The exclusive space occupied in the performance tier. |
perf shared size | The performance tier space shared with other objects. |
cap unique size | The exclusive space occupied in the capacity tier. |
cap shared size | The capacity tier space shared with other objects. |
logical used size | The allocated logical space. |
prioritized | Whether all data is kept in the performance tier. |
downgraded_prs | The space not yet promoted to the performance tier. |
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
| Parameter | Description |
|---|---|
preallocate | Whether the file is preallocated. |
volume | The ID of the volume allocated to the file. |
type | The file type. |
mode | The file permissions. |
uid | The user ID. |
gid | The group ID. |
size | The file size. |
Procedure
Run the following command on any node in the cluster:
zbs-nfs file update [--replica_num REPLICA_NUM] <inode_id>
| Parameter | Description |
|---|---|
--replica_num REPLICA_NUM | Optional. Resets the replication factor. Only increasing the replication factor is supported; decreasing it is not supported. |
inode_id | The inode ID. |
Output note
If the command succeeds, no output is displayed.
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>]
| Parameter | Description |
|---|---|
target_name | The name of the target to which the LUN belongs. |
lun_id | The LUN ID. |
inode_path | The 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
------------------ ------------------------------------