Linking to Other Users' Minidisks

To link to another user's minidisk, use the LINK command.

Note: You can link to another user's virtual disk in storage in the same manner, if the virtual disk in storage is defined in the directory and not by the DEFINE command.

Before you can link to a minidisk, you must know:

  1. The read, write, or multiple passwords (if any) of the minidisk.
  2. The virtual device number of the minidisk to which you want to link (as defined in the user directory entry of the minidisk owner).
  3. The virtual device number you want to assign to the minidisk. You can assign the minidisk any virtual device number as long as the number you assign is not the same as the virtual device number of any of your other I/O devices. (If you specify a duplicate virtual device number, CP sends you a message to that effect and terminates the command). To find out the virtual device numbers you are currently using, enter:
    query virtual all
To link to another user's minidisk, enter:
link to userid vdev1 as vdev2 mode
Where:
userid
is the logon ID of the virtual machine user who owns the minidisk. If you own the minidisk, specify your own logon ID or an asterisk (*).
vdev1
is the virtual device number of the minidisk that you want to access, as defined in userid's directory entry.
vdev2
is the virtual device number you want to assign to the minidisk.
mode
determines how you want to access the minidisk. Valid modes include:
R
This gives you read-only access to the minidisk, unless another user has write mode (W, M), exclusive mode (ER, EW), or stable write mode (SW or SM) access to the disk.
RR
This gives you read-only access to the minidisk, unless another user has exclusive mode (ER, EW) access to the disk.
W
This gives you write access to the minidisk, unless another user has existing access to the disk.
WR
This gives you write access if no other user is linked to the minidisk. If another user is linked to the minidisk and the user does not have exclusive mode (ER, EW) access to the disk, you get read-only access.
M
This gives you multiple-write access, unless another user has write mode (W, M), stable mode (SR, SW, SM), or exclusive mode (ER,EW) access to the disk.
MR
This gives you write access, unless another user has write mode (W, M), stable mode (SR, SW, SM), or exclusive mode (ER, EW) access to the disk. If write mode (W, M) or stable mode (SR, SW, SM) access is established, you get read-only access. If exclusive mode (ER, EW) access is established, you are denied access.
MW
This gives you multiple-write access, unless another user has stable mode (SR, SW, SM) or exclusive mode (ER, EW) access to the disk; if so, access to the disk is denied.
SR
This gives you stable read-only access, unless another user has write mode (W, M), stable write mode (SW, SM), or exclusive mode (ER, EW) access to the disk. All requests for write access to the disk with an existing SR mode access are denied.
SW
This gives you stable write access, unless another user has an existing access to the disk. All requests for write access to the disk with an existing SW mode access are denied.
SM
This gives you stable multiple access, unless another user has write mode (W, M), stable mode (SR, SW, SM), or exclusive mode (ER, EW) access to the disk. All requests for write access to the disk with an existing SM mode access are denied.
ER
This gives you exclusive read-only access, unless another user has access to the disk. All requests for access to the disk with existing exclusive mode (ER, EW) access are denied.
EW
This gives you exclusive write access, unless another user has access to the disk. All requests for access to the disk with existing exclusive mode (ER, EW) access are denied.
Note: For information on other access modes you can specify with the LINK command, see z/VM: CP Commands and Utilities Reference.

Access-mode checking ignores conflict between a full-pack minidisk and any smaller minidisk on that same volume. A read/write full-pack minidisk and a read/write user's A-disk on the same DASD volume can be held as exclusive (each linked in EW mode). Although the first user links exclusive, that user cannot prevent the other from establishing a simultaneous write access. This situation is only possible if one defines a full-pack minidisk that overlaps other smaller minidisks on the same DASD volume.

In order to prevent conflicting access and to provide full data integrity, you must take the following precautions, do not:
  • Define overlapping minidisks.
  • Grant DEVMAINT authority to allow full-pack overlays.
  • Allow the primary system operator to use DEFINE MDISK.
Note: If an external security manager (ESM) is installed, you may not be authorized to enter the LINK command for all minidisks and all access modes. The ESM may downgrade certain requests for write access to read access. For additional information, contact your security administrator.