Setting the access mode
You might want to access the DCSS device with write access to change the content of the DCSS or set of DCSSs that map to the device.
About this task
- shared
- In the shared mode, changes to DCSSs are immediately visible
to all z/VM guests that
access them. Shared is the default. Note: Writing to a shared DCSS device bears the same risks as writing to a shared disk.
- exclusive-writable
- In the exclusive-writable mode you write to private copies of
DCSSs. A private copy is writable, even if the original DCSS is read-only. Changes
that you make to a private copy are invisible to other guests until
you save the changes.
After saving the changes to a DCSS, all guests that open the DCSS access the changed copy. z/VM retains a copy of the original DCSS for those guests that continue accessing it, until the last guest stops using it.
To access a DCSS in the exclusive-writable mode the maximum definable storage size of your z/VM virtual machine must be above the upper limit of the DCSS. Alternatively, suitable authorizations must be in place.
For either access mode the changes are volatile until they are saved.
Procedure
Set the access mode before you open the DCSS device. To set the access mode to
exclusive-writable, set the DCSS device's shared attribute to 0
. To reset the
access mode to shared set the DCSS device's shared attribute to 1
.
# echo <flag> > /sys/devices/dcssblk/<dcss-name>/shared
where <dcss-name> is
the DCSS name that represents the DCSS device.You can read the shared attribute to find out the current access mode.
Example
MYDCSS:
# cat /sys/devices/dcssblk/MYDCSS/shared
1
1
means that the current
access mode is shared. To set the access mode to exclusive-writable issue:
# echo 0 > /sys/devices/dcssblk/MYDCSS/shared