Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.

Community Forum > Some CLI questions ?

The qs create-share command seems to alwas activate the share even with out the --activate option.. Is their any to keep it from activateing the share when we create it?

In the GUI after I create a NFS share I need to add NFS access to my shares do you have a cli command that will do that?

Do you have a CLI command to disable a share?

July 29, 2014 | Registered CommenterWilliam McWherter

I also notice the on the CLI qs create-share the option --desc does not seem to work at least I have not found a way to create a shar with a description on it using the cli. any Idea's?


July 29, 2014 | Registered CommenterWilliam McWherter

Hi William,
Yes, here's the full docs on the share-create command:

share-create [shr-create]
:: Creates a new NFSv3 network share.
<--name> :: Names may include any alpha-numeric characters '_' and '-', spaces are
not allowed.
<--pool> :: Name of the storage pool or its unique ID (GUID).
[--desc] :: A description for the object.
[--public] :: Indicates that the specified network share should be made public and
open for read/write access to all systems on the network.
[--active] :: Indicates that the network share should be activated.
[--cifs-enable] :: Enables Samba support for network share.
[--user-access-list] :: List of users with permission to access the network share.
[--cifs-options] :: Additional CIFS/Samba configuration options specified as
[--space-quota] :: Size of the quota for the network share (optional).
[--flags] :: Optional flags for the operation. [async, force]

The default is to have --active=true but if you supply it with --active=false that should correct it. I know the docs there are a little misleading as it doesn't make clear that you can put a modifier on there, we'll see about fixing that up.

qs share-create --pool=pool-gfs1 --name=share1 --desc="this is a test" --active=false --public=false

Network Share:
ID: 2997c6cb-b003-6547-df80-575f1061cd6e
Name: share1
State: Normal
Type: 53
Created Time Stamp: Wed Jul 30 18:54:57 2014
Modified Time Stamp: Wed Jul 30 18:54:57 2014
Is Remote: false
Storage Pool ID: 5dc42c19-b0a2-6256-e262-4ea2fe27fc1a
Remote Replica Flags: 0
Size: 0
Is Snapshot: false
Snapshot Group ID:
Snapshot Parent:
Mount Path:
Origination Pool ID: 5dc42c19-b0a2-6256-e262-4ea2fe27fc1a
Origination ID: 2997c6cb-b003-6547-df80-575f1061cd6e
Origination Name: share1
Origination Snapshot Parent:
Is Active Checkpoint: false
Created By Schedule:
Compression Ratio:
Compression Type: on
Sync Policy: standard
Copies: 1
Share Path: /mnt/storage-pools/qs-5dc42c19-b0a2-6256-e262-4ea2fe27fc1a/share1
Is Active: false
Share Type: zfs
Enable Cifs: false
Is Cloud Backup: false
Space Utilized: 0
Space Quota: 0
Cloud Container ID:
Is Gluster Volume: false
Gluster Volume ID:
Disable Snap Browsing: false

The description field is definitely not getting set, we'll check into that and get that fixed for the next update. Thanks as always for the feedback William.

July 30, 2014 | Registered CommenterSteve

Hi William,
Yes, there's also a command for adding NFS client access to a share. And this command to get minimal list of help commands may be useful to you too:

qs help=share --min

share-create [shr-create] :: Creates a new NFSv3 network share.
share-modify [shr-modify] :: Modifies the properties of the specified network share.
share-delete [shr-delete] :: Deletes the specified network share
share-snapshot [shr-snap] :: Creates and instant space efficient snapshot of the
specified network share (requires Advanced Storage Pool)
share-clone [shr-clone] :: Creates a full copy of the specified network share to
another storage pool.
share-list [shr-list] :: Returns a list of all the network shares in the system.
share-get [shr-get] :: Returns information about the specified network share.
share-client-add [shr-cadd] :: Adds a client for the specified network share.
share-client-remove [shr-cremove] :: Removes a client for the specified network share.
share-client-modify [shr-cmodify] :: Modifies a client for the specified network share.
share-client-enum [shr-cenum] :: Returns a list of clients for the specified network
share-client-get [shr-cget] :: Returns information about the specific network share
share-leave-domain [shr-ldomain] :: Leaves the current domain.
share-join-domain [shr-jdomain] :: Joins the specified domain/realm.
share-ad-user-group-enum [shr-ad-ug-enum] :: Returns a list of all the users and groups in the domain
that QuantaStor is in.
quota-share-assoc-list [qs-alist] :: Returns a list of all the associated quotas of a
specified share.
quota-share-add [qs-add] :: Adds one or more shares to the specified quota.
quota-share-remove [qs-remove] :: Removes one or more shares from the specified quota.

The commands of interest are those ones with share-client- as the command prefix. To add/remove NFS access for IP address you would run this:

