求助:SUN V440 SDS 根镜像盘损坏
硬件:SUN V440 系统:Solaris 8
日志如下:
root@localhsot # more /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d1 - - swap - no -
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no -
/dev/md/dsk/d3 /dev/md/rdsk/d3 /var ufs 1 no -
/dev/md/dsk/d5 /dev/md/rdsk/d5 /export/home ufs 2 yes -
/dev/md/dsk/d4 /dev/md/rdsk/d4 /opt ufs 2 yes -
/dev/md/dsk/d6 /dev/md/rdsk/d6 /data ufs 3 yes logging
swap - /tmp tmpfs - yes -
root@localhsot # df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 15128715 1505993 13471435 11% /
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
/dev/md/dsk/d3 10086988 665713 9320406 7% /var
swap 11596776 24 11596752 1% /var/run
swap 11612384 15632 11596752 1% /tmp
/dev/md/dsk/d4 10086988 219460 9766659 3% /opt
/dev/md/dsk/d6 70226458 51674741 17849453 75% /data
/dev/md/dsk/d5 26223047 110386 25850431 1% /export/home
root@localhsot # metastat
d0: Mirror
Submirror 0: d10
State: Okay
Submirror 1: d20
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 30721344 blocks
d10: Submirror of d0
State: Okay
Size: 30721344 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s0 0 No Okay
d20: Submirror of d0
State: Needs maintenance
Invoke: metareplace d0 c1t1d0s0 <new device>
Size: 30721344 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s0 0 No Maintenance
d1: Mirror
Submirror 0: d11
State: Okay
Submirror 1: d21
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 16780224 blocks
d11: Submirror of d1
State: Okay
Size: 16780224 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s1 0 No Okay
d21: Submirror of d1
State: Okay
Size: 16780224 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s1 0 No Okay
d3: Mirror
Submirror 0: d13
State: Okay
Submirror 1: d23
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20484288 blocks
d13: Submirror of d3
State: Okay
Size: 20484288 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s3 0 No Okay
d23: Submirror of d3
State: Needs maintenance
Invoke: metareplace d3 c1t1d0s3 <new device>
Size: 20484288 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s3 0 No Maintenance
d4: Mirror
Submirror 0: d14
State: Okay
Submirror 1: d24
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 20484288 blocks
d14: Submirror of d4
State: Okay
Size: 20484288 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s4 0 No Okay
d24: Submirror of d4
State: Needs maintenance
Invoke: metareplace d4 c1t1d0s4 <new device>
Size: 20484288 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s4 0 No Maintenance
d5: Mirror
Submirror 0: d15
State: Okay
Submirror 1: d25
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 53251008 blocks
d15: Submirror of d5
State: Okay
Size: 53251008 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t0d0s5 0 No Okay
d25: Submirror of d5
State: Needs maintenance
Invoke: metareplace d5 c1t1d0s5 <new device>
Size: 53251008 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t1d0s5 0 No Maintenance
d6: Mirror
Submirror 0: d16
State: Okay
Submirror 1: d26
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 142606464 blocks
d16: Submirror of d6
State: Okay
Size: 142606464 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t2d0s0 0 No Okay
d26: Submirror of d6
State: Okay
Size: 142606464 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c1t3d0s0 0 No Okay
root@localhsot # metadb -i
flags first blk block count
a uo 16 8192 /dev/dsk/c1t0d0s7
a uo 8208 8192 /dev/dsk/c1t0d0s7
a uo 16400 8192 /dev/dsk/c1t0d0s7
W p l 16 8192 /dev/dsk/c1t1d0s7
W p l 8208 8192 /dev/dsk/c1t1d0s7
W p l 16400 8192 /dev/dsk/c1t1d0s7
o - replica active prior to last mddb configuration change
u - replica is up to date
l - locator for this replica was read successfully
c - replica's location was in /etc/lvm/mddb.cf
p - replica's location was patched in kernel
m - replica is master, this is replica selected as input
W - replica has device write errors
a - replica is active, commits are occurring to this replica
M - replica had problem with master blocks
D - replica had problem with data blocks
F - replica had format problems
S - replica is too small to hold current data base
R - replica had device read errors
root@localhsot # exit
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
如果不允许重启呢?最上面操作是否可行
metadb -d cxtxdxsx
metadettach
metaclear
换盘
prtvtoc /dev/rdsk/cxtxdxsx -s - /dev/rdsk/cxtxdxsx
metadb -afc n cxtxdxsx
metainit -f dxx 11 cxtxdxsx
修改vfstab表。
REBOOT
metattach dx dxx
netastat | grep %
查看同步进度
网上有资料说这一步可以省略,但有人又说没这一步可能启动不了。
installboot /usr/platform/SUNW,Sun-Fire-V440/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0
这个步骤现在还需要么?
这个乱?能指出来么,我觉得步骤很清楚啊,按照他的步骤应该没问题 谢谢!请指点
回复 3# king2007
比较乱?
是日志还是步骤?
这个步骤很全,是这样换的 收藏
比较乱,再看看资料吧!
本帖最后由 junchenguo 于 2010-08-09 10:05 编辑
根据百度谷歌出来的资料整理了一个更换磁盘的思路,不知是否可行,请高手指正
注:生产机,不可随意重启。
步骤思路如下:
1.换盘之前
#cfgadm -x unconfigure /dev/rdsk/c1t1d0
2.在线拔下故障硬盘,插上新硬盘,查找新更换的硬盘
#devfsadm
#cfgadm -x configure /dev/rdsk/c1t1d0
3.删除原来在c1t1d0s7上创建的metadevices database
#metadb -d c1t1d0s7
4.给新盘创建和镜像盘一样的分区表
#prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
5.重新在新盘上创建metadevices database
#metadb -a -f -c 3 c1t1d0s7
6.恢复镜像
#metareplace -e d0 c1t1d0s0
#metareplace -e d1 c1t1d0s1
#metareplace -e d3 c1t1d0s3
#metareplace -e d4 c1t1d0s4
#metareplace -e d5 c1t1d0s5
生成引导块,可在4-5步之间执行,也可放到这里执行
#installboot /usr/platform/SUNW,Sun-Fire-V440/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0
7.查看各分区状态
#metastat
请指正