Removable External SCSI Harddrive

Hi guys,

I have a solaris 9 operating system on a sun solaris machine and one external removable scsi drive connected to it.

When i type the following command this is what is displayed:

#format

AVAILABLE DISK SELECTIONS:
0. c0t0d0 <DEFAULT cyl 17832 alt 2 hd 255 sec 63>
/pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@0,0

  1. c1t0d0 <DEFAULT cyl 17846 alt 2 hd 255 sec 63>
    /pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@2,0

i then took out the drive 1. and type in format command:

#format
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <DEFAULT cyl 17832 alt 2 hd 255 sec 63>
/pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@0,0

  1. c0t2d0 <Drive not available>

As soon as i take out the removable external hard drive and re-type in the format command it will say the drive is not available....

How do i remove drive 1? I understand this can be done when i reboot the system. I dont want to reboot the system every time and I want to manually remove it and not show in the format display.

Firstly, where does this information reside about the drive?

Secondly, is there a command which remove drive 1 manually and not permanently remove it after I want to re-plug it?

Thanks

You may want to clean up the device files and rebuild them by doing:
devfsadm -Cv
Btw whats the model of your solaris box? if using FC-AL disk, you have to unconfigure using cfgadm command.

I have a sunblade 2000 sun machine.

I typed in:
#devfsadm -Cv

then i type in:
#format

but still the drive c2t2d0 <Drive not available>.

I then typed in
#rm -r /dev/rdsk/c2t2d0s*

then i typed:
#format

this removes it temporary.

meaning if i re-typed
#devfsadm

it would re-establish the drive being there c2t2d0 <Drive not available>.

how would i remove it even when i re-type in devfsadm?

I did try to cfgadm command but that show the drive as configured even those it is not connected??

You should never do this. #rm -r /dev/rdsk/c2t2d0s* . Its a dangerous attempt, yup also depends on your h/w architecture.
#drvconfig -c disks (did you do this)

If you keep on seeing that the disk drive is not available, most probably the disk has gone bad (possible). meaning you wont be able to access any data on that disk, unless your disk is mirrored to the primary.

what does your iostat -En output display? can you post the output of the following command as well?
#grep -i warn /var/adm/messages

"If you keep on seeing that the disk drive is not available, most probably the disk has gone bad (possible). meaning you wont be able to access any data on that disk, unless your disk is mirrored to the primary."

No, the disk was disconnected and therefore i expected that when i type in format. This line "c2t2d0 <Drive not available>" should not even appear.

The main reason i want to remove this line ""c2t2d0 <Drive not available>" is because i have a script that checks the output of the format command. If this line exists than it will pump out scsi not connected for that drive.

Also i have tried the command #drvconfig -c /dev/rdsk/c2t2d0s0

i couldnt see what this does?

use this:
devfsadm -C -c disk -v

Workaround: You'll just have to wait for the next reboot. people
recommended the -C flag to devfsadm, adding -v as well so that you could see
what was happening, 'update_drv sd', manually deleting the offending /dev/dsk and /dev/rdsk entries, and cfgadm. But I will say none will work. So, wait for next reboot. If you've done miracles to clear that out, pls share with all of us :slight_smile: Gd luck dude!