How to remove a device in use?


 
Thread Tools Search this Thread
Operating Systems AIX How to remove a device in use?
# 1  
Old 05-10-2012
How to remove a device in use?

Hi All,

I'm having trouble with my SAN devices on AIX 5.3 so I would like to remove the SAN devices and HBAs. Then I want to recreate them with cfgmgr and see if this solves my problem.

So I have the following SAN devices:
Code:
# lsdev | grep fcs
fcs0           Available 07-08         FC Adapter
fcs1           Available 01-08         FC Adapter
 
 
# lsdev | grep 07-08
dac0           Available 07-08-02      1722-600 (600) Disk Array Controller
dac1           Available 07-08-02      1722-600 (600) Disk Array Controller
fcnet0         Defined   07-08-01      Fibre Channel Network Protocol Device
fcs0           Available 07-08         FC Adapter
fscsi0         Available 07-08-02      FC SCSI I/O Controller Protocol Device
hdisk2         Available 07-08-02      MPIO Other FC SCSI Disk Drive
 
# lsdev | grep 01-08
dac2           Available 01-08-02      1722-600 (600) Disk Array Controller
dac3           Available 01-08-02      1722-600 (600) Disk Array Controller
fcnet1         Defined   01-08-01      Fibre Channel Network Protocol Device
fcs1           Available 01-08         FC Adapter
fscsi1         Available 01-08-02      FC SCSI I/O Controller Protocol Device
rmt1           Available 01-08-02      IBM 3580 Ultrium Tape Drive (FCP)
smc0           Available 01-08-02      IBM 3573 Tape Medium Changer (FCP)

Step one is removing fcs0 and all child devices with
Code:
# rmdev -Rdl fcs0
fcnet0 deleted
dac0 deleted
dac1 deleted
fscsi0 deleted
fcs0 deleted

Next step is to remove fcs1 and all child devices with
Code:
# rmdev -Rdl fcs1
hdisk2 deleted
Method error (/etc/methods/ucfgdac):
        0514-062 Cannot perform the requested function because the
                 specified device is busy.

and then it stops removing devices so I decided to remove the devices manually.

Code:
# rmdev -dl fcnet1
fcnet1 deleted
# rmdev -dl rmt1
rmt1 deleted
# rmdev -dl smc0
smc0 deleted
# rmdev -dl dac2
dac2 deleted
# rmdev -dl dac3
Method error (/etc/methods/ucfgdac):
        0514-062 Cannot perform the requested function because the
                 specified device is busy.
# rmdev -dl fscsi1
Method error (/usr/lib/methods/ucfgdevice):
        0514-029 Cannot perform the requested function because a
                 child device of the specified device is not in a correct state.
# rmdev -dl fcs1
Method error (/usr/lib/methods/ucfgcommo):
        0514-029 Cannot perform the requested function because a
                 child device of the specified device is not in a correct state.

So this didn't work. Then I tried a reboot but after the reboot I still have the same problems.

To my knowledge, there are no more SAN devices in the system. What is preventing the system from removing dac3, fscsi1 and fcs1? How can I find out and how do I remove these devices?

--Peter

Last edited by petervg; 05-10-2012 at 09:56 AM..
# 2  
Old 05-10-2012
Looks as if there something still active on this adapter.

Example:
Code:
# lsdev -l fcs1
fcs1 Available   5Z-N1    FC-Adapter.....
# lsdev| grep 5Z\-N1
...

Check if there is a disk for example, that is still varyon or something similar.

It could also be, that the adapter is connected via a PCI Host Bridge (phb) that has to be set to "defined" to let you have the fcs1 removed:
Code:
lsslot -c phb

There should be some pci<n> listed, related to the adapter. rmdev -l pci<n> and then try again removing the fcs1.
This User Gave Thanks to zaxxon For This Post:
# 3  
Old 05-10-2012
Code:
# lsdev | grep 01-08
dac3           Available 01-08-02      1722-600 (600) Disk Array Controller
fcs1           Available 01-08         FC Adapter
fscsi1         Available 01-08-02      FC SCSI I/O Controller Protocol Device
 
