Solaris 10单镜像盘
启动系统
1. 概述
在Solaris系统重启后,发现其中一块镜像盘物理故障,或一块硬盘上的metadb或数据有丢失,导致系统启动时自动进入维护模式,本文档介绍在上述情况下启动系统的操作。 操作环境如下: 主机 Sun Ultra 45 系统版本 硬盘列表 c1t0d0 备注 系统盘 系统盘(故障) Solaris10 Sparc c1t1d0 2. 操作准备
1、准备一张Solaris 10的光盘用于进入单用户模式;
2.1. 确认硬盘故障
? 查看系统启动告警信息
ok boot
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. WARNING: md: d102: (Unavailable) needs maintenance 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
23
17:56:03
svc.startd[9]:
svc:/system/metainit:default:
Method
\
Mar 23 17:56:03 svc.startd[9]: system/metainit:default misconfigured: transitioned to maintenance (see 'svcs -xv' for details) Mar
23
17:56:05
svc.startd[9]:
svc:/system/filesystem/usr:default:
Method
\
Mar 23 17:56:05 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): //输入root密码 single-user privilege assigned to /dev/console.
Entering System Maintenance Mode //系统自动进入维护模式
Mar 23 17:59:19 su: 'su root' succeeded for root on /dev/console Oracle Corporation SunOS 5.10 Generic Patch January 2005 #
? 在维护模式查看镜像状态,发现有一半子镜像需要维护,这一半子镜像都分布在同一块硬盘,这块硬盘上的metadb也处于unknow状态,可以确定c1t1d0硬盘故障,拔出故障硬盘。
# 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 # # # # # # metadb
flags first blk block count
a m p lu 16 8192 /dev/dsk/c1t0d0s7 a p l 8208 8192 /dev/dsk/c1t0d0s7 a p l 16400 8192 /dev/dsk/c1t0d0s7 M W p l 16 unknown /dev/dsk/c1t1d0s7 M W p l 8208 unknown /dev/dsk/c1t1d0s7