Description
Issue a disk management command for dynamically added disk devices (e.g., S3 Cloud Disks).
Request
Parameter
|
Parameter Value
|
Required?
|
command
|
createS3disk, deleteS3disk, deleteS3disk, getS3settings, bucketlist
|
Y
|
start
|
start
|
Y
|
limit
|
limit
|
Y
|
Command parameters
· createS3disk - creates an S3 disk devices. Related arguments:
awsAccessKey : s3 aws access key id
awsSecretKey : s3 aws secret key
s3bucket : s3 bucket name must be unique
bucketroot : s3 bucket root
sizeMaxValue : Disk size
sizeMaxUnits : Size unit TB or GB
diskpassword : disk password protection
cb_encrypted : add it to encrypt disk
· deleteS3disk - delete an S3 disk
s3diskname : S3 disk name; i.e (/dev/s3-0)
· getS3settings - get list of S3 disk devices settings
· bucketlist - get list of S3 buckets
Response
Example 1 - create S3 disk device
$ softnas-cmd diskmgmt createS3disk awsAccessKey=YOUR_AWS_ACCESS_KEY_ID awsSecretKey=YOUR_AWS_SECRET_KEY s3bucket=softnas-test-1 bucketroot=softnas sizeMaxValue=500 sizeMaxUnits=GB diskpassword=password123* -t
JSON Response:
{
"result": {
"msg": "s3-0 created successfully.",
"records": {
"msg": "s3-0 created successfully."
},
"success": true,
"total": 1
},
"session_id": 10123,
"success": true
}
|
Example 2 - get list of available S3 buckets
$ softnas-cmd diskmgmt bucketlist -t
JSON Response:
{
"result": {
"msg": "",
"records": [
{
"bucketname": "softnas-test-1"
},
{
"bucketname": "softnas-test-2"
},
{
"bucketname": "softnas-test-3"
},
],
"success": true,
"total": 3
},
"session_id": 10123,
"success": true
|
Example 3 - Get list of S3 settings
$ softnas-cmd diskmgmt getS3settings -t
JSON Response:
{
"result": {
"msg": "",
"records": {
"awsAccessKey": "XXXXXXXXXXXXXXXXX",
"awsSecretKey": "XXXXXXXXXXXXXXXXX",
"blocksize": "1M",
"bucketroot": "softnas",
"cachesize": "10",
"cachethreads": "10",
"mountroot": "/mnt",
"nDevices": "3",
"nDisks": "3",
"timeout": "15"
},
"success": true,
"total": 10
},
"session_id": 10123,
"success": true
}
|
Example 4 - Delete S3 disk device
$ softnas-cmd diskmgmt deleteS3disk "/dev/s3-0" -t
JSON Response:
{
"result": {
"msg": "/dev/s3-0 deleted.",
"records": {
"msg": "/dev/s3-0 deleted."
},
"success": true,
"total": 1
},
"session_id": 10123,
"success": true
}
|