免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1863 | 回复: 0
打印 上一主题 下一主题

Disk Suite Disk Replacement Procedure [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-08-14 16:18 |只看该作者 |倒序浏览
Disk Suite Disk Replacement Procedure
1. Identify problem disk by checking errors in /var/adm/messages. Use the “metastat” command
to see if the disk has been replaced with a HS (hot spare) or is in an error state.
2. Determine which metadevices use disk, and also if it contains any logs or metadbs. Use the
“metstat” and “metadb” commands.
3. Before the disk is replaced the disk partition layout must be recorded so we can label the new
disk with identical partitions. If the disk is still accessable use either the “format” or “prtvtoc”
commands to read and record the disk label. If not you will have to manually reset using the
format utility and a best guess (usually it will be the same as another SSA disk).
Example:
# prtvtoc /dev/rdsk/c1t3d0s2 > /var/tmp/c1t3d0s2.vtoc
or
# format
Specify disk (enter its number): 10
format> partition
partition> name
Enter table name (remember quotes): “SDS ssa disk format”
partition>
format> save
Saving new partition definition
Enter file name["./format.dat"]: /etc/format.dat
format> q
#
4. Shutdown the system and replace the disk. Reboot then restore the original disk label.
Example:
# cat /var/tmp/c1t3d0s2.vtoc | fmthard -s - /dev/rdsk/c1t3d0s2
or
# format
Specify disk (enter its number): 10
format> partition
partition> select
0. SUN1.05
1. SDS ssa disk format
2. original
Specify table (enter its number)[2}: 1
partition> label
Ready to label disk, continue? y
partition> q
format> q
#
Page 2 of 3
5. Restore any meta databases. This is best done with a delete and add.
Example:
# metadb -i
flags first blk block count
a m pc luo 16 1034 /dev/dsk/c1t1d0s3
W pc l 16 1034 /dev/dsk/c1t3d0s3
a pc luo 16 1034 /dev/dsk/c0t3d0s3
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/opt/SUNWmd/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
# metadb -d /dev/rdsk/c1t3d0s3
# metadb -a /dev/rdsk/c1t3d0s3
#
6. Restore any metadevices; if metadevices were mirrored or RAID5 then you can use the
“metareplace” command to restore data. If not you will have to “newfs” and restore from
backups.
Example:
# metastat d1
d1: Mirror
Submirror 0: d3
State: Okay
Submirror 1: d4
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 122976 blocks
d3: Submirror of d1
State: Okay
Hot spare pool: hsp001
Size: 122976 blocks
Page 3 of 3
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c1t1d0s4 0 No Okay
c1t1d1s4 0 No Okay
c1t1d2s4 0 No Okay
d4: Submirror of d1
State: Okay
Hot spare pool: hsp001
Size: 122976 blocks
Stripe 0: (interlace: 32 blocks)
Device Start Block Dbase State Hot Spare
c1t3d0s4 0 No Okay c1t5d0s4
c1t3d1s4 0 No Okay
c1t3d2s4 0 No Okay
# metareplace -e d1 c1t3d0s4
d1: device c1t3d0s4 is enabled
# metastat d10
d10: RAID
State: Okay
Hot spare pool: hsp003
Interlace: 32 blocks
Size: 81648 blocks
Original device:
Size: 81984 blocks
Device Start Block Dbase State Hot Spare
c1t1d0s5 330 No Okay
c1t3d0s5 330 No Okay c1t5d0s5
c1t5d1s5 330 No Okay
# metareplace -e d10 c1t3d0s5
d10: device c1t3d0s5 is enabled
#
NOTE: Disks can be replaced without shutting down the system if the configuration allows
the pulling of SSA trays, such as when metadevices are mirrored across SSAs. To do this
make sure all mirrors on SSA trays have been offlined or detached, then use the “ssaadm”
command to stop the tray. Example:
# ssaadm stop -t 1 c1
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/63866/showart_1130862.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP