Examples of use and require constraints

The following examples show use and require constraints for storage allocation.

Example 1 - require constraint

This example shows the require constraint in a disk group that has disks from two arrays: emc_clariion0 and ams_wms0. Both arrays are connected through the same HBA hostportid (06-08-02), but the arrays have different arraytype (A/A and A/A-A respectively).

The following output shows the disk group information:

# vxprint -g testdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg testdg       testdg       -        -        -        -        -       -

dm ams_wms0_359 ams_wms0_359 -        2027264  -        -        -       -
dm ams_wms0_360 ams_wms0_360 -        2027264  -        -        -       -
dm ams_wms0_361 ams_wms0_361 -        2027264  -        -        -       -
dm ams_wms0_362 ams_wms0_362 -        2027264  -        -        -       -
dm emc_clariion0_0 emc_clariion0_0 -  4120320  -        -        -       -
dm emc_clariion0_1 emc_clariion0_1 -  4120320  -        -        -       -
dm emc_clariion0_2 emc_clariion0_2 -  4120320  -        -        -       -
dm emc_clariion0_3 emc_clariion0_3 -  4120320  -        -        -       -

To allocate both the data and the log on the disks that are attached to the particular HBA and that have the array type A/A:

# vxassist -g testdg make v1 1G logtype=dco dcoversion=20 \
require=hostportid:06-08-02,arraytype:A/A

The following output shows the results of the above command. The command allocated disk space for the data and the log on emc_clariion0 array disks, which satisfy all the storage specifications in the require constraint:

# vxprint -g testdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg testdg       testdg       -        -        -        -        -       -

dm ams_wms0_359 ams_wms0_359 -        2027264  -        -        -       -
dm ams_wms0_360 ams_wms0_360 -        2027264  -        -        -       -
dm ams_wms0_361 ams_wms0_361 -        2027264  -        -        -       -
dm ams_wms0_362 ams_wms0_362 -        2027264  -        -        -       -
dm emc_clariion0_0 emc_clariion0_0 -  4120320  -        -        -       -
dm emc_clariion0_1 emc_clariion0_1 -  4120320  -        -        -       -
dm emc_clariion0_2 emc_clariion0_2 -  4120320  -        -        -       -
dm emc_clariion0_3 emc_clariion0_3 -  4120320  -        -        -       -

v  v1           fsgen        ENABLED  2097152  -        ACTIVE   -       -
pl v1-01        v1           ENABLED  2097152  -        ACTIVE   -       -
sd emc_clariion0_0-01 v1-01  ENABLED  2097152  0        -        -       -
dc v1_dco       v1           -        -        -        -        -       -
v  v1_dcl       gen          ENABLED  67840    -        ACTIVE   -       -
pl v1_dcl-01    v1_dcl       ENABLED  67840    -        ACTIVE   -       -
sd emc_clariion0_0-02 v1_dcl-01 ENABLED 67840  0        -        -       -

Example 2 - use constraint

This example shows the use constraint in a disk group that has disks from three arrays: ams_wms0, emc_clariion0, and hitachi_vsp0.

The following output shows the disk group information:

# vxprint -g testdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg testdg       testdg       -        -        -        -        -       -

dm ams_wms0_359 ams_wms0_359 -        2027264  -        -        -       -
dm ams_wms0_360 ams_wms0_360 -        2027264  -        -        -       -
dm ams_wms0_361 ams_wms0_361 -        2027264  -        -        -       -
dm ams_wms0_362 ams_wms0_362 -        2027264  -        -        -       -
dm emc_clariion0_0 emc_clariion0_0 -  4120320  -        -        -       -
dm hitachi_vsp0_3 hitachi_vsp0_3 -    4120320  -        -        -       -

To allocate both the data and the log on the disks that belong to the array ams_wms0 or the array emc_clariion0:

# vxassist -g testdg make v1 3G logtype=dco dcoversion=20 \
use=array:ams_wms0,array:emc_clariion0

