Operating System - HP-UX
1753773 Members
5375 Online
108799 Solutions
New Discussion юеВ

Re: How do i cleanup the removed/detached devices ???

 
Raghunanda K
New Member

How do i cleanup the removed/detached devices ???

Hi,

Am new to HPUX . I need your assistance..

I had attached a Clariion(storage) LUN into HPUX machine, devices with 2GB(c8t0d0) and 1GB(c8t0d1) space. Later some point of time, detached these devices from HPUX machine and executed 'insf' command to build the new devices directory special files .
(Note:Attaching and detaching done using NaviCLI software.)

Looks like these devices were not removed/cleaned completely from the machine,

Still I can see these devices entry under /dev/rdsk folder
#ls -l
crw-r----- 1 bin sys 188 0x080000 Dec 7 2007 c8t0d0
crw-r----- 1 bin sys 188 0x080100 Oct 6 14:02 c8t0d1

I can see devices(only c8t0d0) is coming under ioscan command even after detaching also
# ioscan -fnl
disk 4 0/4/1/0.102.17.0.0.0.0 sdisk CLAIMED DEVICE DGC CX600WDUNB
/dev/dsk/c8t0d0 /dev/rdsk/c8t0d0

And also checked for diskinfo of removed devices,
# diskinfo /dev/rdsk/c8t0d0
SCSI describe of /dev/rdsk/c8t0d0:
vendor: DGC
product id: CX600WDUNB
type: direct access
size: 0 Kbytes
bytes per sector: 0

# diskinfo /dev/rdsk/c8t0d1
io_search failed: No match found.


So, how do i remove these detached/removed devices from HPUX machine ?????
9 REPLIES 9
Wim Rombauts
Honored Contributor

Re: How do i cleanup the removed/detached devices ???

If ioscan returns "CLAIMED" and diskinfo returns such data, the device is NOT detaxched. It is still there, so check your storage.

When storage is detached, ioscan will show NO_HW.

You can remove device files with the rmsf command, which does the reverse of insf. (See man page)
Johnson Punniyalingam
Honored Contributor

Re: How do i cleanup the removed/detached devices ???

insf -e

ioscan -fnC disk

rmsf command

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Suraj K Sankari
Honored Contributor

Re: How do i cleanup the removed/detached devices ???

Hi,

rmsf is the command to remove a special (device) file from a server.
For more information please see the man pages of rmsf


Suraj
SKR_1
Trusted Contributor

Re: How do i cleanup the removed/detached devices ???

1.Use rmsf -H command to remove device files.
2.Take reboot.

Thanks
SKR
likid0
Honored Contributor

Re: How do i cleanup the removed/detached devices ???

If its in the NO_HW state

rmsf -H hdwpath
then ioscan -ef

Then when give it a reboot it will go away

Windows?, no thanks
Raghunanda K
New Member

Re: How do i cleanup the removed/detached devices ???

I did it again...
Initially attached the storage LUN.
First, executed 'insf -e' command.

Then devices start visible nad then executed
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=============================================================================
disk 4 0/4/1/0.102.17.0.0.0.0 sdisk CLAIMED DEVICE DGC CX600WDR5
/dev/dsk/c8t0d0 /dev/rdsk/c8t0d0
disk 13 0/4/1/0.102.17.0.0.0.1 sdisk CLAIMED DEVICE DGC CX600WDR5
/dev/dsk/c8t0d1 /dev/rdsk/c8t0d1
disk 22 0/4/1/0.102.17.0.0.0.2 sdisk CLAIMED DEVICE DGC CX600WDR1
/dev/dsk/c8t0d2 /dev/rdsk/c8t0d2

Disk info fo these devices
# diskinfo c8t0d0
SCSI describe of c8t0d0:
vendor: DGC
product id: CX600WDR5
type: direct access
size: 2097152 Kbytes
bytes per sector: 512

# diskinfo c8t0d1
SCSI describe of c8t0d1:
vendor: DGC
product id: CX600WDR5
type: direct access
size: 1048576 Kbytes
bytes per sector: 512

# diskinfo c8t0d2
SCSI describe of c8t0d2:
vendor: DGC
product id: CX600WDR1
type: direct access
size: 2097152 Kbytes
bytes per sector: 512

Then i removed/detached these devices and executed 'insf -e' command.

Then executed ioscan command
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=============================================================================
disk 4 0/4/1/0.102.17.0.0.0.0 sdisk CLAIMED DEVICE DGC CX600WDUNB
/dev/dsk/c8t0d0 /dev/rdsk/c8t0d0
disk 13 0/4/1/0.102.17.0.0.0.1 sdisk NO_HW DEVICE DGC CX600WDR5
/dev/dsk/c8t0d1 /dev/rdsk/c8t0d1
disk 22 0/4/1/0.102.17.0.0.0.2 sdisk NO_HW DEVICE DGC CX600WDR1
/dev/dsk/c8t0d2 /dev/rdsk/c8t0d2

Next executed diskinfo command

