Planning
Showing results for 
Search instead for 
Do you mean 

Cleaning up the DLT device files

SOLVED
Go to Solution
Honored Contributor

Cleaning up the DLT device files

Hi
I am looking for some information for cleaning up and organising the devies files for DLT drives on my systems.
I have 4*N4000 and and one K580 machine. Three of these machines currently share the 6 drive DLT library using HP bridges. We are moving to a SAN environment using Brocade fiber switch to share all 6 drives on all 5 hp machines.

I want to know how can I get the device files for DLT drives to be (/dev/rmt/1m .. to ../6m )
on all machines.

Since all of these machines, at some time had connection to DLT drive,& had /dev/rmt/?m files. I belive once I connect the DLT drives again, the device file numbers will start from where it left last, instead of /dev/rmt/1m, though it's unused now.

All these machines have internal DAT drive at /dev/rmt/0m.

Thanks in advance.
Prashant Deshpande.
Take it as it comes.
9 REPLIES
Honored Contributor

Re: Cleaning up the DLT device files

Hi,

To cleanup the device file, use "rmsf" with the -H option

rmsf -k -v -H HW_PATH
or
rmsf -v -d driver_name

This should remove all the device files for the address mentioned. Before that do a ioscan -fnC tape and confirm you are not removing any existing tape device files.

Hope this helps.

Thanks
Acclaimed Contributor

Re: Cleaning up the DLT device files

Rember all them 1m, 5m, c2t5d0BEST stuff is really for the benfit of use dumb human. All the system cares about is the major ands minor numbers.

If you really want /dev/rmt/1m, 2m ... here is how I would do it. Simply use rm to remove any of the unwanted device or all of them if you like. You can then use SAM->Peripheral Devices->Tape Drives Actions->Add to add the drives back on each server.

Now cd to /dev/rmt and do an ls -l

If you get the desired devices fine, otherwise, let's suppose that 1m is the DAT drive and 2m is the desired DLT.

All you need to do is remove the 1m* and 2m* devices and create new nodes that you like.

Let's suppose that the DLT drive is c2t5d0BEST with major device 205 and Minor device 0x052000. Let's also suppose that you want that to be 1m on this host.

mknod /dev/rmt/1m c 205 0x052000
chmod 666 /dev/rmt/1m
chown bin:bin /dev/rmt/1m

You should then repeat the process for c2t5d0Bestn (1mn) , and c2t5d0Bestnb (1mnb).

Clay
If it ain't broke, I can fix that.
Acclaimed Contributor

Re: Cleaning up the DLT device files

Hi Deshpande:

Here's what I've done to reorder the instance numbers:

Create a file called /tmp/tapedevices and put the instance numbers you want for each tape in it. Be sure to use characters instead of .

10/0.3.0 tape 1
10/0.4.0 tape 2

# ioinit -f /tmp/tapedevices
# shutdown -ry 0
# cd /dev/rmt
# rm /dev/rmt/* #...for any or all you are reordering...
# insf -e
# ioscan -fnC tape #...to verify
# shutdown -ry 0 #...to verify all remains well
# ioscan -fnC tape

Regards!

...JRF...
Honored Contributor

Re: Cleaning up the DLT device files

Thanks for your answers.

I"ll try this.

But where from system really gets the next instance number.

Thanks.
Prashant Deshpande.
Take it as it comes.
Acclaimed Contributor

Re: Cleaning up the DLT device files

Hi (again) Deshpande:

Instance numbers are generated based on the order that hardware is first scanned. The progression is in order represented by the hardware path. Instance numbers are assigned in ascending numeric order by device class as a member of a class is "seen". /etc/ioconfig records the instance information.

See the man pages (1M) for 'ioinit' for more information.

Regards!

...JRF...
Acclaimed Contributor

Re: Cleaning up the DLT device files

Ity should be noted that if you add cards after an OS loaded and then reinstall the OS or a new version, the instance numbers can also change.

For example, what was c5 could become c3 under the new OS if cards were added or removed between OS installs.
If it ain't broke, I can fix that.
Acclaimed Contributor

Re: Cleaning up the DLT device files

Hi (once again) Deshpande:

I might add, that sometimes it is worthwhile with tape devices, given that /dev/rmt/0m is a default destination for many commands, to disconnect all devices but the drive that is represented by /dev/rmt/0m *before* you cold-install. You are then guaranteed that it won't receive a different instance number than it originally had. This is particularly useful when /dev/rmt/0m is a DSS drive and /dev/rmt/1m is a DLT drive and you want the DSS drive to remain the default tape device.

Regards!

...JRF...
Honored Contributor

Re: Cleaning up the DLT device files

It it is really important to you, you can rearrange the order in which a system instantiates your devices by using the ioinit command. The procedure is to create a file with your present instance numbers, edit teh file, and read it back to the kernel with ioinit (requires reboot).

Usually, it will take two reboots to order your devices as you wish:the first to move all devices out of the range of numbers you desire, the second to move them back where you really wanted them.
Occasional Visitor

Re: Cleaning up the DLT device files

Hello,

I has come across this thread, because I have a similiar issue...but, instead of rename I would like to delete unused ext_bus from the ioconfig file ? Everytime, I remove a ext_bus, it comes back after a reboot ? Any ideas ?

ioconfig2infile /etc/ioconfig > /infile

I then edit the infile and remove the ext_bus I want, then feed back the new ioconfig file

ioinit -f /infile -r


//Add this to "OnDomLoad" event