If you are using a VIO Server to manage your connections to a SAN and plan on allowing more than one LPAR to connect to the same LUN, you probably need to change the "reserve_lock" setting from "yes" to "no". In an EMC SAN running PowerPath, you would change this setting on the hdiskpowerX device. Oracle database clusters would definitely need this setting changed to "no".
DISCLAIMER: Your mileage may vary but these guidelines have been tested to work. Use at your own risk.
Software Used:
* Virtual I/O v1.3.0.1-FP-8.1
* EMC Navisphere Agent / Client v6.24
* EMC ODM Filesets v5.3.0.0
* EMC PowerPath Filesets v5.0.0.0
The following steps will allow you to change the reserve_lock setting on the VIO Server:
1. Let's see the current setting.
$ oem_seup_env (to leave the restricted shell)
# lsattr -El hdiskpower2
cgname Consistency Group Name True
clr_q no Clear Queue (RS/6000) True
location Location True
lun_id 0x2000000000000 LUN ID False
lun_reset_spt yes FC Forced Open LUN True
max_coalesce 0x100000 Maximum coalesce size True
max_transfer 0x100000 Maximum transfer size True
pvid none Physical volume identifier False
pvid_takeover yes Takeover PVIDs from hdisks True
q_err yes Use QERR bit True
q_type simple Queue TYPE False
queue_depth 32 Queue DEPTH True
reassign_to 120 REASSIGN time out value True
reserve_lock yes Reserve device on open True
rw_timeout 30 READ/WRITE time out True
scsi_id 0x21000 SCSI ID False
start_timeout 60 START unit time out True
ww_name 0x5006016830603e48 World Wide Name False
2. Let's try and change the setting with an LPAR running.
# chdev -l hdiskpower0 -a reserve_lock=no
Method error (/etc/methods/chgpowerdisk):
0514-062 Cannot perform the requested function because the
specified device is busy.
3. The error in step 2 makes sense because we have mapped the physical device to a virtual device.
$ lsmap -vadapter vhost3
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost3 U9131.52A.063448G-V1-C22 0x00000002
VTD vhdiskpower2
LUN 0x8100000000000000
Backing device hdiskpower2
Physloc U787F.001.DPM1545-P1-C5-T1-L8
4. Shutdown the LPAR that is using the device in step 3.
5. Remove the virtual adapter and its mapping.
# exit (to return to the restricted shell)
$ rmdev -dev vhost3 -recursive
vhdiskpower2 deleted
vhost3 deleted
6. Change the reserve_lock setting.
# chdev -l hdiskpower2 -a reserve_lock=no
hdiskpower2 changed
7. Let's make sure the setting changed.
$ oem_seup_env (to leave the restricted shell)
# lsattr -El hdiskpower2
cgname Consistency Group Name True
clr_q no Clear Queue (RS/6000) True
location Location True
lun_id 0x2000000000000 LUN ID False
lun_reset_spt yes FC Forced Open LUN True
max_coalesce 0x100000 Maximum coalesce size True
max_transfer 0x100000 Maximum transfer size True
pvid none Physical volume identifier False
pvid_takeover yes Takeover PVIDs from hdisks True
q_err yes Use QERR bit True
q_type simple Queue TYPE False
queue_depth 32 Queue DEPTH True
reassign_to 120 REASSIGN time out value True
reserve_lock no Reserve device on open True
rw_timeout 30 READ/WRITE time out True
scsi_id 0x21000 SCSI ID False
start_timeout 60 START unit time out True
ww_name 0x5006016830603e48 World Wide Name False
8. Now that we have verified the changes, we need to re-create our virtual device.
# exit (to return to the restricted shell)
$ cfgdev (to bring back vhost3)
$ mkvdev -vdev hdiskpower2 -vadapter vhost3 -dev vhdiskpower2
vhdiskpower2 Available
$ lsmap -vadapter vhost3
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost3 U9131.52A.063448G-V1-C22 0x00000002
VTD vhdiskpower2
LUN 0x8100000000000000
Backing device hdiskpower2
Physloc U787F.001.DPM1545-P1-C5-T1-L8
9. You can now activate the LPAR that was using this device.