Operating System - HP-UX
1822448 Members
2592 Online
109642 Solutions
New Discussion юеВ

Proper way to remove any non used devices

 
SOLVED
Go to solution
susan.derose
Advisor

Proper way to remove any non used devices

Hi guys,
I am not sure how to properly remove a storage attached disk to my hp-ux 11.31v. Can someone please give me a quick run down on how to do this?

These are the things I had in mind but do not know the correct flags to use.

1. identify the disk -
ioscan -funC disk
2. make sure it is not used -
pvdisplay -v /dev/disk/disk909
3. remove it.
rmfs -x disk909
4. verify that it is removed. -
ioscan -funC disk

Any suggestions will be greatly appreciated.
Is the rmfs -x the only proper way to remove it? I think I read somewhere that you should not be doing an "rm" under /dev/disk/ ...
12 REPLIES 12
Johnson Punniyalingam
Honored Contributor

Re: Proper way to remove any non used devices

>> am not sure how to properly remove a storage attached disk to my hp-ux 11.31v<<

rmfs -x disk909 ..? (never used before)

(rmfs Command
Purpose
Removes a file system)


are your storage disk configured to any of your volume group in your server "hp-ux 11.31v" ...?

if you need to vgreduce /dev/vg00 /dev/dsk/cxtxdx

once you de-attached the "storage from your server"
mv /etc/lvmtab /etc/lvmtab.sav
vgscan -a
This will recreate you lvmtab
strings /etc/lvmtab
vgdisplay -v |more
(check for PV available in all your volume_group)

insf -e
ioscan -fnC disk --> this should show only the currenlty used disk in your server

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
SKR_1
Trusted Contributor

Re: Proper way to remove any non used devices

I think its not rmfs. It should be rmsf.

This is good choice.

Thanks

SKR
Adam W.
Valued Contributor

Re: Proper way to remove any non used devices

rmsf is th command needed here followed by an insf -e.

Man rmsf for more info or go to this link.

http://docs.hp.com/en/5992-3373/ch09s06.html
There are two types of people in the world, Marines and those who wish they were.
susan.derose
Advisor

Re: Proper way to remove any non used devices

Hi guys,

Yes I did mean rmsf and not rmfs.
Thanks again guys.
Sharma Sanjeev
Respected Contributor
Solution

Re: Proper way to remove any non used devices

Hi

Please use rmsf -H

it will delete both rdsk and dsk device files

Only rmsf /dev/dsk will remove /dsk files
Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Sagar Sirdesai
Trusted Contributor

Re: Proper way to remove any non used devices

Hi

I would recommend using rmsf -H command to delete it
Torsten.
Acclaimed Contributor

Re: Proper way to remove any non used devices

I don't remember where I read this, but in fact after you do a rmsf in 11.31, the system will re-run insf again on it's own.

My example:

> ioscan -fnH 0/1/1/1.2.0
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 2 0/1/1/1.2.0 sdisk CLAIMED DEVICE HP 36.4GMAS3367NC
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
/dev/dsk/c3t2d0s1 /dev/rdsk/c3t2d0s1
/dev/dsk/c3t2d0s2 /dev/rdsk/c3t2d0s2
/dev/dsk/c3t2d0s3 /dev/rdsk/c3t2d0s3
/dev/dsk/c3t2d0s4 /dev/rdsk/c3t2d0s4


> rmsf -H 0/1/1/1.2.0

> ioscan -fnH 0/1/1/1.2.0
(same output)

> ll /dev/dsk/c3t2*
brw-r----- 1 bin sys 31 0x032000 Nov 12 12:34 /dev/dsk/c3t2d0
brw-r----- 1 bin sys 31 0x032001 Nov 12 12:34 /dev/dsk/c3t2d0s1
brw-r----- 1 bin sys 31 0x032002 Nov 12 12:34 /dev/dsk/c3t2d0s2
brw-r----- 1 bin sys 31 0x032003 Nov 12 12:34 /dev/dsk/c3t2d0s3
brw-r----- 1 bin sys 31 0x032004 Nov 12 12:34 /dev/dsk/c3t2d0s4

> date
Wed Nov 12 12:35:12 MEZ 2008



SYSLOG:

Nov 12 12:34:05 myserver sfd[2254]: started 'insf' to create device special file
s for newly found devices.
Nov 12 12:34:16 myserver sfd[2254]: execution of 'insf' completed.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
James R. Ferguson
Acclaimed Contributor

Re: Proper way to remove any non used devices

Hi:

> Torsten: ...after you do a rmsf in 11.31, the system will re-run insf again on it's own.

The way I read your test data is that the device files are regenerated as a consequence of running 'ioscan'. I would further suspect that if you ran it with the '-k' option to consult only the kernel tables, you would not see the device file(s) regenerated.

Regards!

...JRF...
Torsten.
Acclaimed Contributor

Re: Proper way to remove any non used devices

JRF you are absolutely right.

"rmsf" did remove the legacy device files, the agile will stay.

ioscan with "-k" will not show the disk at all (only a target, but not the disk), without "-k" the legacy device files are re-created.

So an "ioscan -fnCdisk" is *not* a good test to see if the device files are removed.

;-)

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
susan.derose
Advisor

Re: Proper way to remove any non used devices

Torsten,

So what is a good way to check to make sure that all the associated device files are removed correctly under 11.31?

Susan
yulianto piyut
Valued Contributor

Re: Proper way to remove any non used devices

maybe you can run ioscan -nfCdisk and make sure to SAN administrator to unmap or unzone the LUN that have been recently removed from the server.
susan.derose
Advisor

Re: Proper way to remove any non used devices

Thank you.