d110: Mirror
Submirror 0: d111 State: Okay Submirror 1: d112
State: Needs maintenance Pass: 1
Read option: roundrobin (default) Write option: parallel (default) Size: 20482820 blocks (9.8 GB)
d111: Submirror of d110 State: Okay
Size: 20482820 blocks (9.8 GB) Stripe 0:
Device Start Block Dbase State Reloc Hot Spare c1t0d0s1 0 No Okay Yes
d112: Submirror of d110 State: Needs maintenance
Invoke: metareplace d110 c1t1d0s1
Device Start Block Dbase State Reloc Hot Spare c1t1d0s1 0 No Maintenance Yes
d100: Mirror
Submirror 0: d101 State: Okay Submirror 1: d102
State: Needs maintenance Pass: 1
Read option: roundrobin (default) Write option: parallel (default) Size: 71683312 blocks (34 GB)
d101: Submirror of d100 State: Okay
Size: 71683312 blocks (34 GB) Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t0d0s0 0 No Okay Yes
d102: Submirror of d100 State: Needs maintenance
Invoke: metareplace d100 c1t1d0s0
Device Start Block Dbase State Reloc Hot Spare c1t1d0s0 0 No Maintenance Yes
Device Relocation Information: Device Reloc Device ID
c1t1d0 Yes id1,sd@n5000c50002f5d577 c1t0d0 Yes id1,sd@n5000c50002f54e2b bash-3.2# bash-3.2#
3.6. 在线更换硬盘,重新同步数据
4. 解决方法2(删除unknow的metadb)
4.1. 进入维护模式
系统缺少metadb会自动进入维护模式,
bash-3.2# init 6
bash-3.2# svc.startd: The system is coming down. Please wait. svc.startd: 107 system services are now being stopped. Mar 24 12:22:41 test-01 rpc.metad: Terminated
Mar 24 12:22:47 test-01 syslogd: going down on signal 15 svc.startd: The system is down. syncing file systems... done
rebooting...
Sun Ultra 45 Workstation, No Keyboard
Copyright 2005 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.21.2, 4096 MB memory installed, Serial #68148048. Ethernet address 0:14:4f:f:db:50, Host ID: 840fdb50.
Rebooting with command: boot Boot device: /pci@1e,600000/pci@0/pci@9/pci@0/scsi@1/disk@0,0:a File and args: SunOS Release 5.10 Version Generic_147147-26 64-bit
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved. Hostname: test-01
Insufficient metadevice database replicas located.
Use metadb to delete databases which are broken. Ignore any Read-only file system error messages.
Reboot the system when finished to reload the metadevice database. After reboot, repair any broken database replicas which were deleted. Mar 24 12:24:55 svc.startd[9]: svc:/system/metainit:default: Method \
Mar 24 12:24:55 svc.startd[9]: system/metainit:default misconfigured: transitioned to maintenance (see 'svcs -xv' for details) Mar 24 12:24:57 svc.startd[9]: svc:/system/filesystem/usr:default: Method \
Mar 24 12:24:57 svc.startd[9]: system/filesystem/usr:default failed fatally: transitioned to maintenance (see 'svcs -xv' for details) Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.) Console login service(s) cannot run
Root password for system maintenance (control-d to bypass): single-user privilege assigned to /dev/console. Entering System Maintenance Mode
Mar 24 12:25:00 su: 'su root' succeeded for root on /dev/console
Oracle Corporation SunOS 5.10 Generic Patch January 2005 #
4.2. 查看系统状态和配置
维护模式不能编辑文件,但可以查看镜像状态和系统文件,我们
可以查看镜像状态和system文件内容.
# metastat d130: Mirror
Submirror 0: d131
State: Okay Submirror 1: d132
State: Needs maintenance Pass: 1
Read option: roundrobin (default) Write option: parallel (default) Size: 30722044 blocks (14 GB)
d131: Submirror of d130 State: Okay
Size: 30722044 blocks (14 GB) Stripe 0:
Device Start Block Dbase State Reloc Hot Spare c1t0d0s3 0 No Okay Yes
d132: Submirror of d130
State: Needs maintenance
Invoke: metareplace d130 c1t1d0s3
Device Start Block Dbase State Reloc Hot Spare c1t1d0s3 0 No Maintenance Yes
d110: Mirror
Submirror 0: d111
State: Okay Submirror 1: d112
State: Needs maintenance Pass: 1
Read option: roundrobin (default) Write option: parallel (default) Size: 20482820 blocks (9.8 GB)
d111: Submirror of d110 State: Okay
Size: 20482820 blocks (9.8 GB) Stripe 0:
Device Start Block Dbase State Reloc Hot Spare c1t0d0s1 0 No Okay Yes
d112: Submirror of d110
State: Needs maintenance
Invoke: metareplace d110 c1t1d0s1
Device Start Block Dbase State Reloc Hot Spare c1t1d0s1 0 No Maintenance Yes
d100: Mirror
Submirror 0: d101
State: Okay Submirror 1: d102
State: Needs maintenance Pass: 1
Read option: roundrobin (default) Write option: parallel (default) Size: 71683312 blocks (34 GB)
d101: Submirror of d100 State: Okay
Size: 71683312 blocks (34 GB) Stripe 0:
Device Start Block Dbase State Reloc Hot Spare c1t0d0s0 0 No Okay Yes
d102: Submirror of d100
State: Needs maintenance
Invoke: metareplace d100 c1t1d0s0
Device Start Block Dbase State Reloc Hot Spare c1t1d0s0 0 No Maintenance Yes
Device Relocation Information: Device Reloc Device ID
c1t1d0 Yes id1,sd@n5000c50002f5d577 c1t0d0 Yes id1,sd@n5000c50002f54e2b