chvol

Use the chvol command to change the protection setting for a volume. You cannot change the protection setting for a volume that is in a session.

Syntax

Read syntax diagramSkip visual syntax diagramchvol-help-h-?-quiet-protected-unprotectedvolume_idh1_volume_name -

Parameters

-help | -h | -?
Lists help for the command. If you specify additional parameters and arguments, those parameters and arguments are ignored.
-quiet
Suppresses the confirmation prompt for this command. This flag answers yes to all confirmation prompts.
-protected
Marks the volume or volumes as protected. It specifies that the volumes cannot be used in an add copy set action.
-unprotected
Marks the volume or volumes as unprotected. It specifies that the volumes can be used in an add copy set action.
volume_id | volume_name | -
Specifies the volume for which you want to change the protection setting.
For IBM® DS8000 and IBM® TotalStorage Enterprise Storage Server® Model 800 storage systems, use the volume ID for this parameter.
For other storage systems, you can use the volume ID or name for this parameter.
Alternatively, use the dash (-) to specify that input for this parameter comes from an input stream (stdin). The dash is supported only in single-shot mode.

Example: Protecting a volume by using a volume ID

The following command marks the volume DS8000:2107.04131:VOL:0001 as protected.

csmcli> chvol -protected DS8000:2107.04131:VOL:0001

The following output is returned:

Are you sure you want to change volume DS8000:2107.04131:VOL:0001? [y/n]:y
 IWNE9300I  The set protection command completed without any errors. There 
were 1 element(s) protected and 0 element(s) unprotected.

IWNE9302I  The element DS8000:2107.04131:VOL:0001 has been protected.

Example: Unprotecting a volume by using a volume ID

The following command marks the volume DS8000:2107.04131:VOL:0001 as unprotected.

csmcli> chvol -unprotected DS8000:2107.04131:VOL:0001

The following output is returned:

Are you sure you want to change volume DS8000:2107.04131:VOL:0001?
[y/n]:y
IWNE9300I  The set protection command completed without any errors. There 
were 0 element(s) protected and 1 element(s) unprotected.
IWNE9303I  The element DS8000:2107.04131:VOL:0001 has been unprotected.

Example: Protecting a volume by using a volume name

The following command marks the volume STORWIZE-V7000:VOL:FREEBIRD2:myvolume1 as protected.

csmcli> chvol -protected STORWIZE-V7000:VOL:FREEBIRD2:myvolume1

The following output is returned:

Are you sure you want to change volume 
STORWIZE-V7000:VOL:FREEBIRD2:7(myvolume1)? [y/n]:y
IWNE9300I  The set protection command completed without any errors. There 
were 1 element(s) protected and 0 element(s) unprotected.

IWNE9302I  The element STORWIZE-V7000:VOL:FREEBIRD2:7(myvolume1) 
has been protected.

Example: Unprotecting a volume by using a volume name

The following command marks the volume STORWIZE-V7000:VOL:FREEBIRD2:myvolume1 as unprotected.

csmcli> chvol -uprotected STORWIZE-V7000:VOL:FREEBIRD2:myvolume1

The following output is returned:

Are you sure you want to change volume 
STORWIZE-V7000:VOL:FREEBIRD2:7(myvolume1)? [y/n]:y
IWNE9300I  The set protection command completed without any errors. There 
were 0 element(s) protected and 1 element(s) unprotected.

IWNE9302I  The element STORWIZE-V7000:VOL:FREEBIRD2:7(myvolume1) 
has been unprotected.