# lsslot -c phb
PHB Name  Description                  Device(s)
PHB 2     Logical PCI Host Bridge      pci0
          U787E.001.1234567-P1-T1      pci3 ent0 ent1
          U787E.001.1234567-P1-T3      pci4 usbhc0 usbhc1 usbhc2
          U787E.001.1234567-P1-T12     pci5 ide0
          U787E.001.1234567-P1-T10     pci6 sisscsia0
          U787E.001.1234567-P1-C14-C1  pci7 Unknown
PHB 3     Logical PCI Host Bridge      pci1
PHB 4     Logical PCI Host Bridge      pci2 fcs1
 
# rmdev -l pci2
Method error (/usr/lib/methods/ucfgdevice):
        0514-029 Cannot perform the requested function because a
                 child device of the specified device is not in a correct state.

Forgot to mention that the system is running VxVM and VxFS. Could it be that they are holding the device?

Last edited by petervg; 05-10-2012 at 10:19 AM..
# 4  
Old 05-10-2012
I don't know these, sorry. Could be. Maybe try stopping them if they take a hold of devices. Else maybe reboot the box and try again before starting any application. The DAC seems to be something left over from SAN storage?
Can try a fget_config -vA to get more info about it.
If you get to reboot the box and the cfgmgr finds all stuff again, maybe have the zonings temporary disabled, get your devices cleaned and then have the zonings enables again. Or maybe just that LUN or whatever that is, can be disabled on SAN side.
# 5  
Old 05-15-2012
If you have any update on this, it would be nice to read how you hopefully solved it. Smilie
# 6  
Old 05-15-2012
Hi,

you need to offline all disks in vx before you can remove them.

vxdisk offline <dev name> for all disks showing up online in vxdisk -o alldgs list

Regards
zxmaus
# 7  
Old 05-16-2012
1. lsdev -p fscsi1
would like to know what are the devices attached to them disks/tapes...
2. any log in errpt ?
3. Something is holding , even after after reboot, have you looked at /etc/inittab or had a closer look at ps -ef to check if any related process are running
Hope this helps.
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. HP-UX

Failed to open tape device /dev/rmt/0mn:Device busy (errno = 16)

Hi, Unable to make tape backup, please help. /opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00 * Creating local directories for configuration files and archive. ======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery. (Mon... (4 Replies)
Discussion started by: anuragr
4 Replies

2. AIX

Gpfs how to remove nsd from a device

Gpfs how to remove nsd from a device Need to removed nsd from the device below /apps/abinitio/outbound01 90 30 DEVappsabob01 root@carlvpc0lpr24 # df -g /apps/abinitio/outbound01 Filesystem GB blocks Free %Used Iused %Iused Mounted on /dev/DEVappsabob01 90.00 89.39 1% 4032 1%... (1 Reply)
Discussion started by: asyed123
1 Replies

3. Red Hat

Unable To Activate Ethernet Network Device in RHEL 5.5 - e100 device eth0 does not seem to be presen

Hi All, Could anyone please help to resolve the below problem. I installed RHEL5.5 in my desktop.But when i try to activate the ethernet connection then it gives me the error. I spent 2 days for the above and go through with several suggestion found by googling. But no luck. ... (0 Replies)
Discussion started by: Tanmoy
0 Replies

4. UNIX for Dummies Questions & Answers

UNIX rm -rf error "rm: cannot remove `filename' : Device or resource busy"

Hi Everyone, I am trying to remove a directory: $ rm -rf directory_name/ rm: cannot remove `directory_name/filename': Device or resource busy What does this mean, and why can't I remove these files? I already tried moving into the directory, and removing the files individually, but I... (7 Replies)
Discussion started by: Anna_Z
7 Replies

5. AIX

rmdev won't remove disk device AIX

Hi all, I'm attempting to remove some EMC hdisk devices which we recently had made available to one of our backup servers. This is an AIX 5.3 server. When I try doing an rmdev I get the following: root@********:/dev# rmdev -d -l hdisk495 Method error (/usr/lib/methods/ucfgdevice): ... (2 Replies)
Discussion started by: C.J.Hund
2 Replies

6. AIX

remove device

Hello I need to remove a device (tape rmt0) for to put dinamic in another lpar but when I try to remove I get the next message I try also If there are some process about it but nothing. and before that the device was available and I put on defined status but the same thing I canīt remove it.... (3 Replies)
Discussion started by: lo-lp-kl
3 Replies
Login or Register to Ask a Question