I ran into something interesting today with zFCP disk.  I've assigned a
LUN to a linux server and it worked great.  I did the following.

1.      Set the adapter on line with chccwdev -e command
2.      Added target port to FCP adapter by echoing port_add into wwpn.
                ex.  echo 0x50060e800571f007 > port_add
3.      I cd to new port directory and added FCP LUN to that port by
echoing unit_add into new port directory.\
                ex.     Echo 0x000b000000000000 > unit_add
4.      SCSI disk was available.  I validated it with lsscsi command.

I noticed that the LUN size was incorrect so I wanted to change the
adapter to use a different LUN.  In this case 0x0007000000000000. I
removed the old LUN and changed added the new LUN with the following
script.

#!/bin/bash
OLD_PWD=`pwd`
DIR=/sys/bus/ccw/drivers/zfcp
DROP=0x000b000000000000
ADD=0x0007000000000000
PORT1=0x50060e800571f007
PORT2=0x50060e800571f017
PORT3=0x50060e800571f006
PORT4=0x50060e800571f016
echo 1 > /sys/bus/scsi/devices/0\:0\:0\:1/delete
echo 1 > /sys/bus/scsi/devices/1\:0\:0\:1/delete
echo 1 > /sys/bus/scsi/devices/2\:0\:0\:1/delete
echo 1 > /sys/bus/scsi/devices/3\:0\:0\:1/delete
echo $DROP > $DIR/0.0.dc00/$PORT1/unit_remove
echo $DROP > $DIR/0.0.dd00/$PORT2/unit_remove
echo $DROP > $DIR/0.0.de00/$PORT3/unit_remove
echo $DROP > $DIR/0.0.df00/$PORT4/unit_remove
echo $ADD > $DIR/0.0.dc00/$PORT1/unit_add
echo $ADD > $DIR/0.0.dd00/$PORT2/unit_add
echo $ADD > $DIR/0.0.de00/$PORT3/unit_add
echo $ADD > $DIR/0.0.df00/$PORT4/unit_add

It shows the new LUN.  I validated it with the lszfcp -D command.
Output below:
        0.0.dc00/0x50060e800571f007/0x0007000000000000 0:0:0:1
        0.0.dd00/0x50060e800571f017/0x0007000000000000 1:0:0:1
        0.0.de00/0x50060e800571f006/0x0007000000000000 2:0:0:1
        0.0.df00/0x50060e800571f016/0x0007000000000000 3:0:0:1

So you can see that the lun is now 0X0007.  When I reboot, it goes back
to 0x000b.  What am I missing?  To get around this issue, I had to move
LUNs around on the disk subsystem side.  Can someone give me a good
process of removing LUNs and then readd them or tell me what I'm
missing.         
                





Regards,

Scott Shumate
Software Systems Prog Spec
Branch Bank & Trust
Assistant Vice President
Mainframe Support
Mail Code: 100-99-09-10
Work:  (252) 246-2306
Cell:    (252) 373-9605
----------------------------------
 .~.
 /\/\
/(  )\
^^-^^
Linux on Systems Z
---------------------------------

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to