System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove old /dev/rmt/* entrys

 
SOLVED
Go to solution
spearsy456
Advisor

How to remove old /dev/rmt/* entrys

Hi,

Im after your help with the following situation,

Situation :
A team moved our HP equipment from one rack to another and cabled them all up again.

Issue :
On completion of the re-cabling and power up, my backup scripts fail because they run a function where if the given variable (run by an operator) is not specified it runs an ls /dev/rmt | head -1, this gives the first device path entry which should be 0mn

the device path entry is now 3mn because the jumper settings have been changed on the system.

The jumper settings now have to stay as they are to mirror the setup of our other system's
so i will force the script to look at 3mn

The problem is i want to remove the omn and 1mn entries from /dev/rmt so i am left with just 2mn and 3mn

I would have thought an insf -e would clear down the device paths this cannot be run until the weekend but the box was rebooted which i thought would run an insf -e, if it did it didn't clean up the device paths

How can i remove the device paths so it only see's the paths available when i run ioscan -fnC tape.

Rgds
Steven Spear



7 REPLIES
Solution

Re: How to remove old /dev/rmt/* entrys

Steven,

insf only creates _new_ DSFs - t doesn't get rid of old ones...

To identify all your "stale" DSFs use:

lssf /dev/rmt/* | grep '???'

Then you can just "rmsf" them:

e.g. if /dev/rmt/0mn is stale:

rmsf /dev/rmt/0mn

HTH

Duncan

HTH

Duncan
Steven E. Protter
Exalted Contributor

Re: How to remove old /dev/rmt/* entrys

Shalom,

http://www.scribd.com/doc/5708961/HPUX-System-and-Network-Administration-I

In that link which my content filtering system will not let me actually read is a procedure that will let you with a boot reconfigure ioconfig and have your active tape drive be /dev/rmt/0m

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
spearsy456
Advisor

Re: How to remove old /dev/rmt/* entrys

duncan,

Many thanks for the quick response, always a bit nervous when it comes to removing paths, i can see in the lssf output that the devices in question do not have a set address, as i cannot run it now, i have 32 entries that do not have an address to i have to specify each in turn to remove them ?

Many thanks
steve

Re: How to remove old /dev/rmt/* entrys

Steven,

> i have 32 entries that do not have an address to i have to specify each in turn to remove them ?


Not with some simple scripting:

lssf /dev/rmt/* | grep '???' | awk '{ print $NF }' | xargs rmsf

Should get rid of em all in one shot...

HTH

Duncan

HTH

Duncan
spearsy456
Advisor

Re: How to remove old /dev/rmt/* entrys

Duncan

i couldn't ask for a better answer than that many thank, that will work a treat.

Cheers
Steve
spearsy456
Advisor

Re: How to remove old /dev/rmt/* entrys

|

Re: How to remove old /dev/rmt/* entrys

>Duncan: Should get rid of em all in one shot...

Since so few, you don't really need xargs:
rmsf $(lssf /dev/rmt/* | grep '???' | awk '{ print $NF }')