- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Quick, easy and safe way to remove invalid dev...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 01:24 AM
03-25-2004 01:24 AM
Due to a misconfiguration of my new tape library, my tape library was presented to all my hpux servers on our SAN. To compound my problem, I also had it misconfigured so it presented multiple luns of the same device. I have probably 15 unix servers that now have a bunch of invalid device files in my ioscan (which I attached from one of my systems, I'm scared to look at my other servers).
Would it be safe to do create a script that did something in this line:
ioscan -fn
grepping for NO_HW
and then rmsf -H the hardware path that was parsed out?
I'm guessing the safest would be by hand making sure I don't remove a device file that I need.
I do have XP128 disks hanging off the same chain, so I really have to be careful.
Any suggestions? What a mess. =(
Dave
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 01:32 AM
03-25-2004 01:32 AM
Re: Quick, easy and safe way to remove invalid device files?
What a bummer! Anyway, I assume you've tried insf -e?? Does that leave the faulty ones on the system or does it remove them as well?
Let us know,
Good luck!
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 01:32 AM
03-25-2004 01:32 AM
Re: Quick, easy and safe way to remove invalid device files?
- ioscan -kf
- ioscan -u
Se the diferences
Remove invalid devices with rmsf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 01:34 AM
03-25-2004 01:34 AM
Re: Quick, easy and safe way to remove invalid device files?
I would make sure that you look over the rmsf's before you kick off that part of the script to see if they "make sense".
In other words, I would expect you to see a whole line of devices that have very similar device IDs and those would be safe to remove.
If you get something that is outside that range, then you might want to consider doing more checking on that one.
Best regards,
Kent M. Ostby
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 01:35 AM
03-25-2004 01:35 AM
Re: Quick, easy and safe way to remove invalid device files?
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 01:36 AM
03-25-2004 01:36 AM
Re: Quick, easy and safe way to remove invalid device files?
rmsf is the way to go here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 01:42 AM
03-25-2004 01:42 AM
Re: Quick, easy and safe way to remove invalid device files?
I think I'm talking 10-13 servers and 98 devices:
tortola:root /root # ioscan -fun | grep NO_HW | wc -l
98
I'm kind of suprised that they have the device files since I figured they would of only been created during bootup or if someone does insf -e. But thats another deal all together.
I'm 95% sure I have my tape library now so it isn't trying to discover everything on my SAN. So if I can remove these files and some day get a reboot I shouldn't have it repopulate my device files again after being rediscovered. But in case it does, I'm not sure if I want to go out to each server again after a reboot and have the same thing happen.
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 01:53 AM
03-25-2004 01:53 AM
Re: Quick, easy and safe way to remove invalid device files?
Juan: I tried those two commands, it maybe an alternative to my grepping for NO_HW.
Kent: Good idea, about checking what my NO_HW grep would look like in case something that I don't want to sneak in, sneaks in.
RAC: You confirm what I was thinking. Ctape is an idea, one server though has some legit tape drives on it. Theres also fnCctl and fnCautoch that I would have to do also. The fnCctl would be a bit scarey also to do being the controlling XP128 disks use the same type of device.
So far I'm leaning to doing them by hand. =/
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 02:45 AM
03-25-2004 02:45 AM
SolutionWe had some issues with our install process for veritas, and had bad drives etc. It became necessary to find the /dev/rmt/* and just delete them and the indexing to keep the controller number under 256.
If you get a controller number over 255 the machine acts as though it thinks the tape is a malfunctioning tape drive.
The real key for long term success is to clean up the devices.
here is a procedure
1) Make maps of volume groups just in case. Yes, everything should be put
in / (root).
# strings /etc/lvmtab > /lvmtab.out
# vgexport -p -m /vxXX.map vgXX # For every volume group
2) Make a file with currently used instance numbers.
# ioscan -kf | grep -e ^tape -e ^lan -e ^ext_bus -e ^tty | grep CLAIMED | awk '{printf "%s %s %s\n",$3,$1,$2}' > infile
3) Edit out any lines with instance number greater than 255.
4) Test the 'infile' before rebooting. See ioinit(1M) for more details.
# ioinit -f /infile
Continue to remove entries that cause errors until the only message you get
is "line ignored." Third party drivers have not been tested, and the procedure
may not work for them.
5) Save a copy of the ioconfig file. Be sure to use cp(1) and not mv(1).
# cp /etc/ioconfig /etc/ioconfig.sav
# cp /stand/ioconfig /stand/ioconfig.sav
6) Remove the ioconfig files.
# rm /etc/ioconfig /stand/ioconfig
7) Shutdown -r but boot into LVM maintenance mode.
# shutdown -r 0
BCH> hpux -lm
Or, on a V-Class system:
Command> bo -lm
8) When the following message comes up, type the following ioinit commands
exactly as shown:
/etc/ioconfig is missing. Restore it from backup or
invoke /sbin/ioinit -c to recreate it from the kernel.
When finished enter ^D to continue boot.
(in ioinitrc)# /sbin/ioinit -c
(in ioinitrc)# /sbin/ioinit -f /infile -r
Good luck,
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2004 02:58 AM
03-25-2004 02:58 AM
Re: Quick, easy and safe way to remove invalid device files?
I'm going to think about this for abit.