You are on page 1of 5

Disk0 – c0t0d0

Disk1- c0t1d0

1 Backup these files

• /etc/lvm/mddb.cf or /etc/lvm/md.cf files.


• /etc/vfstab
• metadb -i output
• metastat –p output
• metadb output
• /kernaldrv/md.conf

2 Add an entry in /etc/system


• set md: mirrored_root_flag=1

3 Reboot the server

4 Check their application is working


5 shutdown the sever
6 remove defective harddisk
6 insert the new harddisk
7 execute following command
• prtvtoc /dev/rdsk/c0t0d0s2| fmthard -s - /dev/rdsk/c0t1d0s2
After that check the partition table.

8 Now check metadb -i


• Output is look like this

flags first blk block count


a m p luo 16 8192 /dev/dsk/c0t0d0s7
a p luo 8208 8192 /dev/dsk/c0t0d0s7
a p luo 16400 8192 /dev/dsk/c0t0d0s7
M 16 unknown /dev/dsk/c0t1d0s7
M 8208 unknown /dev/dsk/c0t1d0s7
M 16400 unknown /dev/dsk/c0t1d0s7
State database replicas with a capitalized status flag are in error. State database replicas with a
lowercase status flag are functioning normally.

9 Then we have to delete state database replicas on slice c0t1d0s7


• Metadb –d c0t1d0s7

10 Then we have to create state database replicas on slice c0t1d0s7

• Metadb –a –c 3 c0t1d0s7

11 we have to check metadb –I

• The correct output looks like this


flags first blk block count
a m p luo 16 8192 /dev/dsk/c0t0d0s7
a p luo 8208 8192 /dev/dsk/c0t0d0s7
a p luo 16400 8192 /dev/dsk/c0t0d0s7
a p luo 16 8192 /dev/dsk/c0t1d0s7
a p luo 8208 8192 /dev/dsk/c0t1d0s7
a p luo 16400 8192 /dev/dsk/c0t1d0s7

12 we have to check metastat


• Output is looks like this

3d9: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d11
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 529152 blocks (258 MB)

d10: Submirror of d9
State: Okay
Size: 529152 blocks (258 MB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s6 0 No Okay Yes

d11: Submirror of d9
State: Needs maintenance
Invoke: metareplace d9 c0t1d0s6 <new device>
Size: 529152 blocks (258 MB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s6 0 No Maintenance Yes
d6: Mirror
Submirror 0: d7
State: Needs maintenance
Submirror 1: d8
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 10491456 blocks (5.0 GB)

d7: Submirror of d6
State: Needs maintenance
Invoke: after replacing "Maintenance" components:
metareplace d6 c0t0d0s5 <new device>
Size: 10491456 blocks (5.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s5 0 No Last Erred Yes

d8: Submirror of d6
State: Needs maintenance
Invoke: after replacing "Maintenance" components:
metareplace d6 c0t1d0s5 <new device>
Size: 10491456 blocks (5.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s5 0 No Last Erred Yes

d3: Mirror
Submirror 0: d4
State: Okay
Submirror 1: d5
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 8395200 blocks (4.0 GB)

d4: Submirror of d3
State: Okay
Size: 8395200 blocks (4.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s1 0 No Okay Yes

d5: Submirror of d3
State: Needs maintenance
Invoke: metareplace d3 c0t1d0s1 <new device>
Size: 8395200 blocks (4.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s1 0 No Maintenance Yes
d0: Mirror
Submirror 0: d1
State: Needs maintenance
Submirror 1: d2
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 123404352 blocks (58 GB)

d1: Submirror of d0
State: Needs maintenance
Invoke: after replacing "Maintenance" components:
metareplace d0 c0t0d0s0 <new device>
Size: 123404352 blocks (58 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s0 0 No Last Erred Yes

d2: Submirror of d0
State: Needs maintenance
Invoke: metareplace d0 c0t1d0s0 <new device>
Size: 123404352 blocks (58 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s0 0 No Maintenance Yes

Device Relocation Information:


Device Reloc Device ID
c0t1d0 Yes
id1,sd@SFUJITSU_MAT3073N_SUN72G_000515B03HPD____AAN0P5403HPD
c0t0d0 Yes id1,sd@SSEAGATE_ST373307LSUN72G_3HZA23TG00007532P57J

13 we have to execute following commands

• metareplace -e d9 c0t1d0s6

• metareplace –e d6 c0t0d0s5

• metareplace -e d3 c0t1d0s1

• metareplace -e d0 c0t1d0s0

14 check syncking
• metastat | grep %
15 once syncing is complete

16-copy boot block


installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0

17 reboot the server

• check metastat - result with out any error


• metadb –i

• State database replicas with any a capitalized status flag

18 Results second hard disk replacement is success

M.V.N.RAO

You might also like