Use this object to manage volumes related to an application.
|
Method |
Description |
|
Retrieve list of volumes in the application |
|
|
Retrieve detailed information for a volume |
|
|
Create a new volume for an application |
|
|
Remove an existing volume from an application |
|
|
Format an existing volume |
|
|
Rename an application user volume |
|
|
Resize a volume |
|
|
Copy a volume |
|
|
Export a volume to a container file |
|
|
Import a volume from a container file |
|
|
Move a volume to an alternate location |
|
|
Relocate volumes to a specified store or off a disabled server |
|
|
Retrieve current volume relocation status |
|
|
Verify the health of the filesystem on a volume |
|
|
Verify and repair the filesystem on a volume |
|
|
Initiate background check for volumes that need repair |
|
|
Restore degraded volume |
|
|
Retrieve current volume repair status |
|
|
Destroy unused volume(s), unused volume streams, and volumes that have broken symbolic links |
Retrieve list of volumes in the application
/api/v2/vol/list?app=application&vdc=controller-name
Name of the application
Name of the target virtual data center
synchronous
GET
Retrieve list of volumes for test.
GET http://192.168.123.200/api/v2/vol/list?app=test&vdc=mygrid
<volumes>
<volume>
<comment></comment>
<filesystem>ext3</filesystem>
<mount_state>in_use</mount_state>
<n_mirrors>2</n_mirrors>
<name>WS_API_r271:code</name>
<scope_name>WS_API_r271</scope_name>
<scope_type>application</scope_type>
<server>srv1,srv2</server>
<size>54525952</size>
<state>ok</state>
<store>local</store>
<uuid>fc746912-cc65-4e9c-9327-14c66b1741c7</uuid>
</volume>
.
.
.
<volume>
<comment></comment>
<filesystem>ext3</filesystem>
<mount_state>available</mount_state>
<n_mirrors>2</n_mirrors>
<name>WS_API_r271:mon</name>
<scope_name>WS_API_r271</scope_name>
<scope_type>application</scope_type>
<server>srv1,srv2</server>
<size>53477376</size>
<state>ok</state>
<store>local</store>
<uuid>f4fd637c-4aa8-4111-be31-55d28a1e275d</uuid>
</volume>
</volumes>
{
"volume" : [
{
"store" : "local",
"scope_type" : "application",
"name" : "WS_API_r271:code",
"scope_name" : "WS_API_r271",
"mount_state" : "in_use",
"uuid" : "fc746912-cc65-4e9c-9327-14c66b1741c7",
"size" : "54525952",
"state" : "ok",
"comment" : "",
"filesystem" : "ext3",
"n_mirrors" : "2",
"server" : "srv1,srv2"
},
.
.
.
{
"store" : "local",
"scope_type" : "application",
"name" : "WS_API_r271:mon",
"scope_name" : "WS_API_r271",
"mount_state" : "available",
"uuid" : "f4fd637c-4aa8-4111-be31-55d28a1e275d",
"size" : "53477376",
"state" : "ok",
"comment" : "",
"filesystem" : "ext3",
"n_mirrors" : "2",
"server" : "srv1,srv2"
}
]
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Application 'test' does not exist. - Invalid application specified in the request.
Retrieve list of detailed information for a volume
/api/v2/vol/info?app=application&vol=volume&vdc=controller-name
Name of the application
Name of the volume
Name of the target virtual data center
synchronous
GET
Retrieve list of detailed information for test:vol1.
GET http://192.168.123.200/api/v2/vol/info?app=test&vol=vol1&vdc=mygrid
<volume>
<comment></comment>
<filesystem>ext3</filesystem>
<link></link>
<mirrors>
<mirror>
<name>srv1.v-e9937df4-28df-4e14-9f45-31d1668e7b4a</name>
<server>srv1</server>
<state>ok</state>
</mirror>
<mirror>
<name>srv2.v-40b44d96-7a93-4edd-a13d-c320ea3d227d</name>
<server>srv2</server>
<state>ok</state>
</mirror>
</mirrors>
<mount_attr>rw-excl</mount_attr>
<mount_path>none</mount_path>
<mount_state>in_use</mount_state>
<n_mirrors>2</n_mirrors>
<n_users>1</n_users>
<name>conf</name>
<size>53477376</size>
<state>ok</state>
<store>local</store>
<time_accessed>1367537796</time_accessed>
<time_created>1367449644</time_created>
<time_written>1367449646</time_written>
<uuid>93298b3c-d731-43b7-b7d9-2e98393f4263</uuid>
</volume>
{
"link" : "",
"time_created" : "1367449644",
"store" : "local",
"mount_attr" : "rw-excl",
"mirror" : [
{
"name" : "srv1.v-e9937df4-28df-4e14-9f45-31d1668e7b4a",
"server" : "srv1",
"state" : "ok"
},
{
"name" : "srv2.v-40b44d96-7a93-4edd-a13d-c320ea3d227d",
"server" : "srv2",
"state" : "ok"
}
],
"time_accessed" : "1367537796",
"name" : "conf",
"uuid" : "93298b3c-d731-43b7-b7d9-2e98393f4263",
"mount_state" : "in_use",
"size" : "53477376",
"state" : "ok",
"n_users" : "1",
"time_written" : "1367449646",
"mount_path" : "none",
"comment" : "",
"filesystem" : "ext3",
"n_mirrors" : "2"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Volume 'test:data' does not exist. - Invalid application or volume specified in the request.
Create a volume
/api/v2/vol/create?app=application&vol=volume&fs=filesystem&size=size&vdc=controller-name
Name of the application
Name of the volume
Filesystem of the volume to be created
Size of the volume
Name of the target virtual data center
asynchronous
GET
Create a 1GB, ext3, mirrored volume named test:vol1.
GET http://192.168.123.200/api/v2/vol/create?app=test&vol=vol1&fs=ext3&size=1G&mirrored=1&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Destroy a volume
/api/v2/vol/destroy?app=application&vol=volume&vdc=controller-name
Name of the application
Name of the volume
Name of the target virtual data center
asynchronous
GET
Destroy a volume test:vol1.
GET http://192.168.123.200/api/v2/vol/destroy?app=test&vol=vol1&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Format an existing volume
/api/v2/vol/format?app=application&vol=volume&fs=filesystem&vdc=controller-name
Name of the application
Name of the volume
Filesystem of the volume to be created
Name of the target virtual data center
asynchronous
GET
Format a volume test:vol1 with fs=ext3.
GET http://192.168.123.200/api/v2/vol/format?app=test&vol=vol1&fs=ext3&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Missing required arguments (fs). - Argument fs=fs missing in the request.
Note: This will wipe out all the data that is currently on the volume. To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Rename a volume
/api/v2/vol/rename?app=application&vol=volume&volnew=new-volume&vdc=controller-name
Name of the application
Name of the volume
Name of the new volume
Name of the target virtual data center
asynchronous
GET
Rename a volume test:vol1 to test:vol2.
GET http://192.168.123.200/api/v2/vol/rename?app=test&vol=vol1&volnew=vol2&vdc=mygrid
<message></message>
{
"message" :""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Missing required arguments (volnew). - Argument volnew=new_vol missing in the request.
Volume 'test:data' does not exist. - Invalid application in the request.
Failed to rename volume 'test:data'. - Volume specified in the request is in-use.
Volume 'test:data2' does not exist. - Invalid volume specified in the request.
Resize a volume
/api/v2/vol/resize?app=application&vol=volume&size=size&vdc=controller-name
Name of the application
Name of the volume
Size of the volume
Name of the target virtual data center
asynchronous
GET
Resize test:vol1 to 2GB.
GET http://192.168.123.200/api/v2/vol/resize?app=test&vol=vol1&size=2G&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Missing required arguments (size). - Argument size=size missing in the request.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Copy a volume
/api/v2/vol/copy?app=application&vol=volume&volnew=new-volume&vdc=controller-name
Name of the application
Name of the volume
Name of the new volume
Name of the target virtual data center
Name of the alternate application to copy the volume to. By default, the volume is copied to the original application.
asynchronous
GET
Copy a volume test:vol1 to test:vol2.
GET http://192.168.123.200/api/v2/vol/copy?app=test&vol=vol1&appnew=test&volnew=vol2&vdc=mygrid
Copy a volume atest:vol1 to btest:vol2.
http://192.168.123.200/api/v2/vol/copy?app=atest&vol=vol1&appnew=btest&volnew=vol2&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Missing required arguments (volnew). - Argument volnew=new_vol missing in the request.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Export a volume to a container file on /vol/_impex/
/api/v2/vol/export?app=application&vol=volume&target=filename.img.gz&vdc=controller-name
Name of the application or domain hosting the volume
Name of the volume
Name of the container file to export the volume to.
Creates the file at the root of the import/export volume of the grid: /vol/_impex/ Optionally compresses the file using gzip (upon specification of .gz as a file name extent)
Name of the target virtual data center
asynchronous
GET
Export the volume test1:vol1 to the compressed container file /vol/_impex/test.img.gz.
GET http://192.168.123.200/api/v2/vol/export?app=test1&vol=vol1&target=test.img.gz&vdc=mygrid
<job>bdc176a5-c069-4b23-89d2-d933127a9765</job>
{
"job" : "bdc176a5-c069-4b23-89d2-d933127a9765"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Missing required arguments (target). - Argument target=filename missing in the request.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Import a volume from a container file on /vol/_impex/
/api/v2/vol/import?app=application&vol=volume&target=filename.img.gz&vdc=controller-name
Name of the application or domain to host the new volum
Name of the new volume
Name of the container file to import the volume from.
Retrieves the volume data from the file located at the root of the import/export volume on the specified grid: /vol/_impex/ Expects gzip-compressed data if the file name extent is .gz
Name of the target virtual data center.
asynchronous
GET
Import the volume test2:vol2 from the compressed container file
/vol/_impex/test.img.gz.
GET
http://192.168.123.200/api/v2/vol/import?app=test2&vol=vol2&target=test.img.gz&vdc=mygrid
<job>bdc176a5-c069-4b23-89d2-d933127a9766</job>
{
"job" : "bdc176a5-c069-4b23-89d2-d933127a9766"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Missing required arguments (target). - Argument target=filename missing in the request.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Move a volume to an alternate location
/api/v2/vol/move?app=application&vol=volume&volnew=new-volume-location&vdc=controller-name
Name of the source application
Name of the volume
New volume location, in the form <application>:<volume_name>
Name of the target virtual data center
asynchronous
GET
Move a volume atest:vol1 to btest:vol2.
GET http://192.168.123.200/api/v2/vol/move?app=atest&vol=vol1&volnew=btest:vol2&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Missing required arguments (volnew). - Argument volnew=new_vol missing in the request.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job (see page 308) object.
Relocate volumes to different volume stores or servers within the same grid (in CA AppLogic 3.5, this command was called vol/migrate)
/api/v2/vol/relocate?app=application&name=app-or-volume&vdc=controller-name
Name of the volume to relocate
Name of the target virtual data center
Specify the volume store to which the volume is to be relocated. The value may be ‘san’ or ‘local’.
Specify the number of volumes to simultaneously relocate. Default: one volume at a time.
Relocate all volumes that need relocation.
List volumes that need relocation or the relocation status of a specific volume.
Suspend ongoing volume relocations.
asynchronous
GET
Relocate an application volume MYAPP:data to a local store:
GET http://aux/api/v2/vol/relocate?name=MYAPP:data&store=local&vdc=mygrid
Relocate all volumes for application MYAPP to a SAN:
GET http://aux/api/v2/vol/relocate?name=MYAPP&store=san&vdc=mygrid
Relocate all volumes off disabled server(s), three at a time:
GET http://aux/api/v2/vol/relocate?&all&n=3&vdc=mygrid
<job>b88969ea-9264-40b2-ba08-29b7ecbcc150</job>
{
"job" : "b88969ea-9264-40b2-ba08-29b7ecbcc150"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Report on the state of volume relocations ongoing on a grid
/api/v2/vol/relocate_status?&vdc=controller-name
Name of the target virtual data center
asynchronous
GET
Check the progress of volume relocations on grid mygrid:
GET http://aux/api/v2/vol/relocate_status?&vdc=mygrid
<opt></opt>
{
"message" : ""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Verify the health of the filesystem on a volume
/api/v2/vol/fscheck?app=application&vol=volume&vdc=controller-name
Name of the application
Name of the volume
Name of the target virtual data center
asynchronous
GET
Verify the health of test:vol1 with fs=ext3.
GET http://192.168.123.200>/api/v2/vol/fscheck?app=test&vol=vol1&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Verify and repair the filesystem on a volume
/api/v2/vol/fsrepair?app=application&vol=volume&vdc=controller-name
Name of the application
Name of the volume
Name of the target virtual data center
asynchronous
GET
Verify and repair test:vol1.
GET http://192.168.123.200/api/v2/vol/fsrepair?app=test&vol=vol1&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Initiate background check for volumes that need repair
/api/v2/vol/check?vdc=controller-name
Name of the target virtual data center
asynchronous
GET
Initiate background volume check.
GET http://192.168.123.200/api/v2/vol/check?vdc=mygrid
<message>A background check for volumes that need repair has been initiated and may take a few minutes to complete. Execute 'vol repair --status' to retrieve the current state of the volumes that are being repaired.</message>
{
"message" : "A background check for volumes that need repair has been initiated and may take \na few minutes to complete. Execute 'vol repair --status' to retrieve the \ncurrent state of the volumes that are being repaired.\n"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
A background check for volumes that need repair is already in progress.
Repair degraded volume
/api/v2/vol/repair?app=application&vol=volume&vdc=controller-name
Name of the application
Name of the volume
Name of the target virtual data center
asynchronous
GET
Repair test:vol1.
GET http://192.168.123.200/api/v2/vol/repair?app=test&vol=vol1&vdc=mygrid
Repair all volumes
GET http://192.168.123.200/api/v2/vol/repair?&all&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Note: The volume repairs start immediately if there are available servers to execute the repair, otherwise the volume is queued for repair and will start once there are available servers. To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
Retrieve list of current volume repair status
/api/v2/vol/repair_status?app=application&vol=volume&vdc=controller-name
Name of the application
Name of the volume
Name of the target virtual data center
synchronous
GET
Retrieve list of repair status for test:vol1.
GET http://192.168.123.200/api/v2/vol/repair_status?app=test&vol=vol1&vdc=mygrid
<volume>
<comment></comment>
<filesystem>ext3</filesystem>
<link></link>
<mirrors>
<mirror>
<name>srv1.v-e9937df4-28df-4e14-9f45-31d1668e7b4a</name>
<server>srv1</server>
<state>ok</state>
</mirror>
<mirror>
<name>srv2.v-40b44d96-7a93-4edd-a13d-c320ea3d227d</name>
<server>srv2</server>
<state>ok</state>
</mirror>
</mirrors>
<mount_attr>rw-excl</mount_attr>
<mount_path>none</mount_path>
<mount_state>in_use</mount_state>
<n_mirrors>2</n_mirrors>
<n_users>1</n_users>
<name>conf</name>
<size>53477376</size>
<state>ok</state>
<store>local</store>
<time_accessed>1367537796</time_accessed>
<time_created>1367449644</time_created>
<time_written>1367449646</time_written>
<uuid>93298b3c-d731-43b7-b7d9-2e98393f4263</uuid>
</volume>
{
"volume" : {
"link" : "",
"time_created" : "1367449644",
"store" : "local",
"mount_attr" : "rw-excl",
"mirror" : [
{
"name" : "srv1.v-e9937df4-28df-4e14-9f45-31d1668e7b4a",
"server" : "srv1",
"state" : "ok"
},
{
"name" : "srv2.v-40b44d96-7a93-4edd-a13d-c320ea3d227d",
"server" : "srv2",
"state" : "ok"
}
],
"time_accessed" : "1367537796",
"name" : "conf",
"uuid" : "93298b3c-d731-43b7-b7d9-2e98393f4263",
"mount_state" : "in_use",
"size" : "53477376",
"state" : "ok",
"n_users" : "1",
"time_written" : "1367449646",
"mount_path" : "none",
"comment" : "",
"filesystem" : "ext3",
"n_mirrors" : "2"
}
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
The specified volume 'test:data' does not exist. - Invalid application or volume specified in the request.
Destroy unused volume(s), unused volume streams, and volumes that have broken symbolic links
/api/v2/vol/clean?vdc=controller-name
Name of the target virtual data center
asynchronous
GET
Destroy unused volume(s), unused volume streams, and volumes that have broken symbolic links.
GET http://192.168.123.200/api/v2/vol/clean?vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Note: To get the status of job, issue a /api/v2/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.
|
Copyright © 2013 CA Technologies.
All rights reserved.
|
|