The following output shows the results of the above command. The command allocated disk space for the data and the log on disks that satisfy the arrays specified in the use constraint.

# vxprint -g testdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg testdg       testdg       -        -        -        -        -       -

dm ams_wms0_359 ams_wms0_359 -        2027264  -        -        -       -
dm ams_wms0_360 ams_wms0_360 -        2027264  -        -        -       -
dm ams_wms0_361 ams_wms0_361 -        2027264  -        -        -       -
dm ams_wms0_362 ams_wms0_362 -        2027264  -        -        -       -
dm emc_clariion0_0 emc_clariion0_0 -  4120320  -        -        -       -
dm hitachi_vsp0_3 hitachi_vsp0_3 -    4120320  -        -        -       -

v  v1           fsgen        ENABLED  6291456  -        ACTIVE   -       -
pl v1-01        v1           ENABLED  6291456  -        ACTIVE   -       -
sd ams_wms0_359-01 v1-01     ENABLED  2027264  0        -        -       -
sd ams_wms0_360-01 v1-01     ENABLED  143872   2027264  -        -       -
sd emc_clariion0_0-01 v1-01  ENABLED  4120320  2171136  -        -       -
dc v1_dco       v1           -        -        -        -        -       -
v  v1_dcl       gen          ENABLED  67840    -        ACTIVE   -       -
pl v1_dcl-01    v1_dcl       ENABLED  67840    -        ACTIVE   -       -
sd ams_wms0_360-02 v1_dcl-01 ENABLED  67840    0        -        -       - 

Example 3: datause and logrequire combination

This example shows the combination of a datause constraint and a logrequire constraint. The disk group has disks from three arrays: ams_wms0, emc_clariion0, and hitachi_vsp0, which have different array types.

The following output shows the disk group information:

# vxprint -g testdg
 TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
 dg testdg       testdg       -        -        -        -        -       - 
dm ams_wms0_359 ams_wms0_359 -        2027264  -        -        -       - 
dm ams_wms0_360 ams_wms0_360 -        2027264  -        -        -       - 
dm ams_wms0_361 ams_wms0_361 -        2027264  -        -        -       - 
dm ams_wms0_362 ams_wms0_362 -        2027264  -        -        -       - 
dm emc_clariion0_0 emc_clariion0_0 -  4120320  -        -        -       - 
dm emc_clariion0_1 emc_clariion0_1 -  4120320  -        -        -       - 
dm emc_clariion0_2 emc_clariion0_2 -  4120320  -        -        -       - 
dm emc_clariion0_3 emc_clariion0_3 -  4120320  -        -        -       - 
dm hitachi_vsp0_3 hitachi_vsp0_3 -    4120320  -        -        -       - 

To allocate data on disks from ams_wms0 or emc_clariion0 array, and to allocate log on disks from arraytype A/A-A:

# vxassist -g testdg make v1 1G logtype=dco dcoversion=20 \
datause=array:ams_wms0,array:emc_clariion0 logrequire=arraytype:A/A-A

The following output shows the results of the above command. The command allocated disk space for the data and the log independently. The data space is allocated on emc_clariion0 disks that satisfy the datause constraint. The log space is allocated on ams_wms0 disks that are A/A-A arraytype and that satisfy the logrequire constraint:

# vxprint -g testdg 
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0 
dg testdg       testdg       -        -        -        -        -       - 
dm ams_wms0_359 ams_wms0_359 -        2027264  -        -        -       - 
dm ams_wms0_360 ams_wms0_360 -        2027264  -        -        -       - 
dm ams_wms0_361 ams_wms0_361 -        2027264  -        -        -       - 
dm ams_wms0_362 ams_wms0_362 -        2027264  -        -        -       - 
dm emc_clariion0_0 emc_clariion0_0 -  4120320  -        -        -       - 
dm emc_clariion0_1 emc_clariion0_1 -  4120320  -        -        -       - 
dm emc_clariion0_2 emc_clariion0_2 -  4120320  -        -        -       - 
dm emc_clariion0_3 emc_clariion0_3 -  4120320  -        -        -       - 
dm hitachi_vsp0_3 hitachi_vsp0_3 -    4120320  -        -        -       - 

