Posts Tagged ioscan
Remove special (device) files in HP-UX
Posted by Lincoln Zuljewic Silva in HP-UX on November 30, 2011
You can use the command rmsf to remove special (device) files in HP-UX, example:
# rmsf -H 6/0/8/1/0.0.0
Where 6/0/8/1/0.0.0 is the HW PATH of the device.
Identify PV device in HP-UX 11.31
Posted by Lincoln Zuljewic Silva in HP-UX on September 8, 2011
In HP-UX 11.31, LVM doesn’t use “ctd’ (ie: /dev/rdsk/c2t1d0), but DSF to balance the throughput between many device paths., so if you need identify what physical device represent that logical device, you can use ioscan, for example:
server@root:/root # vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 12
Open LV 12
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4385
VGDA 2
PE Size (Mbytes) 16
Total PE 4375
Alloc PE 3998
Free PE 377
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 1122560m
VG Max Extents 70160
--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 2000
Current LE 125
Allocated PE 125
Used PV 1
LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 16384
Current LE 1024
Allocated PE 1024
Used PV 1
(...)
LV Name /dev/vg00/lvol12
LV Status available/syncd
LV Size (Mbytes) 5120
Current LE 320
Allocated PE 320
Used PV 1
--- Physical volumes ---
PV Name /dev/disk/disk4
PV Status available
Total PE 4375
Free PE 377
Autoswitch On
Proactive Polling On
Note that the pv name is “disk4”, not c2t1d3.
With ioscan you can reverse map it:
server@root:/root # ioscan -m dsf
Persistent DSF Legacy DSF(s)
========================================
/dev/rdisk/disk3 /dev/rdsk/c2t1d0
/dev/rdisk/disk4 /dev/rdsk/c2t0d0
/dev/rdisk/disk5 /dev/rdsk/c0t0d0
Now we know that the “disk4″ is the physical disk located in 12/0/1/1/0.0.0
root@brux0044:/root # ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
========================================================================
disk 1298 12/0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GMAP3735NC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0