LUn' unmapped from storage still showing on Solaris 10

How can i remove LUN's from solaris 10 those are unmapped from SAN?

from storage side i got confirmation that they removed lun. but in my solaris box still it's visible.

i tried below.

root@globalares2.example.com #luxadm -e offline /dev/rdsk/c2t600D02310007D16C42FF09E24B5B8255d0s2
Error: can't acquire "/devices/scsi_vhci/ssd@g600d02310007d16c42ff09e24b5b8255:c,raw": Device busy

Hi bentech4u,
Try running 'lsof | grep /dev/rdsk/c2t600D023' and see if it shows any processes still using the device. Cycling the process will probably free it up.

Thanks,
Tony

HI

thanks for your reply.

root@globalares2.example.com #lsof | grep /dev/rdsk/c2t600D023
bash: lsof: command not found

i am using solaris 10 SPARC. is there any patch need to install ?

---------- Post updated at 10:19 PM ---------- Previous update was at 10:08 PM ----------

hi sorry. i have installed lsof package and i got below wile trying the command you suggested

lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002
lsof: no pwd entry for UID 1002

The lsof output just means it found something (a process, file, etc) in use by a user with the UID of 1002 but that user is not listed in the /etc/passwd file. I've seen this happen two different ways, there may be more. 1) The user started some processes and was removed from the system, but the processes continue to run. 2) The user is an NIS user and something has gone horribly wrong with NIS (but I think I have maybe only seen this once).

Let's back up a bit. Can you provide more info about the circumstances leading up to the LUN being removed? For example, are you scraping an Oracle instance that was running on the system and removed the LUNs and User ID? What SAN are you using?

If there is some event matching this type of scenario then I would be confident UID 1002 still has some processes running that are using that LUN.

In that case you can run 'ps -u 1002' or 'ps -U 1002' and see if you can identify the process or processes. You can then try to stop them gracefully, kill -HUP them, or kill -9 them.

If you have some other scenario where UID 1002 may not have anything to do with the issue, please give some details and we can try to tackle it a different way.

Thanks

Seems like your 1st suggestion is more matching bcoz i am not using NIS

The filesystem is unmounted completely from the system. My storage is EMC

Regarding process id, i will check and update you

I'm signing off for the night but some other commands that may help you work through this are:

To clean up the device list:

devfsadm -C 

To remove hardware:

cfgadm -c unconfigure

To check currently available disks:

probe-scsi

And you already are aware of luxadm. Please read the man pages before running any of the above to make sure they will help you and not hurt you.

---------- Post updated at 09:42 PM ---------- Previous update was at 09:38 PM ----------

And one other thing: if you are using powerpath, Veritas, or some other multipathing software you may need to update them before you can fully remove the device.

this is related to process search

root@globalares2.example.com #ps -u 1002
ps: unknown user 1002
root@globalares2.example.com #ps -U 1002
ps: unknown user 1002
root@globalares2.example.com #more /etc/passwd | grep -i 1002

---------- Post updated 06-15-15 at 12:06 AM ---------- Previous update was 06-14-15 at 11:45 PM ----------

HI, i found the same server has 2 zones and 2 LUN from same storage is assigned to these 2 zones, and the userid 1002 is with one of the zone

root@test.example.com #zoneadm list | awk 'NR>1' | while read n ; do echo $n ;zlogin $n more /etc/passwd | grep -i 1002;done
uatfindbr
applfin:x:1002:111::/export/home/applfin:/bin/ksh
applshut:x:1002:111:backup-operation:/export/home/applshut:/bin/sh
applstart:x:1002:111:backup-operation:/export/home/applstart:/bin/sh

Sometime ago, in my contribution to another thread, I uploaded an EMC (copyright acknowledged) document detailing their storage use with Solaris. Although the context of this was iSCSI, this document covers SCSI and FC SAN's too.

Find the pdf attached to this thread:

You don't say the model of your EMC storage but the document covers most things.

Heavy reading but I hope it helps. (Perhaps not).