Creating a Volume

AI Tools

With the Lightbits software installed and the Lightbits management services running, you can create a volume and connect that volume to your application servers.

To create a volume, enter the lbcli create volume command.

Sample Command

$ lbcli create volume --name vol_1 --acl=test --size="10 Gib" --replica-count=2 --project-name=default

In this command, the JWT is not stored in the lbcli configuration file:

$ lbcli -J $JWT create volume --size="10 Gib" --name=vol_1 --acl="test" --replica-count=2 --project-name=default

Sample Output

Name UUID State Size Replicas vol_1 82f6a469-5ccd-449b-8f43-acc53cb887a7 Creating 10 GiB 2

This example command creates a 10 GB volume with two replicas, and a simple “test” string is used as the Access Control List (ACL) value. This ACL string is used for the application client when the nvme connect command is entered to connect to this new volume over NVMe/TCP.

Creating a Compressed Volume

The lbcli create volume command also supports a flag to enable data to be compressed as much as possible in a volume.

Use the lbcli create volume command to create a volume with compression enabled (true).

Sample Command

$ lbcli create volume --name=vol2 --acl=acl1 --size="1 Tib" --replica-count=3 --compression=true

In this command, the JWT is not stored in the lbcli configuration file::

$ lbcli -J $JWT create volume --size="1 Tib" --name=vol2 --acl="acl1" --replica-count=2 --compression=true --project-name=default

Sample Output

Name UUID State Protection State NSID Size Replicas Compression ACL Rebuild Progress vol2 105624dd-c96f-4668-a2a2-da0b754ac462 Creating NotAvailable 0 1.0 TiB 3 true values:"acl1"

The sample output is standard when using the lbcli immediately after executing the create command. The output indicates that the volume is being created with the values provided.

List Details About the Newly Created Volume

You can use the lbcli get volumes command to see specific information related to any volume.

Sample Command

$ lbcli get volume --name=vol2

In this command, the JWT is not stored in the lbcli configuration file:

$ lbcli -J $JWT get volume --name vol2 --project-name a

Sample Output

ETag: "4" IPAcl: values: - ALLOW_ANY UUID: 105624dd-c96f-4668-a2a2-da0b754ac462 acl: values: - acl1 compression: true connectedHosts: [] name: vol2 nodeList: - 2d6f9739-afd7-5225-b4a0-b7c46dc54ffd - 01ab0ff8-6417-5b89-ba1a-b3011936745f - 291e00d3-73d0-546f-ae45-e26a1cfa534b nsid: 2 protectionState: FullyProtected rebuildProgress: None replicaCount: 3 size: "1099511627776" state: Available statistics: compressionRatio: 0 logicalUsedStorage: "0" physicalUsedStorage: "0"

This output details all of the parameters used to create the volume such as the ACL, replication factor (replica count), and compression state. In addition, the UUID of each Lightbits node used to create the volume on the Lightbits cluster is provided under the output’s nodeList area.