现场查看硬盘灯状态,灯已不亮
1.查看当前镜像状态
root@byshwlerp # metastat
d66: Mirror
Submirror 0: d76
State: Okay
Submirror 1: d86
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 286556160 blocks (136 GB)
d76: Submirror of d66
State: Okay
Size: 286556160 blocks (136 GB)
Stripe 0:
Device    Start Block  Dbase        State Reloc Hot Spare
c1t4d0s6          0    No            Okay  Yes
d86: Submirror of d66
State: Needs maintenance
Invoke: metareplace d66 c1t5d0s6 <new device>
Size: 286556160 blocks (136 GB)
Stripe 0:
Device    Start Block  Dbase        State Reloc Hot Spare
c1t5d0s6          0    No    Maintenance  Yes
2.将子镜像d86从主镜像d66剔除
root@byshwlerp # metadetach -f d66 d86
d66: submirror d86 is detached
3.清除子镜像d86
root@byshwlerp # metaclear d86
d86: Concat/Stripe is cleared
4.查看当前镜像状态数据库
root@byshwlerp # metadb
flags          first blk      block count
a m  p  luo        16              8192            /dev/dsk/c1t0d0s7
a    p  luo        8208            8192            /dev/dsk/c1t0d0s7
a    p  luo        16400          8192            /dev/dsk/c1t0d0s7
a    p  luo        16              8192            /dev/dsk/c1t1d0s7
a    p  luo        8208            8192            /dev/dsk/c1t1d0s7
a    p  luo        16400          8192            /dev/dsk/c1t1d0s7
a    p  luo        16              8192            /dev/dsk/c1t2d0s7
a    p  luo        8208            8192            /dev/dsk/c1t2d0s7
a    p  luo        16400          8192            /dev/dsk/c1t2d0s7
a    p  luo        16              8192            /dev/dsk/c1t8d0s7
a    p  luo        8208            8192            /dev/dsk/c1t8d0s7
a    p  luo        16400          8192            /dev/dsk/c1t8d0s7
a    p  luo        16              8192            /dev/dsk/c1t4d0s7
a    p  luo        8208            8192            /dev/dsk/c1t4d0s7
a    p  luo        16400          8192            /dev/dsk/c1t4d0s7
M    p            16              unknown        /dev/dsk/c1t5d0s7
M    p            8208            unknown        /dev/dsk/c1t5d0s7
M    p            16400          unknown        /dev/dsk/c1t5d0s7#c1t5d0s7的数据库已受损    a    p  luo        16              8192            /dev/dsk/c1t11d0s7
a    p  luo        8208            8192            /dev/dsk/c1t11d0s7
a    p  luo        16400          8192            /dev/dsk/c1t11d0s7
5.删除坏盘的状态数据库
root@byshwlerp # metadb -d c1t5d0s7
6.将坏盘从系统中踢除
root@byshwlerp # luxadm remove_device  /dev/dsk/c1t5d0s2
WARNING!!! Please ensure that no filesystems are mounted on these device(s).
All data on these devices should have been backed up.
Inquiry failed for /devices/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010aefa11,0:c
Error opening the path. - /dev/dsk/c1t5d0s2.
由于该盘已经在系统中无法识别,所以可以直接拔出,如是在系统尚可识别情况下,根据提示拔出硬盘再按enter键7.拔出硬盘后,执行如下指令
root@byshwlerp # luxadm insert_device
Please hit <RETURN> when you have finished adding Fibre Channel Enclosure(s)/Device(s):
出现以上这个提示就可以插入硬盘,插入之后再按enter挂载硬盘!!!!
Waiting for Loop Initialization
New Logical Nodes under /dev/dsk and /dev/rdsk :
c1t5d0s0
c1t5d0s1
c1t5d0s2
c1t5d0s3
c1t5d0s4
c1t5d0s5
c1t5d0s6
c1t5d0s7#系统已经识别到该硬盘
No new enclosure(s) were added!!
8.查看系统识别硬盘情况
root@byshwlerp # format
Searching done
c1t5d0: configured with capacity of 136.71GB
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e011e658b1,0
1. c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e011e6b771,0
2. c1t2d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w2100001862204428,0
3. c1t3d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01a5e4c81,0
4. c1t4d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010ad2c01,0
5. c1t5d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e014ab26e1,0#该盘已挂载
6. c1t8d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w2100001862d3bdc4,0
7. c1t11d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w210000186274ce40,0
Specify disk (enter its number): ^Z
[1]+  Stopped                format
root@byshwlerp # prtvtoc /dev/rdsk/c1t4d0s2 |fmthard -s - /dev/rdsk/c1t5d0s2 执行指令失效
/dev/rdsk/c1t5d0s2: Cannot read VTOC
root@byshwlerp # format
Searching done
c1t5d0: configured with capacity of 136.71GB
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e011e658b1,0
1. c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e011e6b771,0
2. c1t2d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w2100001862204428,0
3. c1t3d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e01a5e4c81,0
4. c1t4d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e010ad2c01,0
5. c1t5d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w500000e014ab26e1,0
6. c1t8d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w2100001862d3bdc4,0
7. c1t11d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/
pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w210000186274ce40,0
Specify disk (enter its number): 5#进入该新换硬盘
selecting c1t5d0
[disk formatted]
Disk not labeled.  Label it now? y#需要label标记下,新盘需要label!!!!!!
FORMAT MENU:
disk      - select a disk
type      - select (define) a disk type
partition  - select (define) a partition table
current    - describe the current disk
format    - format and analyze the disk
repair    - repair a defective sector
label      - write label to the disk
analyze    - surface analysis
defect    - defect list management
backup    - search for backup labels
verify    - read and display labels
save      - save new disk/partition definitions
inquiry    - show vendor, product and revision
volname    - set 8-character volume name
!<cmd>    - execute <cmd>, then return
quit
unknown怎么处理
format> quit
9.复制分区
root@byshwlerp # prtvtoc /dev/rdsk/c1t4d0s2 | fmthard -s - /dev/rdsk/c1t5d0s2#c1t4d0s2是为另一子镜像,2号分区为硬盘总分区,复制这个就行了fmthard:  New volume table of contents now in place.指令运行正常了
10.重建该盘状态数据库
root@byshwlerp # metadb -a -c 3 c1t5d0s7
root@byshwlerp # metadb
flags          first blk      block count
a m  p  luo        16              8192            /dev/dsk/c1t0d0s7    a    p  luo        8208            8192            /dev/dsk/c1t0d0s7    a    p  luo        16400          8192            /dev/dsk/c1t0d0s7    a    p  luo        16              8192            /dev/dsk/c1t1d0s7    a    p  luo        8208            8192            /dev/dsk/c1t1d0s7    a    p  luo        16400          8192            /dev/dsk/c1t1d0s7    a    p  luo        16              8192            /dev/
dsk/c1t2d0s7    a    p  luo        8208            8192            /dev/dsk/c1t2d0s7    a    p  luo        16400          8192            /dev/dsk/c1t2d0s7    a    p  luo        16              8192            /dev/dsk/c1t8d0s7    a    p  luo        8208            8192            /dev/dsk/c1t8d0s7    a    p  luo        16400          8192            /dev/dsk/c1t8d0s7    a    p  luo        16              8192            /dev/dsk/c1t4d0s7    a    p  luo        8208            8192            /dev/dsk/c1t4d0s7    a    p  luo        16400          8192            /dev/dsk/c1t4d0s7    a        u        16              8192            /dev/dsk/c1t5d0s7    a        u        8208            8192            /dev/dsk/c1t5d0s7    a        u        16400          8192            /dev/dsk/c1t5d0s7    a    p  luo        16              8192            /dev/dsk/c1t11d0s7    a    p  luo        8208            8192            /dev/dsk/c1t11d0s7
a    p  luo        16400          8192            /dev/dsk/c1t11d0s7
11.重建子镜像
root@byshwlerp # metainit d86 1 1 c1t5d0s6
d86: Concat/Stripe is setup
12.将子镜像d86加入主镜像d66
root@byshwlerp # metattach d66 d86
d66: submirror d86 is attached
13.再次查看状态数据库
root@byshwlerp # metastat
d66: Mirror
Submirror 0: d76
State: Okay
Submirror 1: d86
State: Resyncing
Resync in progress: 0 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 286556160 blocks (136 GB)
d76: Submirror of d66
State: Okay
Size: 286556160 blocks (136 GB)
Stripe 0:
Device    Start Block  Dbase        State Reloc Hot Spare
c1t4d0s6          0    No            Okay  Yes
d86: Submirror of d66
State: Resyncing
Size: 286556160 blocks (136 GB)
Stripe 0:
Device    Start Block  Dbase        State Reloc Hot Spare
c1t5d0s6          0    No            Okay  Yes
14.查看镜像同步百分比,当无输出时,同步完成,可再运行metastat查看镜像状态root@byshwlerp # metastat | grep %
Resync in progress: 0 % done

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。