v  v1           fsgen        ENABLED  2097152  -        ACTIVE   -       - 
pl v1-01        v1           ENABLED  2097152  -        ACTIVE   -       - 
sd emc_clariion0_0-01 v1-01  ENABLED  2097152  0        -        -       - 
dc v1_dco       v1           -        -        -        -        -       - 
v  v1_dcl       gen          ENABLED  67840    -        ACTIVE   -       - 
pl v1_dcl-01    v1_dcl       ENABLED  67840    -        ACTIVE   -       - 
sd ams_wms0_359-01 v1_dcl-01 ENABLED  67840    0        -        -       - 

Example 4 - use and require combination

This example shows the combination of a use constraint and a require constraint. The disk group has disks from three arrays: ams_wms0, emc_clariion0, and hitachi_vsp0. Only the disks from ams_wms0 array are multi-pathed.

The following output shows the disk group information:

# vxprint -g testdg 
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0 
dg testdg       testdg       -        -        -        -        -       - 
dm ams_wms0_359 ams_wms0_359 -        2027264  -        -        -       - 
dm ams_wms0_360 ams_wms0_360 -        2027264  -        -        -       - 
dm ams_wms0_361 ams_wms0_361 -        2027264  -        -        -       - 
dm ams_wms0_362 ams_wms0_362 -        2027264  -        -        -       - 
dm emc_clariion0_0 emc_clariion0_0 -  4120320  -        -        -       - 
dm emc_clariion0_1 emc_clariion0_1 -  4120320  -        -        -       - 
dm emc_clariion0_2 emc_clariion0_2 -  4120320  -        -        -       - 
dm emc_clariion0_3 emc_clariion0_3 -  4120320  -        -        -       - 
dm hitachi_vsp0_3 hitachi_vsp0_3 -    4120320  -        -        -       - 

To allocate data and log space on disks from emc_clariion0 or ams_wms0 array, and disks that are multi-pathed:

# vxassist -g testdg make v1 1G logtype=dco dcoversion=20 \
use=array:emc_clariion0,array:ams_wms0 require=multipathed:yes

The following output shows the results of the allocation. The data and log space is on ams_wms0 disks, which satisfy the use as well as the require constraints:

# vxprint -g testdg 
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0 
dg testdg       testdg       -        -        -        -        -       - 
dm ams_wms0_359 ams_wms0_359 -        2027264  -        -        -       - 
dm ams_wms0_360 ams_wms0_360 -        2027264  -        -        -       - 
dm ams_wms0_361 ams_wms0_361 -        2027264  -        -        -       - 
dm ams_wms0_362 ams_wms0_362 -        2027264  -        -        -       - 
dm emc_clariion0_0 emc_clariion0_0 -  4120320  -        -        -       - 
dm emc_clariion0_1 emc_clariion0_1 -  4120320  -        -        -       - 
dm emc_clariion0_2 emc_clariion0_2 -  4120320  -        -        -       - 
dm emc_clariion0_3 emc_clariion0_3 -  4120320  -        -        -       - 
dm hitachi_vsp0_3 hitachi_vsp0_3 -    4120320  -        -        -       - 
v  v1           fsgen        ENABLED  2097152  -        ACTIVE   -       - 
pl v1-01        v1           ENABLED  2097152  -        ACTIVE   -       - 
sd ams_wms0_359-01 v1-01     ENABLED  2027264  0        -        -       - 
sd ams_wms0_360-01 v1-01     ENABLED  69888    2027264  -        -       - 
dc v1_dco       v1           -        -        -        -        -       - 
v  v1_dcl       gen          ENABLED  67840    -        ACTIVE   -       - 
pl v1_dcl-01    v1_dcl       ENABLED  67840    -        ACTIVE   -       - 
sd ams_wms0_360-02 v1_dcl-01 ENABLED  67840    0        -        -       -