qs share-client-add share1
qs share-client-remove share1

To activate/deactivate a share you can run these commands:

qs share-modify share1 --active=true
qs share-modify share1 --active=false

Let me know if that helps!

July 30, 2014 | Registered CommenterSteve

Hi Steve,

I found some peculiarity while working on those correlations:

root@qshost:~# qs h-list |fgrep dummyvm
dummyvm vmware
dummyvm vmware
root@qshost:~# qs h-get dummyvm
INFO: Setting server credentials from QS_SERVER 'localhost,admin,testpw'
ERROR: Server request to [http://localhost:5152] failed: "Failed to resolve an IP address for specified host 'dummyvm'. [err=5]"

Why is trying to resolve the name instead of simply show us the properties?
P.S. Using the GUID works as expected but who remembers GUIDs!

February 23, 2016 | Registered CommenterDACBARBOS Services

Hi William,
It looks like the problem is due to having two hosts with the same name "dummyvm". On the server side it finds two matches and so it returns an error. Note that if you need to add multiple IQNs for the same host you can do that by adding more 'Initiator Ports' to it. Let me know if that answers your question DACBARBOS.
Apologies for the delay!

March 24, 2016 | Registered CommenterSteve

Hi Steve,
I'm not sure if that's the problem. I will look into it.
I'm excited about the newly released Windows v4x CLI version.
I find it very useful since I do all my work from a Windows VM.
Is there a way how to disable the "help tips" echoing whenever I press ENTER?
It is quite annoying! Thanks.

April 11, 2016 | Registered CommenterDACBARBOS Services

Hi Paul,
Great idea, we've done two things to fix it. First, you can now add --notips to the CLI args and it won't show help when you press ENTER. Second, if you load the CLI without the --notips option then it only shows help the first two times you press ENTER. Thanks for the feedback Paul, we've updated the CLI installer package and uploaded it. Look for version `OSNEXUS QuantaStor CLI`.

April 11, 2016 | Registered CommenterSteve

Hi Steve,
I re-download the package, installed, appended the "--notips" option on the shortcut and "tada" :) it's working.
You made my day. Thanks a lot for the quick reaction.

April 12, 2016 | Registered CommenterDACBARBOS Services


I’m back with more feedback for you toward CLI improvements.

1. Simplification (happy sysadmin life)
- target specification: why not just “-s=hostname” instead of “-server=hostname”
- help parameters: why not just “h cmd=command” and “h cat=string” (btw, 2nd is working already for whatever reason)
- filtering output: you do have built-in string matching (aka above category param) but we cannot use it for regular commands
Ideas on implementation: either via a new switch/param (e.g. -f=filtervalue -m=matchstring -r=regexp) or pipe if viable/possible.
If using the internal capability is too much of effort then just use a sub-shell session and underlying OS command.

2. Make use of “context” (behaviour or A.I.)
- there should be a slightly different output depending on current context (configuration)
Example: GUI vs CLI in a grid context.
If I want to check my storage pools in a grid, the GUI is showing me the host ownership/grouping (which pool sits on which server).
If I am checking the same on CLI, I am left with frustration (nearly useless output whithout clear identification of which is where).
Same is valid for volume listing in a “grid context”. This is rather important I’d say.


June 20, 2016 | Registered CommenterDACBARBOS Services

NOTE: Above comments are for the Windows QS-CLI client.

June 22, 2016 | Registered CommenterDACBARBOS Services

Ignore the filtering output rant. It's an issue only when one uses the interactive mode.
Other annoyance: it seems that latest Windows patches broke the "~\.qs.cnf" functionality.

June 22, 2016 | Registered CommenterDACBARBOS Services

It seems that admin ID is preferred while any other ID written on %USERPROFILE%\.qs.cnf is simply ignored by the Windows CLI client.
Could someone else confirm this "bug" / behavior?

# this works fine,admin,password
# this doesn't work,custid,password

October 2, 2016 | Registered CommenterDACBARBOS Services

We really appreciate the feedback and have incorporated a number of changes to the CLI. QuantaStor v4.1 won't be out for a few weeks but we've published the CLI for it early so you can have the fixes and enhancements now.

Summary of changes:
* You can now put your credentials into %USERPROFILE%\.qs.cnf on Windows and it will pick them up just like ~/.qs.cnf on Linux systems. We've placed the latest CLI on the Downloads page here.
* We fixed up the output of the disk-list, volume-list, share-list, target-port-list, and pool-list commands so that they include the storage system name first. As you pointed out this is critical for grid deployments.
* We added an alias for -s= so you can use a short hand versus having to type out --server=
* We added a new --noheader option so that the list output can be header-less which makes it easier to pipe the output to commands like grep

Let us know if that helps!

October 7, 2016 | Registered CommenterSteve