Need help replacing a mirrored boot disk


 
Thread Tools Search this Thread
Operating Systems Solaris Need help replacing a mirrored boot disk
# 1  
Old 10-17-2013
Need help replacing a mirrored boot disk

I have a v480 with a mirrored boot disk c1t0 and c1t1. The drives themselves don't show a failure but the mirror's need maintenance.

This is my plan for replacing the drive. I would love feedback to point out what I"m missing or where my steps are incorrect.

Two things I believe I'm missing is do I need to newfs the replacement drive and/or create a bootblk on the replacement drive?

Do i need to change the devalias in OBP to point to the new device name?

Anyone know which drive is t1 and t0? I believe slot 0 is t0.

Here is the information I've gathered and the steps I intend to take.

Failed mirrors:
d14: Mirror
Submirror 0: d84
State: Okay
Submirror 1: d94
State: Needs maintenance

d84: Submirror of d14
State: Okay
Size: 4090752 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s4 10176 Yes Okay

d94: Submirror of d14
State: Needs maintenance
Invoke: metareplace d14 c1t1d0s4 <new device>
Size: 4090752 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s4 10176 Yes Maintenance


d13: Mirror
Submirror 0: d83
State: Okay
Submirror 1: d93
State: Needs maintenance

d83: Submirror of d13
State: Okay
Size: 203520 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s3 10176 Yes Okay

d93: Submirror of d13
State: Needs maintenance
Invoke: metareplace d13 c1t1d0s3 <new device>
Size: 203520 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s3 10176 Yes Maintenance
d0: Mirror
Submirror 0: d80
State: Okay
Submirror 1: d90
State: Needs maintenance

d80: Submirror of d0
State: Okay
Size: 4100928 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s0 0 No Okay

d90: Submirror of d0
State: Needs maintenance
Invoke: metareplace d0 c1t1d0s0 <new device>
Size: 4100928 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s0 0 No Maintenance


Replica state
metadb -i
flags first blk block count
a m p luo 16 1034 /dev/dsk/c1t0d0s3
a p luo 16 1034 /dev/dsk/c1t1d0s3
a p luo 16 1034 /dev/dsk/c1t0d0s4
a p luo 16 1034 /dev/dsk/c1t1d0s4
a p luo 16 1034 /dev/dsk/c1t0d0s7
a p luo 16 1034 /dev/dsk/c1t1d0s7

  1. Detach sub mirrors
metadetach -f d14 d94
metadetach -f d13 d93
metadetach -f d0 d90
  1. Clear config information
metaclear d94
metaclear d93
metaclear d90
  1. Verify there are no metadevices still on the drive
metastat -p | grep c1t1d0



  1. Clear replicas (three replicas left on c1t0)
metadb -d c1t1d0s3
metadb -d c1t1d0s4
metadb -d c1t1d0s7
  1. Save disk partition for later
prtvtoc /dev/rdsk/c1t1d0s2 > /tmp/disk2vtoc
  1. Prep drive for removal
    1. a. luxadm remove_device -F /dev/rdsk/c1t1d0s2
    2. Wait for the prompt telling you to remove the drive
    3. Remove the drive from the system
    4. devfsadm -Cc disk (cleans up)
  1. Insert new drive
  1. 8. devfsadm
  1. verify new drive paths are in solaris (ls -ld /dev/dsk/c1t1d*)
  1. Format the drive with the file saved in step 5
fmthard -s /tmp/disk2vtoc /dev/rdsk/c1t1d0s2
  1. Create and reattach submirror
    1. a. metainit d94 1 1 c1t1d0s4
    2. b. metattach d14 d94
    3. c. metainit d93 1 1 c1t1d0s3
    4. d. metattach d13 d93
    5. e. metainit d90 1 1 c1t1d0s0
    6. f. metattach d0 d90
  1. Create replicas
Metadb -a -c3 c1t1d0s2
# 2  
Old 10-17-2013
Your metadb creation is wrong, should be
Code:
metadb –d c1t1d0s3
metadb –d c1t1d0s4
metadb –d c1t1d0s7
metadb –a -c 1 c1t1d0s3
metadb –a -c 1 c1t1d0s4
metadb –a -c 1 c1t1d0s7

