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