1748137 Members
3654 Online
108758 Solutions
New Discussion юеВ

Tape special files

 
WW451512
Advisor

Tape special files

Hi All,

-Earlier (few minutes back) I had a tape drive properly working & showing (claimed) in ioscan output with name /dev/rmt/1m etc.
-Then, I tried changing the name to 0m. Searched itrc and found few methods and used mknod (same major/minor number) to create /dev/rmt/0m and so on.
-Then, ioscan shows both (0m and 1m). They were CLAIMED and looked to work fine.
-Then I thought of removing /dev/rmt/1m (original) files (using "rm" command).
-Then, ioscan started showing stape - NO_HW
-I deleted c2t1d0* etc files also from /dev/rmt
-Now, "ioscan -fnC tape" gives no output.
-Tried insf/rmsf/ioscan etc but of no use
-Present situation is:

OS: 11.23
/dev/rmt# ll
total 0
crw-r--r-- 1 bin bin 205 0xfffffe Aug 17 2007 stape_config
# ioscan -fnC tape
# kcmodule -q stape
Module State Cause
stape static best

I am at remote location, so do not have physical access to the tape.
What shall I do now????
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: Tape special files

A reboot would most likely give you something back, probably the 1m device. Once you get the device file back, you can just rename it whatever you want.


Pete

Pete
WW451512
Advisor

Re: Tape special files

Hi..

hhmm..cannot be rebooted as of now.

Well..

Earlier output was:

tape 1 1/0/1/1/0/1/0.2.0 stape CLAIMED DEVICE HP C5683A
/dev/rmt/0m /dev/rmt/1m /dev/rmt/c2t2d0BEST /dev/rmt/c2t2d0DDS
/dev/rmt/0mb /dev/rmt/1mb /dev/rmt/c2t2d0BESTb /dev/rmt/c2t2d0DDSb
/dev/rmt/0mn /dev/rmt/1mn /dev/rmt/c2t2d0BESTn /dev/rmt/c2t2d0DDSn
/dev/rmt/0mnb /dev/rmt/1mnb /dev/rmt/c2t2d0BESTnb /dev/rmt/c2t2d0DDSnb

Is it required to keep 1m device files??
Or can I remove it by using "rm"?
Pete Randall
Outstanding Contributor

Re: Tape special files

> Is it required to keep 1m device files??

No, assuming you get them back, they are not required to be named 1m.

> Or can I remove it by using "rm"?

I would use rmsf or just rename them by using "mv", but you don't have them now.


Pete

Pete
Bill Hassell
Honored Contributor

Re: Tape special files

Device files, especially for tape, are quite simple and can be deleted and recreated at any time. But do not use "rm". The correct command is rmsf. I use the -H option to remove the device based on the hardware path:

rmsf -H 0/1/0/2.3.0

as an example. Once removed, you can add the tape back with ioscan followed by insf:

ioscan -fCtape
insf -H 0/1/2.3.0 -I 0

This will create the device files as instance 0 (ie, /dev/rmt/0m...). NOTE: If you are renaming (mv) device files, then you'll need to remove the devices that point to instance 0 -- use lssf to decode the device files:

lssf /dev/rmt/*


Bill Hassell, sysadmin