How do I replace a "good" RAID 1+0 disk?


 
Thread Tools Search this Thread
Operating Systems Solaris How do I replace a "good" RAID 1+0 disk?
# 1  
Old 02-28-2013
Sun How do I replace a "good" RAID 1+0 disk?

Hi,

I have a Solaris Volume Manager (aka Disksuite) RAID 1+0 device consisting of 12 devices. One of these is failing (it has logged several mechanical positioning errors), and I have a replacement disk.

Normally, when a disk fails, volume manager marks it as failed, and replacing it is fairly easy. I would just unconfigure the disk (cfgadm -c unconfigure), replace it, reconfigure the disk, run devfsadm, partition the disk, and then use metareplace to replace it in volume manager.

However, in this case the disk has not actually failed, and is still being written to. How do I tell volume manager to stop using the disk? The only commands I know (metadetatch and metaoffline) will disable the whole d91 submirror (AFAIK), not just this device.

Here is the metadevice in question:
Code:
# metastat d90
d90: Mirror
    Submirror 0: d91
      State: Okay
    Submirror 1: d92
      State: Okay
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 426673521 blocks (203 GB)

d91: Submirror of d90
    State: Okay
    Size: 426673521 blocks (203 GB)
    Stripe 0: (interlace: 32 blocks)
        Device      Start Block  Dbase        State Reloc Hot Spare
        c4t8d0s0           0     No            Okay   Yes <==== This disk is failing
        c4t9d0s0        2889     No            Okay   Yes
        c4t10d0s0       2889     No            Okay   Yes
        c4t11d0s0       2889     No            Okay   Yes
        c4t12d0s0       2889     No            Okay   Yes
        c4t13d0s0       2889     No            Okay   Yes

d92: Submirror of d90
    State: Okay
    Size: 426673521 blocks (203 GB)
    Stripe 0: (interlace: 32 blocks)
        Device      Start Block  Dbase        State Reloc Hot Spare
        c5t8d0s0           0     No            Okay   Yes
        c5t9d0s0        2889     No            Okay   Yes
        c5t10d0s0       2889     No            Okay   Yes
        c5t11d0s0       2889     No            Okay   Yes
        c5t12d0s0       2889     No            Okay   Yes
        c5t13d0s0       2889     No            Okay   Yes

So, how do I replace c4t8d0s0, but still continue using all the other disks during the replacement? I want to use the same slot, so I have to pull the old disk out first.

(Note: Solaris Volume Manager makes this look like a RAID 0+1, but my understanding is this is really a RAID 1+0 as explained here)
# 2  
Old 03-01-2013
Good point - the meta device driver must know that the disk has failed.
The safest method is to simply pull out the physical disk,
and read from that metadevice until metastat shows that the device has failed.
Then insert the new physical disk, and run
Code:
metareplace -e mirror device

in your case
Code:
metareplace -e d90 c4t8d0s0

---------- Post updated at 05:24 AM ---------- Previous update was at 05:22 AM ----------

Please first check with
Code:
metadb

If the failed device has got a metadb, it must be recreated before a metareplace.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

3. Solaris

Checking RAID health, metastat returns "no database"

Hello, I am supposed to check the RAID health of a system but when I type metastat it says "there are no existing databases" Does this mean that there is no RAID configured at all? Is there any other utility I should try? I know the system has two disks. Tanks! (8 Replies)
Discussion started by: cevspencer
8 Replies

4. UNIX for Dummies Questions & Answers

replace "," with "." only in specific columns of a file?

Hi all, I have this text file containing 9 columns separated by space. The 8th columns contains the numbers. C1 C2 C3 C4 C5 C6 C7 C8 C9 er rt yt gh iu nk il 0.07 xs yt lr ty bg iu zk nh 0,0005 lt ...etc. I want to replace the comma with full stop only in 8th coloumn. the output... (8 Replies)
Discussion started by: Unilearn
8 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

How to replace "®" "™" "with Spaces in UNIX

do U know how to replace the registered trademark "®" symbol or trade Mark "™" "with Spaces in UNIX (4 Replies)
Discussion started by: MMeari
4 Replies

7. Solaris

Help:"Bad checksum in disk label" and "Can't open disk label package"?

Hello, I'm brand new to Sun/Solaris. I have a Sun Blade 150, with SunOS 5.8. I wanted to make a backup to prevent future data loss, so I put the disk in a normal PC with Windows XP to try to make a backup with Norton Ghost, the disk was detected, but not the file volume, so I place the disk... (6 Replies)
Discussion started by: Resadija
6 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question