The partition information from the failed disk might fail, can be obtained from the good disk.
My idiot-safe method to identify the failed disk is to do some permanent reads. The good disk's activity LED flickers!
The straight method to replace and resync (without metadetach metaclear metainit metattach):
Code:
metareplace -e d14 d94
metareplace -e d13 d93
metareplace -e d0 d90


Last edited by MadeInGermany; 10-17-2013 at 05:10 PM..
# 3  
Old 10-17-2013
So the metareplace command will work by itself? I thought this was the case but everything I've read uses the steps I posted.

Thanks for the correction on the metadb.
# 4  
Old 10-17-2013
Yes! The advise given by metastat is not too bad
Code:
metareplace d0 c1t1d0s0
<new device>

but should be
Code:
metareplace -e d0 c1t1d0s0

Must be the disk slice not the submirror (I got that wrong).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Use 'dd' to copy boot disk to larger target disk

Hi, I'm looking to copy a boot disk on an old Solaris 8 system using dd. I'll bring the system down to single user mode and begin from there. I'm copying my source disk to a larger target disk. Do I need to do anything other than the 'dd' command below because the target disk is bigger? ... (2 Replies)
Discussion started by: sparcman
2 Replies

2. Red Hat

Booting 2nd mirrored boot disk

Hi guys, thanks for helping out. If you have two boot disk mirrored and your primary boot disk fails, how will you boot the system from the second disk? Thank you very much for your assistance on this matter. Arrey (5 Replies)
Discussion started by: cjashu
5 Replies

3. Solaris

Boot from Mirrored disk

So I have mirrored disk already set up from c1t0d0 to c1t1d0. Is there some special procedures that I need to do before I do and then try to boot from the mirrored disk? I am using a V490 if that helps... (7 Replies)
Discussion started by: drew_1980
7 Replies

4. UNIX for Advanced & Expert Users

how to create multiple-boot system with disks mirrored(RAID1+0) and disk alone

I have a HP proliant ML 570 G3 with two 146GB disk drives mirrored(RAID1+0) windows server 2003 was installed on that disk. I will add a disk.(scsi 300GB) I will install Linux on that additional disk. I want to create multiple-boot system. Is it possible? I wanna know how to create... (0 Replies)
Discussion started by: lifegeek
0 Replies

5. Solaris

Remove os mirrored disk Solaris 10

Hello once again seeking your help, I have a mirrored disk and need to unmirror it to mount it as a new file system (/export) but could not find the correct steps to do it with out affecting the original disk. can anybody point me out on how to get this done. Thanks!! (3 Replies)
Discussion started by: AQG
3 Replies

6. UNIX for Dummies Questions & Answers

Solaris 10 not booting with mirrored disk

Hi all, I have a V490 running with Solaris 10. The OS disk was mirrored. I wanted to break the mirror, boot with the secondary mirror, and re-mirror the OS with a new disk. This is what I did, detached the metadevices of the secondary mirror disk (disk 1) metaclear-ed the metadevices,... (1 Reply)
Discussion started by: nitinp82
1 Replies

7. UNIX for Dummies Questions & Answers

Creating create mirrored disk files systems using mkfs command

What is the correct mkfs syntax to create mirrored disk files systems? I need to make the file system 20gb. For example: machine# mkfs -F ufs /dev/md/dsk/d40 size not specified ufs usage: mkfs special size(sectors) \ -m : dump fs cmd line used to make this partition -V : print this... (4 Replies)
Discussion started by: GLJ@USC
4 Replies

8. AIX

Mirrored disk.....

How do I know, which all disks are mirrored? any command? Bala (7 Replies)
Discussion started by: balaji_prk
7 Replies

9. HP-UX

Number of Disk Mirrored in HP-UX

In HP-UX 11.00 How can i check if there are disks mirrored (2 Replies)
Discussion started by: cgege
2 Replies

10. UNIX for Advanced & Expert Users

Replacing Boot Disk in Solaris

Hi, I have the situaiton in which primary boot disk has bad sectors in Solaris 9. The other hard disk is mirrored using Solstice DiskSuite 4.2. I can reboot system with the other disk. My question is, when I replaced the boot disk with a new one, how can I create meta db and finally make it... (2 Replies)
Discussion started by: s_aamir
2 Replies
Login or Register to Ask a Question