SUMMARY: How to Remove a Tape Drive Device?

From: G W Cantello <glenn.w.cantello_at_opg.com>
Date: Fri Aug 30 2002 - 15:36:29 EDT
My Thanks to the following respondees:
Laurence.Moughan@o2.com   (Laurence Moughan)
sxi@sympatico.ca          (Simon-Bernard Drolet)
borris_8@yahoo.com        (Jason Wood)

We were trying to reassign tape drive names without rebooting. We
were using devfsadm but it wasn't doing what we wanted.. refer to
original question below.

cfgadm  command seems to do most of what  we want.

cfgadm -la

lists the configurable devices. Our drives appeared as:

# cfgadm -la
Ap_Id                          Type         Receptacle   Occupant     Condition
c1::rmt/0                      tape         connected    configured   unknown
c1::rmt/1                      tape         connected    configured   unknown
c6::rmt/2                      tape         connected    configured   unknown
c6::rmt/3                      tape         connected    configured   unknown

Of these, 0 and 2 were actually connected.

So, we unconfigured rmt/3 as follows:

# cfgadm -c unconfigure c6::rmt/3

which lead to:

c6::rmt/3                      unavailable  connected    unconfigured unknown

followed by:

# devfsadm -C -c tape

which lead to:

c6::st5                        unavailable  connected    unconfigured unknown


I did not expect this. Nothing was connected so I hoped it would disappear.
However, we used cfgadm -c unconfigure against the remaining tape devices
(attached or otherwise) and then:

# rm /devices/pci@1f,4000/scsi@2/st*
# rm /devices/pci@6,4000/pci@4/SUNW,isptwo@4/st*
# rm /dev/rmt/*

Then, we used cfgadm to configure the drives in the order we wanted:

# cfgadm -c configure c6::st4
# cfgadm -c configure c1::st18
# devfsadm -C -v -c tape

And we have:

# cfgadm -la
Ap_Id                          Type         Receptacle   Occupant     Condition
c1::rmt/1                      tape         connected    configured   unknown
c1::st19                       unavailable  connected    unconfigured unknown
c6::rmt/0                      tape         connected    configured   unknown
c6::st5                        unavailable  connected    unconfigured unknown


Would still like to remove the unused links but for now we are okay.
I expect a reconfigure boot may clear the rest.


======================
======================

Original Question Follows:

======================
======================

We have an E450, running Sol8 2/02 patched to ~ June, 2002

It has a SunSwitft 10/100BaseT Ethernet + Fast/Wide UltraSCSI-2
connection.

We have two tape drives (DLT8000) connected, one to main SCSI-2
connector and one to the SunSwift card.

Wanted to switch the drive on main SCSI connector with the other
one. please accept that this was necessary.

The drives were powered off and the cables switched.

Power on the drives and we no longer see either one. We determine
that one tape drive was set to target 4 and one to target 5. So,
we run 

# devfsadm -C -c tape

Now we have 4 tape devices in our device tree.

power off drives and run it again.
same thing, 4 devices.

disconnect the cables

# rm /dev/rmt/*
# rm /devices/pci@1f,4000/scsi@2/st*                 (motherboard device)
# rm /devices/pci@6,4000/pci@4/SUNW,isptwo@4/st*     (SunSwift card)
# devfsadm -C -c tape

same thing, 4 devices.

We are not able to force E450 to remove these devices completely.

Machine is in production and may be some time before we can reboot
with reconfigure to see if this would help. Seems like somehow the
kernel is "remembering" the tape drives existed. Any advice on how
to make E450 not remember this stuff? Is it in a file somewhere?

We ran in to a similar problem some time ago with controllers. We
eventually tracked that to /dev/cfg where it remembered all controllers
ever plugged in. Is there something similar for tape drives?

TIA


============================================================
Glenn W. Cantello    email address: glenn.w.cantello@opg.com
Ontario Power Generation; 416 592-5534 (v); 416 592 5528 (f)
H11 G27; 700 University Avenue, Toronto, ON M5G 1X6   CANADA
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Aug 30 15:37:10 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:54 EST