Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

re-sync on mirror drives 2

Status
Not open for further replies.

Sirmarsh

Technical User
Jun 11, 2004
10
US
Hello everyone.
I have another problem, i pulled my 18gig production web-server drive that was mirrored, and i need to place it back in the machine now. It is still running on the main drive, the one i pulled was the 2nd drive. What is the command to resync these two drives together again.


thanks everyone for your help that last couple of days

The OS is Solaris 8
 
I guess you are using DiskSuite

run metasync for each metadevice

or post 'metastat' and 'metastat -p' (just for quick/easier reading) output here first

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Here is the output.

thanks so much for this.


bash-2.05$ metastat -p
d0 -m d1 d2 1
d1 1 1 c0t0d0s0
d2 1 1 c0t1d0s0
d10 -m d11 d12 1
d11 1 1 c0t0d0s1
d12 1 1 c0t1d0s1
d30 -m d31 d32 1
d31 1 1 c0t0d0s3
d32 1 1 c0t1d0s3
d50 -m d51 d52 1
d51 1 1 c0t0d0s5
d52 1 1 c0t1d0s5
d60 -m d61 d62 1
d61 1 1 c0t0d0s6
d62 1 1 c0t1d0s6
d70 -m d71 d72 1
d71 1 1 c0t0d0s7
d72 1 1 c0t1d0s7
 
Which is the mirrored pair you need to resync? You should be able to tell this from your /etc/vfstab - look for the filesystem concerned, and the associated metadevice, then issue a metasync <dnn> as appropriate. HTH.
 
>> post 'metastat' and 'metastat -p'

ok, and the metastat output please...

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
# metastat
d0: Mirror
Submirror 0: d1
State: Okay
Submirror 1: d2
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 1366480 blocks

d1: Submirror of d0
State: Okay
Size: 1366480 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t0d0s0 0 No Okay


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


d10: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d12
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4198392 blocks

d11: Submirror of d10
State: Okay
Size: 4198392 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t0d0s1 0 No Okay


d12: Submirror of d10
State: Needs maintenance
Invoke: metareplace d10 c0t1d0s1 <new device>
Size: 4198392 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t1d0s1 0 No Maintenance


d30: Mirror
Submirror 0: d31
State: Okay
Submirror 1: d32
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 14682592 blocks

d31: Submirror of d30
State: Okay
Size: 14682592 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t0d0s3 0 No Okay


d32: Submirror of d30
State: Needs maintenance
Invoke: metareplace d30 c0t1d0s3 <new device>
Size: 14682592 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t1d0s3 0 No Maintenance


d50: Mirror
Submirror 0: d51
State: Okay
Submirror 1: d52
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2101552 blocks

d51: Submirror of d50
State: Okay
Size: 2101552 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t0d0s5 0 No Okay


d52: Submirror of d50
State: Needs maintenance
Invoke: metareplace d50 c0t1d0s5 <new device>
Size: 2101552 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t1d0s5 0 No Maintenance


d60: Mirror
Submirror 0: d61
State: Okay
Submirror 1: d62
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 6295232 blocks

d61: Submirror of d60
State: Okay
Size: 6295232 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t0d0s6 0 No Okay


d62: Submirror of d60
State: Needs maintenance
Invoke: metareplace d60 c0t1d0s6 <new device>
Size: 6295232 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t1d0s6 0 No Maintenance


d70: Mirror
Submirror 0: d71
State: Okay
Submirror 1: d72
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 6700464 blocks

d71: Submirror of d70
State: Okay
Size: 6700464 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t0d0s7 0 No Okay


d72: Submirror of d70
State: Needs maintenance
Invoke: metareplace d70 c0t1d0s7 <new device>
Size: 6700464 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t1d0s7 0 No Maintenance


#
 
ok, run 'metastat | grep meta'; this will genaerate a list of metadevices not in sync

eg: Invoke: metareplace d10 c0t1d0s1 <new device>

replace 'metareplace' by 'metareplace -e' and drop <new device>

eg metareplace -e d10 c0t1d0s1

do this for all the metadevices...

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
You could try :-

metareplace -r d0 c0t1d0s0

etc., this should start the resync process off [don't forget the -r]

HTH

Ray
 
# metareplace -e d0 c0t1d0s0
d0: device c0t1d0s0 is enabled
# metareplace -e d10 c0t1d0s1
d10: device c0t1d0s1 is enabled
# metareplace -e d30 c0t1d0s3
d30: device c0t1d0s3 is enabled
# metareplace -e d50 c0t1d0s5
d50: device c0t1d0s5 is enabled
# metareplace -e d60 c0t1d0s6
d60: device c0t1d0s6 is enabled
# metareplace -e d70 c0t1d0s7
d70: device c0t1d0s7 is enabled


Ok, so this means all is good, and that the re-sync is done, or that it will go to work to be done? What is the next guy sating by doing a metareplace -r d0 c0t1d0s0

etc., this should start the resync process off [don't forget the -r]

Should i do that? Guess my next question is, how do i know it's working?

Thanks so much in advance. I'm more the BSd head then Solaris.
 
sorry, in Germany we are a few hours ahead...

>> Ok, so this means all is good

no, it means you started the resync process; to check & watch progress run 'metastat | grep %', if there are no hits your metadevices are in sync... Then you can run metastat again, all Metadevices and Submirrors should have state "Okay".

>> metareplace -r d0 c0t1d0s0

Ray, you meant "-e", didn't you?

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years
 
Thanks so much for this guys, i ran the command and all is good.


thanks once again for your help, this place is truly a great tool for gathering information.


thanks
Sirmarsh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top