Procedure
Run the following command on any node in the cluster to view the inodes under the specified dir_id path.
zbs-nfs inode list <dir_id>
Output example
id name pool preallocate volume type Encrypt Method mode uid gid size perf unique size perf shared size cap unique size cap shared size logical used size prioritized downgraded_prs
------------------ ------ ------------------------------------ ------------- ------------------------------------ ------ ------------------ ------ ----- ----- ------ ------------------ ------------------ ----------------- ----------------- ------------------- ------------- ----------------
512c83c1-15db-4271 nfs1 ea479340-5d9d-4538-9386-eb1f2ab3f2d1 False 512c83c1-15db-4271-aeac-fc231f63c9f5 FILE ENCRYPT_PLAIN_TEXT 432 0 0 0.00 B In Process In Process In Process In Process In Process False 0.00 BOutput note
| Parameter | Description |
|---|---|
preallocate | Whether the inode file 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. |
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
View inode information by inode ID
Run the following command on any node in the cluster:
zbs-nfs inode show <inode_id>
View inode information by parent ID and inode name
Run the following command on any node in the cluster:
zbs-nfs inode lookup <parent_id> <inode_name>
Output example
----------------- ------------------------------------
id 512c83c1-15db-4271
name nfs1
pool ea479340-5d9d-4538-9386-eb1f2ab3f2d1
preallocate False
volume 512c83c1-15db-4271-aeac-fc231f63c9f5
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. |
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 inode sizeinfo <inode_id>
Output example
----------- ----------
size 6
volume size 1073741824
----------- ----------Output note
| Parameter | Description |
|---|---|
size | The inode file size. |
volume size | The volume size. |
Procedure
Run the following command on any node in the cluster:
zbs-nfs inode getattr <inode_id>
Output example
---- ----
type 2
mode 511
uid 0
gid 0
size 4096
---- ----Output note
| Parameter | Description |
|---|---|
type | The inode file type. 1 to 7 represent FILE, DIR, BLK, CHR, LNK, SOCK, FIFO, respectively. |
mode | The inode file mode. |
uid | The user ID. |
gid | The group ID. |
size | The file size. |
Procedure
Run the following command on any node in the cluster to update inode attributes:
zbs-nfs inode setattr <inode_id> [--mode <MODE>] [--uid <UID>] [--gid <GID>] [--size <SIZE>]
| Parameter | Description |
|---|---|
--mode <MODE> | The file mode. |
--uid <UID> | The user ID. |
--gid <GID> | The group ID. |
--size <SIZE> | The file size. |
Output example
----------------- ------------------------------------
id 7bbed56f-e5f0-4532
name nfs1
pool f6722181-7eb8-4ab4-ac39-7a06d29f6890
preallocate False
volume 7bbed56f-e5f0-4532-9224-1d7ea5ca6c8f
type FILE
Encrypt Method ENCRYPT_PLAIN_TEXT
mode 432
uid 0
gid 0
size 16.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. |
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 inode rename <src_parent_id> <src_inode_name> <dst_parent_id> <dst_inode_name>
Move the inode from the src_parent_id folder to the dst_parent_id. If dst_parent_id is the same as src_parent_id, the inode is renamed.
Usage example
zbs-nfs inode rename 8be8661e-ef17-4a74 inode2 8be8661e-ef17-4a74 inode1Output example
----------------- ------------------------------------
id 7bbed56f-e5f0-4532
name inode1
pool f6722181-7eb8-4ab4-ac39-7a06d29f6890
preallocate False
volume 7bbed56f-e5f0-4532-9224-1d7ea5ca6c8f
type FILE
Encrypt Method ENCRYPT_PLAIN_TEXT
mode 432
uid 0
gid 0
size 16.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
----------------- ------------------------------------Procedure
Run the following command on any node in the cluster to change the file size of file-type inodes:
zbs-nfs inode truncate <file_id> <size>
Output example
----------------- ------------------------------------
id 7bbed56f-e5f0-4532
name inode1
pool f6722181-7eb8-4ab4-ac39-7a06d29f6890
preallocate False
volume 7bbed56f-e5f0-4532-9224-1d7ea5ca6c8f
type FILE
Encrypt Method ENCRYPT_PLAIN_TEXT
mode 432
uid 0
gid 0
size 512.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
----------------- ------------------------------------Procedure
Run the following command on any node in the cluster to delete the inode named <inode_name> under the <parent_id> directory:
zbs-nfs inode delete <parent_id> <inode_name> [--recursive {true|false}]
The --recursive {true|false} parameter specifies whether to recursively delete all files and directories under the inode.
Output note
If the command succeeds, no output is displayed.