Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a system with Solaris 10. One of the internal disks is broken:

c0t0d0s2     auto:sliced    rootdisk1_1  rootdg      online               c0t0d0s2         -
c0t1d0s2     auto           -            -           error                c0t1d0s2         -
c1t0d0s2     auto:sliced    rootmirror1_1  rootdg      online               c1t0d0s2
c1t1d0s2     auto:sliced    rootmirror2_1  rootdg      online               c1t1d0s2         -

When I run the format command, it becomes hung, because of the c0t1d0s2 disk. Is there a way to completly remove it from the system so that format can work again?

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

This is from my emergency response notes. I neglected to mention the Solaris version and no longer have a recent Solaris box to check this on, so check the manpages and give it a try if it seems appropriate.

First things first, you must umount any volumes on that disk, disable swap on it, and in every other say stop using it (e.g. if you're using Solaris software RAID). If you're using Veritas, check out rkosegi's answer.

Then, find out what cfgadm calls the disk:

cfgadm -al

The left column is the disk designation. Yes, I know, yet another format. At least this one includes the short block device name so it's not too difficult to find. Anyway, once you know it, say something like this: (based on your question, but do check first):

cfgadm -c unconfigure c0::dsk/c0t1d0

You can say cfgadm -al again to make sure the disk has been unconfigured. At this point, if your machine has hot-swappable disks, the disk will have been tri-stated, powered off, and controllers, backplanes etc. will be aware that you're about to remove it. If the disk has a ‘ready to remove’ light, it'll illuminate.

Once you're done replacing it:

cfgadm -c configure c0::dsk/c0t1d0

Once the disk is configured again, you can proceed with the rebuild. Good luck!

share|improve this answer
    
Thanks for your reply. And what if the disk is in a Veritas disk group in the rootdg? Should I boot in single user and then remove it with the cfgadm magic? –  ludiegu Jun 6 '12 at 9:28
    
I've always avoided Veritas like the plague, so I don't know. But rkosegi has just posted an answer that might help you. I edited the answer to include this. –  Alexios Jun 6 '12 at 10:13
add comment

If disk is under VX then you must unconfigure it from Veritas:

If you want to replace it with new one, follow this article

To remove VX metadata run following command:

# /usr/lib/vxvm/bin/vxdiskunsetup c0t1d0
share|improve this answer
    
Sadly the vxdiskunsetup still remains in hang. Any other ideas? Thanks. –  ludiegu Jun 6 '12 at 11:23
    
Yeah, it still reamins in hang, too. –  ludiegu Jun 6 '12 at 13:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.