# diskinfo /dev/rdsk/c8t0d0
SCSI describe of /dev/rdsk/c8t0d0:
vendor: DGC
product id: CX600WDUNB
type: direct access
size: 2097152 Kbytes
bytes per sector: 512

# diskinfo /dev/rdsk/c8t0d1
diskinfo: can't SIOC_INQUIRY /dev/rdsk/c8t0d1: I/O error

# diskinfo /dev/rdsk/c8t0d2
diskinfo: can't SIOC_INQUIRY /dev/rdsk/c8t0d2: I/O error


I had rebooted the machine......

And executed
# ls -l
crw-r----- 1 bin sys 188 0x080000 Nov 18 16:10 c8t0d0
crw-r----- 1 bin sys 188 0x080100 Oct 6 14:02 c8t0d1
crw-r----- 1 bin sys 188 0x080200 Nov 18 16:11 c8t0d2

Still the device(c8t0d0) comes under ioscan, rest two were gone
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=============================================================================
disk 4 0/4/1/0.102.17.0.0.0.0 sdisk CLAIMED DEVICE DGC CX600WDUNB
/dev/dsk/c8t0d0 /dev/rdsk/c8t0d0


then disk info of these devices....

# diskinfo /dev/rdsk/c8t0d0
SCSI describe of /dev/rdsk/c8t0d0:
vendor: DGC
product id: CX600WDUNB
type: direct access
size: 0 Kbytes
bytes per sector: 0

# diskinfo /dev/rdsk/c8t0d1
io_search failed: No match found.

# diskinfo /dev/rdsk/c8t0d2
io_search failed: No match found.






I have few question here:
After detaching also why those devices coming under ioscan ????
Why diskinfo shows some data for the detached devices ????
Do i need to reboot the machine each and every time, when i detach the storage array ???
And why i should manually remove the detached devices by executing 'rmsf' command ?? Can't HPUX take care of these ????
Do i need to update any patchs for this issue ?? current version is B.11.23
Karsten Radke_1
Advisor

Re: How do i cleanup the removed/detached devices ???

Hi there,

when you disconnect / detach a disk device, it is still recorded within the HP-UX kernel, although it's not physically accessible anymore. That's exactly what the "NO_HW" entry from the 'ioscan' command means.
The HP-UX kernel can't remove this stale entry automatically when detaching a device. During a (re-)boot, the kernel removes these stale entries, but this can also be done manually by issueing the 'rmsf' command, so a reboot should not be required in most cases.

With the following commands you can remove such stale device nodes:

ioscan -fnCdisk |grep "NO_HW" |awk '{print $3}' |while read i
do
echo rmsf -H $i
rmsf -H $i
done

I'm not really a Clariion expert, but i suspect that with this Navcli stuff you just disabled the devices on the storage box, but not from the server's point of view. That's why the device is still recorded within the HP-UX kernel, so a manual removal with 'rmsf' is necessary.

Generally, it's always wise to have the most recent patches installed, especially regarding LVM, SCSI and Fibre Channel. In the ITRC, you can use the keyword search within the patch database to look for specific Clariion patches. If you have a support contract, you should also consider contacting the storage vendor (EMC) and / or HP support for further assistance.

Regards,
Karsten
Wim Rombauts
Honored Contributor

Re: How do i cleanup the removed/detached devices ???

First of all, while you have effectively detached c8t0d1 and c8t0d2, you have *NOT* detached c8t0d0. Don't let anyone tell you you did. As I said before, the system still sees that LUN (CLAIMED) and you can request info from it using diskinfo.

As for c8t0d1 and c8t0d2, yes, they are gone, since ioscan reports "NO_HW" and diskinfo returns an IO error. As long as you don't reboot the system, the kernel will remember something was there before and it will be kept in the kernel I/O-map until the next reboot. That is why ioscan will keep reporting the device, but will show NO_HW (= no hardware) to indicate there was nothing effectively there anymore. There is no way to get rid of it in another way, only a reboot can help here.

The device files under /dev/dsk and /dev/rdsk are created once when the system first detects new hardware at a certain hardware path. They don't mean there is effectively hardware behind it, it is just some pointer telling the kernel how to handle the device that was once there.

As long as you don't actively use a device, you can safely remove the device files, even when the hardware is still there (ioscan shows CLAIMED), and insf -e will recreate the device file.
Raghunanda K
New Member

Re: How do i cleanup the removed/detached devices ???

Thanks for your reply.
I had detached c8t0d0 also.
If you observe carefully,

When it attached:
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=============================================================================
disk 4 0/4/1/0.102.17.0.0.0.0 sdisk CLAIMED DEVICE DGC CX600WDR5
/dev/dsk/c8t0d0 /dev/rdsk/c8t0d0

When it detached:
# ioscan -fnC disk
Class I H/W Path Driver S/W State H/W Type Description
=============================================================================
disk 4 0/4/1/0.102.17.0.0.0.0 sdisk CLAIMED DEVICE DGC CX600WDUNB
/dev/dsk/c8t0d0 /dev/rdsk/c8t0d0

'CX600WDR5' changed to 'CX600WDUNB'. thats why it shows as CLAIMED.