Unsolved
This post is more than 5 years old
28 Posts
0
2851
October 29th, 2007 05:00
Identify what app is using device before removing dead device from PPath
Hello there!
Every now and then I need to remove devices from PowerPath under Solaris. Sometimes there are applications managing these devices, and PowerPath doesn't allow me to remove some of those paths (for example, when all paths are dead, using global removal «powermt remove dev=all» or «powermt check force», then «devfsadm -C»).
Usualy the applications managing these devices are Sun Cluster, Veritas Volume Manager (VxVM), or others.
My question is: is there an easy way to detect what application is using a specific device before I can plan its removal? Something different then a «lsof» check...
Many thanks,
Celso Capao.
Every now and then I need to remove devices from PowerPath under Solaris. Sometimes there are applications managing these devices, and PowerPath doesn't allow me to remove some of those paths (for example, when all paths are dead, using global removal «powermt remove dev=all» or «powermt check force», then «devfsadm -C»).
Usualy the applications managing these devices are Sun Cluster, Veritas Volume Manager (VxVM), or others.
My question is: is there an easy way to detect what application is using a specific device before I can plan its removal? Something different then a «lsof» check...
Many thanks,
Celso Capao.



dynamox
9 Legend
•
20.4K Posts
0
October 29th, 2007 06:00
xe2sdc
4 Operator
•
2.8K Posts
0
October 29th, 2007 08:00
xe2sdc
4 Operator
•
2.8K Posts
0
October 29th, 2007 08:00
clst01t/root> symrslv -h
NAME
symrslv - Displays detailed mapping information about
a disk storage object.
SYNOPSIS
symrslv [-h] [-version] [-kb|-blocks|-mb]
pd PdevName
[-no_extents|-expand|-pdev_extents]
lv LVolName -g VgName
[-no_extents|-expand|-pdev_extents]
[-stripe_column] [-type VgType]
file FileName
[-no_extents|-expand|-pdev_extents|
-collapse|-phys_collapse]
dir Directory
[-no_extents|-expand|-pdev_extents]
fs MountPoint
[-no_extents|-expand|-pdev_extents]
ccapao
28 Posts
0
October 29th, 2007 19:00
I think "fuser" will only work for mount points, and my problem is that usually those devices are already unmounted, but still managed by third party applications (VxVM, SUNClu, etc); Non-the-less I'll double-check this.
Unfortunately «/usr/local/bin/lsof» doesn't report me that those power devices are in use, and thats why I'm asking this...
About SYMCLI commands, thats very good if you have them installed and properly licensed, but there are some costumer scenarios where I don't have those tools. But in the end, I'll be stuck with the limitations of that command. I think I'll really need an O.S. command to help me with this...
Many thanks once again
Celso Capao.
xe2sdc
4 Operator
•
2.8K Posts
0
October 30th, 2007 00:00
my problem is that usually those devices are already
unmounted, but still managed by third party
applications (VxVM, SUNClu, etc); Non-the-less I'll
double-check this.
I've found something that may be usefull ..
http://www.google.it/url?sa=t&ct=res&cd=2&url=http%3A%2F%2Fwww.sunmanagers.org%2Fpipermail%2Fsunmanagers%2F2005-March%2F035108.html&ei=yN8mR57AIJjAwwHuwbBy&usg=AFQjCNF--ideLdIFBNOBX4HC8LsiXmu_GQ&sig2=HEBq5DTWVRy4cfFqAkWnVA
them installed and properly licensed, but there are
some costumer scenarios where I don't have those
tools. But in the end, I'll be stuck with the
limitations of that command. I think I'll really need
an O.S. command to help me with this...
You are right .. you need licenses .. but I work for EMC ..
I need to earn my salary ..
I have a family, an house .. and we want to paint our house ..
-s-
dynamox
9 Legend
•
20.4K Posts
0
October 30th, 2007 03:00
You are right .. you need licenses .. but I work for
EMC ..
I need to earn my salary ..
I have a family, an house .. and we want to paint our
house ..
man ..you are so needy
MarcT2
2 Intern
•
131 Posts
0
October 30th, 2007 06:00
You'll need to check all the powerpath children and the power device itself, for both raw & disk devices.
For example:
sun2# powermt display dev=c1t80d160s0
Pseudo name=emcpower19a
Symmetrix ID=x
Logical device ID=00B2
state=alive; policy=SymmOpt; priority=0; queued-IOs=0
==============================================================================
---------------- Host --------------- - Stor - -- I/O Path - -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
2304 sbus@1f/lpfs@1 c1t80d160s0 FA 3aA active alive 0 0
2305 sbus@1f/lpfs@3 c2t81d160s0 FA 14aA active alive 0 1
sun2# fuser /dev/rdsk/c1t80d160s0
/dev/rdsk/c1t80d160s0:
sun2# fuser /dev/rdsk/c2t81d160s0
/dev/rdsk/c2t81d160s0:
sun2# fuser /dev/rdsk/emcpower19a
/dev/rdsk/emcpower19a:
sun2# fuser /dev/dsk/c1t80d160s0
/dev/dsk/c1t80d160s0: 1300c 1164c
^^^^^^^^^^^^^^
sun2# fuser /dev/dsk/c2t81d160s0
/dev/dsk/c2t81d160s0:
sun2# fuser /dev/dsk/emcpower19a
/dev/dsk/emcpower19a:
As you can see, there are some processes accessing the /dev/dsk/c1t80d160s0 device in this example.
Hope that helps!
xe2sdc
4 Operator
•
2.8K Posts
0
October 30th, 2007 06:00
dynamox
9 Legend
•
20.4K Posts
0
October 30th, 2007 06:00
wescott1
36 Posts
0
October 30th, 2007 08:00
# ls -l /dev/dsk/emcpower3a
lrwxrwxrwx 1 root root 33 Jan 4 2007 /dev/dsk/emcpower3a -> ../../devices/pseudo/emcp@3:a,blk
# ls -l /devices/pseudo/emcp@3:a,blk
brw------- 1 root root 254, 24 Dec 21 2006 /devices/pseudo/emcp@3:a,blk
In this case: major = 254, minor = 24. Then put lsof to work:
# lsof | grep ' 254,24 '
bash 16845 root cwd VDIR 254,24 512 75712 /vob/store4/views
lsof 16915 root cwd VDIR 254,24 512 75712 /vob/store4/views
grep 16916 root cwd VDIR 254,24 512 75712 /vob/store4/views
lsof 16917 root cwd VDIR 254,24 512 75712 /vob/store4/views
Note, there are spaces before and after 254,24 to ensure an exact match.
ccapao
28 Posts
0
October 31st, 2007 12:00
EMC ..
I need to earn my salary ..
I have a family, an house .. and we want to paint our
house ..
-s-
LOL
Stefano, that was hilarious; please keep up that humor!
Many thanks you all guys; I'll test your suggestions this night (yeah, this night.. I also have so much to pay
Celso Capao.
xe2sdc
4 Operator
•
2.8K Posts
0
November 16th, 2007 02:00
ccapao
28 Posts
0
November 22nd, 2007 02:00
Sorry for the delay, I've been out!
Unfortunately it didn't worked.
Weirdly «lsof» isn't identifying disk/lun locations. Though, I've mounted those filesystems and done a «tail -f » to some files there, just to check. Even doing this I was unable to identify the lun; files are shown in the lsof output, but I noticed that there is an error displayed in those lsof lines; this seems to be the reason.
fuser isn't working also; I think the problem is the same.
I'll try to get back to the costumer and show you guys some output.
Many thanks,
Celso Capao