Previous  |  Next  >  
Product: Storage Foundation Guides   
Manual: Storage Foundation 4.1 Intelligent Storage Provisioning Administrator's Guide   

Examples of Using ISP from the Command Line

This section provides examples of using ISP from the command line and provides pointers to where more information can be found. You can also find summaries of the usage of commonly used commands in Command Summary. Further examples may be found in Examples of Using ISP and in the manual page for each command.

Creating a Data Storage Pool

Assuming that you have created a disk group, mydg, that contains several disks that you have initialized for use with VxVM, the following command creates a data storage pool, mypool, containing several disks, and which supports the creation of striped-mirror volumes:


# vxpool -g mydg create mypool \
dm=mydg01,mydg02,mydg03,mydg04,mydg04,mydg06 \

  pooldefinition=stripe_mirror_volumes

For more information, see Creating a Storage Pool.

Adding Disks to a Storage Pool

You can use the vxpool adddisk command to add initialized disks to a storage pool. For example, this command adds two disks to the storage pool, mypool:


vxpool -g mydg adddisk mypool dm=mydg07,mydg08

For more information, see Adding Disks to a Storage Pool.

Creating an Application Volume

The following command creates a striped-mirror volume with three columns and two mirrors in the data storage pool, mypool, by specifying the capability DataStripeMirror together with the appropriate parameters:


# vxvoladm -g mydg -p mypool make stmrvol 2g \
capability='DataStripeMirror(ncols=3,nmirs=2)' init=active

The init=active attribute makes the volume immediately available for use without performing any synchronization.

Having created the application volume, stmrvol, you can use the following command to prepare it for use with volume snapshots:


vxvoladm -g mydg -p mypool add log stmrvol nlog=2 logtype=dco

This command associates a data change object (DCO) and DCO volume with the volume. The attribute nlog is used to specify that the DCO volume has the same redundancy as the original volume. Alternatively, you can use the vxsnap prepare command to set up the volume for snapshots:


vxsnap -g mydg prepare stmrvol ndcomirs=2

For more information, see Creating Application Volumes and Creating Instant Snapshots.

Resizing an Application Volume

If the application volume, stmrvol, that you have just created is not large enough for your needs, you can increase its size using this command:


vxvoladm -g mydg -p mypool growto stmrvol 4g

Any file system or other application storage layout that you have created on the volume can be resized after you have grown the volume.

For more information, see Resizing Volumes Online.

Creating a Clone Storage Pool

Assuming that you also want to create full-sized snapshots of application volumes in mypool that can be moved into different disk groups (potentially for offhost processing), the following command creates a clone storage pool, myclpool, in the same disk group as mypool:


vxpool -g mydg create myclpool dm=mydg09,mydg10,mydg11,mydg12 \
  autogrow=pool pooldefinition=mirrored_volumes

This pool supports the creation of mirrored volumes. It also has a non-default autogrow policy that prevents it aggregating disks from the disk group outside the pool.

For more information, see Preparing Storage Pools for Full-Sized Instant Snapshots.

Preparing a Full-Sized Snapshot Volume

Before you can take a full-sized snapshot of an application volume, you must prepare the empty volume that is to become the snapshot volume as shown here:


# vxvoladm -g mydg -p myclpool make mysnpvol 2g type=snapshot\
init=active

This command automatically associates a data change object (DCO) and DCO volume with the volume. For more information, see Creating a Volume for Use as a Full-Sized Instant Snapshot.

Taking a Full-Sized Snapshot of an Application Volume

Having prepared an empty volume, you can take a snapshot of the application volume:


vxsnap -g mydg make source=stmrvol/snapvol=mysnpvol/syncing=on

The following command starts a full synchronization of the snapshot volume, and blocks until this is complete:


vxsnap -g mydg syncwait mysnpvol

For more information, see Creating Instant Snapshots.

Creating a Cache Volume for Space-Optimized Snapshots

If you want to use space-optimized snapshots, you must prepare a storage cache where the snapshots can be created. This command sets up a 1GB cache volume, mycache, in the clone pool, myclpool:


vxvoladm -g mydg -p myclpool make mycache 1g type=cachevolume

For more information, see Creating a Shared Cache Volume and Preparing Space-Optimized Snapshots.

Preparing a Space-Optimized Snapshot

Having created a cache volume, you now need to prepare the space-optimized snapshots that you require. This command sets up a space-optimized snapshot, mysovol, using the cache volume, mycache:


# vxvoladm -g mydg -p myclpool make mysovol 2g type=snapshot \
cachevolume=mycache init=active

Note   Note    The argument 2g is the same as the length of the original source volume for which the snapshot is being prepared. This value defines the logical size of the snapshot. The actual amount of storage that the snapshot requires is less than this, and is limited by the size of the cache volume.

For more information, see Creating a Shared Cache Volume and Preparing Space-Optimized Snapshots.

Taking a Space-Optimized Snapshot of an Application Volume

Having prepared a cache volume and one or more empty space-optimized snapshots, you are ready to take a snapshot of the application volume:


vxsnap -g mydg make source=stmrvol/snapvol=mysovol

For more information, see Creating Instant Snapshots.

 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation Guides  
Manual: Storage Foundation 4.1 Intelligent Storage Provisioning Administrator's Guide  
VERITAS Software Corporation
www.veritas.com