Previous Topic: rename Method (vol Object)Next Topic: repair_status Method (vol Object)


migrate Method (vol Object)
Description

Migrate volumes to a different volume store (local or san) or to enabled servers

Syntax
/api/v1/vol/migrate?app=application&name=app-or-volume&vdc=controller-name 
Arguments
name

Name of the volume to migrate.

vdc

Name of the target virtual data center.

Transaction Type

asynchronous

Request Type

GET

Examples

Migrate an application volume MYAPP:data to a local store:

GET http://aux/api/v1/vol/migrate?name=MYAPP:data&store=local&vdc=mygrid

Migrate all volumes for application MYAPP to a san:

GET http://aux/api/v1/vol/migrate?name=MYAPP&store=san&vdc=mygrid

Migrate all volumes off disabled server(s), three at a time:

GET http://aux/api/v1/vol/migrate?&all&n=3&vdc=mygrid

Sample Output
XML:
 <job>b88969ea-9264-40b2-ba08-29b7ecbcc150</job>
JSON:
{
   "job" : "b88969ea-9264-40b2-ba08-29b7ecbcc150"
}

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (name). - Argument name=… missing in the request.

404.1

Volume 'MYAPP:data' does not exist. - Invalid volume specified in the request.

404.1

Failed to migrate volume 'MYAPP:data'. - Volume specified in the request is in-use.

migrate_status Method (vol Object)
Description

Report on the state of ongoing volume migrations between two different grids

Syntax
/api/v1/vol/migrate_status?&vdc=

controller-name

Arguments
vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Check the progress of volume migrations on grid mygrid:

GET http://aux/api/v1/vol/migrate_status?&vdc=mygrid
Sample Output
XML:

<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 

JSON:

{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

400.4

Missing required arguments (volnew). - Argument volnew=new_vol missing in the request.

Note: To get the status of job, issue a /api/v1/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.

fscheck Method (vol Object)
Description

Verify the health of the filesystem on a volume

Syntax
/api/v1/vol/fscheck?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Verify the health of test:vol1 with fs=ext3.

GET http://192.168.123.200>/api/v1/vol/fscheck?app=test&vol=vol1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

Note: To get the status of job, issue a /api/v1/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.

fsrepair Method (vol Object)
Description

Verify and repair the filesystem on a volume

Syntax
/api/v1/vol/fsrepair?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Verify and repair test:vol1.

GET http://192.168.123.200/api/v1/vol/fsrepair?app=test&vol=vol1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

Note: To get the status of job, issue a /api/v1/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.

check Method (vol Object)
Description

Initiate background check for volumes that need repair

Syntax
/api/v1/vol/check?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Initiate background volume check.

GET http://192.168.123.200/api/v1/vol/check?vdc=mygrid 
Sample Output
XML:
<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> 
JSON:
{
"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"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

404

A background check for volumes that need repair is already in progress.

repair Method (vol Object)
Description

Repair degraded volume

Syntax
/api/v1/vol/repair?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Repair test:vol1.

GET http://192.168.123.200/api/v1/vol/repair?app=test&vol=vol1&vdc=mygrid 

Repair all volumes

GET http://192.168.123.200/api/v1/vol/repair?&all&vdc=mygrid

Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

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/v1/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.