Map lun info to phyical disks

I have been ask to write a script to show what phyical disks are linked to what luns. By host name. I was hoping someone had some ideas on how to do this. I am from a linux background and am struggling a bit here...lol...I have been given one command to help me out....lsmap..Anyhelp would be nice...

That depends on what storage subsystem(s) you are using. There is no general solution to that. Starting points would be the "fget_config" command for FC-disks, the "maymap" command for SSA-disks. For SCSI-disks the task should be obvious.

I hope this helps.

bakunin

List the disknames with the lsdev command and specify your disktype, examples:
lsdev -Cc disk -t htcuspmpio -Fname # Hitachi
lsdev -Cc disk -t MSYM_RAID -Fname # Emc
lsdev -Cc disk -t mpioosdisk -Fname # IBM generic MPIO

Then you can use the diskname with the lscfg command to get the LUN ID, usually the last part of the location code, example:
lscfg -l hdisk#

You definitely need to precise which storage subsystem you have. For instance on DS4x00 you will use fget_config -Av
on DS8x00 you will use "datapath query essmap"
on EMC , powermt display dev=all