Description
|
Maps specified volumes using settings that override the volumes’ default mapping.
When a volume is created, if no mapping settings are specified the volume is not mapped. Otherwise, those settings become its default mapping, which specifies the controller host ports and access level that all connected initiators have to the volume, and the LUN presented to all initiators to identify the volume. The default mapping’s LUN is known as the volume’s
default LUN.
The map volume command creates mappings with different settings for different initiators. Optionally, you can specify the LUN, ports, and access level for a mapping. A mapping can make a volume accessible to initiators, or inaccessible to initiators (known as
masking). For example, assume a volume’s default mapping allows read-only access using LUN 5. You can give one initiator read-write access using LUN 6, and you can give a second initiator no access to the volume.
CAUTION:Using a default mapping for a volume will allow multiple hosts to access the volume. To avoid multiple hosts mounting the volume and causing corruption, the hosts must be cooperatively managed, such as by using cluster software.
NOTE:
- You cannot map a replication set’s secondary volume. Create a snapshot of the secondary volume or enable replication snapshot history and use the snapshot for mapping and accessing data.
- When mapping a volume to an initiator using the Linux ext3 file system, specify read-write access. Otherwise, the file system will be unable to mount/present/map the volume and will report an error such as “unknown partition table.”
|
Parameters
|
volumes|volume-groups
A comma-separated list of the names or serial numbers of the volumes or volume groups to map. For volume and volume-group syntax, see
Command syntax
access read-write|rw|read-only|ro|no-access
Optional. The access permission to use for the mapping: read-write (rw), read-only (ro), or
no-access. If the access parameter is specified as read-write or read-only, the
lun parameter must be specified. For an explicit mapping,
no-access causes the volume to be masked from specified initiators. If the
access parameter is omitted, access is set to
read-write.
host
hosts
Deprecated—use the
initiator parameter instead.
initiator
initiators|hosts|host-groups
Optional. A comma-separated list of initiators, hosts, or host groups to which to map the volumes. For initiator, host, and host-group syntax, see
Command syntax. If the
initiator parameter is specified, the
lun and
ports parameters must be specified. If the initiator parameter is omitted, the mapping applies to all initiators that are not explicitly mapped.
lun
LUN
Optional. The LUN to use for the mapping. If a single volume and multiple initiators are specified, the same LUN is used for each initiator. If multiple volumes and a single initiator are specified, the LUN will increment for the second and subsequent volumes. If multiple volumes and initiators are specified, each initiator will have the same LUN for the first volume, the next LUN for the second volume, and so on. The
lun parameter is ignored if
access is set to
no-access. If the
lun parameter is omitted, the default LUN is presented.
ports
ports
Optional. The controller host ports to use for the mapping. Any unspecified ports become unmapped. All specified ports must be the same type (FC, for example). For port syntax, see
Command syntax. If the
ports parameter is specified, the
lun parameter must also be specified. The
ports parameter is ignored if
access is set to
no-access. If the
ports parameter is omitted, all ports are mapped.
|
Examples
|
Map volume
vol2 with read-only access to initiator
Init1, using port A1 and LUN 100.
# map volume vol2 access ro ports a1 lun 100 initiator Init1
Map volumes
vol2 and
vol3 with read-write access for
Init2, using ports A1 and B1 and LUN 101.
# map volume vol2,vol3 access rw ports a1,b1 lun 101 initiator Init2
Mask volume
vol4 from
Init1 and
Init3.
# map volume vol4 access no-access initiator Init1,Init3
Map volumes
vol1 and
vol2 to initiators
Init1 and
Init2, using ports A1 and B1 starting with LUN 6, and view the results.
# map volume vol1,vol2 ports a1,b1 lun 6 initiator Init1,Init2
Map volume group
volGroupA to host group
hostGroupA, starting with LUN 1 on ports A0 and B0.
# map volume volGroupA.* initiator hostGroupA.*.* lun 1 port A0,B0
|