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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

metadevices need maintenance

Status
Not open for further replies.

nychris

MIS
Dec 4, 2004
103
0
0
US
I have a Solaris 8 server on an Ultra 2 Enterprise box. It has a SPARCstorage Array attached with about 30 small disks inside. The GBIC on the SSA was defective and needed to be replaced the other day. Now, all of the metadevices say that they need maintenace. I have a bunch of these:
d51: Mirror
Submirror 0: d47
State: Needs maintenance
Submirror 1: d48
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 16504884 blocks (7.9 GB)

d47: Submirror of d51
State: Needs maintenance
Invoke: after replacing "Maintenance" components:
metareplace d51 c2t0d2s0 <new device>
Size: 16504884 blocks (7.9 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c2t0d2s0 0 No Last Erred No


d48: Submirror of d51
State: Needs maintenance
Invoke: after replacing "Maintenance" components:
metareplace d51 c2t1d0s0 <new device>
Size: 16504884 blocks (7.9 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c2t1d0s0 0 No Last Erred No
How do you fix this when both sides of the mirror require maintenance? Can I just do:
metareplace -e 51 c2t1d0s0
metareplace -e 51 c2t0d2s0

Thanks
 
NyChris,
That command sounds good to me... It should resync your mirrors.
 


Should the command be: (missing the letter "d"
metareplace -d d51 c2t1d0s0
metareplace -d d51 c2t0d2s0
 
That doesn't seem to work...
Code:
d51: Mirror
    Submirror 0: d47
      State: Needs maintenance
    Submirror 1: d48
      State: Needs maintenance
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 16504884 blocks (7.9 GB)

d47: Submirror of d51
    State: Needs maintenance
    Invoke: after replacing "Maintenance" components:
                metareplace d51 c2t0d2s0 <new device>
    Size: 16504884 blocks (7.9 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c2t0d2s0          0     No      Last Erred   No


d48: Submirror of d51
    State: Needs maintenance
    Invoke: after replacing "Maintenance" components:
                metareplace d51 c2t1d0s0 <new device>
    Size: 16504884 blocks (7.9 GB)
    Stripe 0:
        Device     Start Block  Dbase        State Reloc Hot Spare
        c2t1d0s0          0     No      Last Erred   No


Device Relocation Information:
Device   Reloc  Device ID
c2t0d2   No     -
c2t1d0   No     -



bash-2.05# metareplace -e d51 c2t1d0s0
metareplace: usilsuds: d51: c2t1d0s0: component in invalid state to replace - Replace "Maintenance" components first

Any ideas? I've never seen it like this.
 
SORRY I screwed up it should be :
metareplace -e d51 c2t1d0s0
metareplace -e d51 c2t0d2s0
 
Doesn't the metareplace command require a working mirror to work ?

I would think it's not going to work when all the mirrors are flagged bad.
 
tuka, thats the exact command I used in both posts above


dandan, I've never seen all of the mirrors flagged bad. Does this mean I need to destroy all metadevices and restore from backups?
 
You might be able to metadetach [using the -f option] one half of the mirror. You could then do a certain amount of checking by running format/aanalyze/read against the disk to see if its OK. Then metattach. This may clear the "needs maintenance" message which would leave you free to do the same against the other half of the mirror. Works sometimes.

Ray

Even a bad day at the races is better than a good day at the office.
 
From the metareplace man page:

[tt] -f Forces the replacement of an errored component of a
metadevice in which multiple components are in error.[/tt]

Add that to the metareplace -e command and you should be in business.

Annihilannic.
 
as Annihilannic wrote, use metareplace -f -e ...
ALWAYS start with the "last erred" device.
If metareplace does not work you can run (if you have a md.tab)
metadetach -f dmirrordsubmirror1
metadetach -f dmirrordsubmirror2
metaclear -f dmirror
metaclear -f dsubmirror1
metaclear -f dsubmirror2
metainit dsubmirror1
metainit dsubmirror2
metainit dmirror
metattach dmirror dsubmirror2

Good Luck!

Best Regards, Franz
--
Solaris System Manager from Munich, Germany
I used to work for Sun Microsystems Support (EMEA) for 5 years in the domain of the OS, Backup and Storage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top