onappstore is a command-line utility that you can use for all common IS functions. To see all available commands related, run 

onappstore -h
CODE


List of Available onappstore Commands


Command

Description

Required Parameters

Additional Parameters

help

prints info about all commands

-

-

list

lists virtual disks in compute zone

-

minimal=true/false - output as comma-separated list

datastore=<DS_UUID> - list vDisks in data store with DS_UUID

type=is/lvm - list vDisks from LVM or IS only

getid

gets UUID of frontend node (works on compute resource or backup server only), also shows Backend nodes IP`s

-

-

listds

lists data stores in compute zone

-

minimal=true/false - output as comma-separated list

type=is/lvm - list data stores from LVM or IS only

createds

creates data store within compute zone

name=<NAME> - specify DS name membership_count=<# of disks> - specify how much Backend nodes (hardware disks) should include new data store

type=is/lvm - type of storage we crate DS

uuid=<DS UUID> - we can specify UUID for DS

replicas=<NO OF REPLICAS> - how many copies of vDisk will be stored at DS

stripes=<NO OF STRIPES> - how many stripes of vDisk will be stored at DS

owners=<comma separated list of Backend node UUIDs to host this ds on (must be equal to membership_count)>

overcommit=<20/50/unlimited> - the percentage of size DS can be allocated over actual capacity

epoch=true/false - enable/disable epoch feature

deleteds

deletes data store

uuid=<DS UUID> - UUID of data store to delete

type=is/lvm - type of storage

force=true - do not check if vDisks present in datastore

addnode

adds Backend node to existing DS

uuid=<DS UUID> - UUID of data store you want add node to

member_uuid=<NODE UUID> - Backend node UUID you want to add to DS

type=is/lvm - type of storage

removenode

removes a node from datastore

uuid=<DS UUID> - UUID of data store from what you want to remove node

member_uuid=<NODE UUID> - Backend node UUID you want to remove from DS

type=is/lvm - type of storage

create

creates virtual disk at existing DS

name=<NAME> - name of vDisk

size=<SIZE (MB)> - size in Megabytes

Datastore=<DS UUID> - datastore at which you want to create vDisk

type=is/lvm - type of storage

snap_limit=<percent of disk size(0-100)> - size of snapshots in percentage of vDisk size default 10%

online

onlines vDisk, actually allocates space bring up all needed processes (rspamd, nbd, dm cache), so vDisk can be used by VS

uuid=<UUID> - UUID of vDisk we want online

frontend_uuid=<FRONTEND_NODE_UUID> - UUID of frontend node compure resource or BS at which we want online vDisk

type=is/lvm - type of storage

allow_parallel_connects=true/false - allow online at two instances at same time

refresh=true/false - regenerate data about vDisk at backend nodes

cache=passthrough/writethrough/writeback - choose cache type

cls=CACHE_LINE_SIZE - cache line size

cache_percentage=<0-100> - size of cache % of vDisk size

restore=true/false - restore cache settings

nbd_timeout=0-1000 - NBD connection timeout in seconds

offline

offlines vDisk, flushs all data to backend nodes, stops all processes related to vDisk

uuid=<UUID> - UUID of vDisk we want offline

type=is/lvm - type of storage

frontend_uuid=<FRONTEND_NODE_UUID> - UUID of frontend node HV or BS at which we want offline vDisk

snapshot

makes COW snapshot of vDisk; up to 3 snapshots can exist at the same time; to access snapshot you should online it

uuid=<UUID> - UUID of vDisk we want snapshot

type=is/lvm - type of storage

snap_limit=<percent of disk size(0-100)> - size of snapshot in percentage of vDisk size default 10%


Basic Functionality Test


You can also use onappstore to test the basic functionality of your Integrated Storage. To do that, follow the next procedure:

  1. Create data store:
onappstore createds name=testds membership_count=12 replicas=2 stripes=2
result=SUCCESS uuid=qbvye0hnmog8wd owners=92501251,547980777,846279239,3131933319,1196498418,3480892458,755168543,1550962108,2570842711,1245111051,683656722,2849269270 replicas=2 stripes=2 overcommit=0 completion_time=3
CODE

2. List data stores:

onappstore listds
Datastore [qbvye0hnmog8wd]
Name: testds
Description: testds
Sector-size: 65536 Bytes
VDisk replicas: 2
VDisk stripes: 2
Overcommit: 0
Members: 2849269270,683656722,1245111051,2570842711,1550962108,755168543,3480892458,1196498418,3131933319,846279239,547980777,92501251
Max-new-vdisk 952372
CODE

3. Create virtual disk:

onappstore create name=testvdisk size=10000 Datastore=qbvye0hnmog8wd
result=SUCCESS uuid=dt9my0v16op7wc owners=755168543,1550962108,2849269270,92501251 Datastore=qbvye0hnmog8wd stripesize=256 completion_time=4
CODE

4. Get UUID of compute resource:

onappstore getid
result=SUCCESS uuid=3587714074 ipaddr=192.168.1.93 backends=10.200.4.3,10.200.4.2,10.200.4.1 unicasthosts= completion_time=0
CODE

5. Online virtual disk:

onappstore online uuid=dt9my0v16op7wc frontend_uuid=3587714074
result=SUCCESS completion_time=6
CODE


 6. Write data to a virtual disk:

dd if=/dev/urandom of=/dev/mapper/dt9my0v16op7wc bs=1M count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 14.2606 s, 73.5 MB/s
CODE