免费注册 查看新帖 |

Chinaunix

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

带metadb的光纤盘,用dd的办法恢复系统,呵呵 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-10 19:20 |只看该作者 |倒序浏览
情况介绍:两台V490,一台(GW11)有两块盘,做了镜像,一台(GW01)有一块硬盘,有坏块,需更换\r\n两台机器硬件一致,应用软件一致,所以想着用dd的方法比较简单,结果发现还挺麻烦,5555555\r\n1、将新硬盘插入GW11进行dd:\r\ndd  if=/dev/rdsk/c1t0d0s2  of=/dev/rdsk/c1t1d0s2  bs=65535k\r\n\r\n2、将硬盘插回GW01\r\n\r\nSunOS Release 5.9 Version Generic_118558-06 64-bit\r\nCopyright 1983-2003 Sun Microsystems, Inc.  All rights reserved.\r\nUse is subject to license terms.\r\nCannot mount root on /pseudo/md@0:0,0,blk fstype ufs\r\npanic[cpu3]/thread=140a000: vfs_mountroot: cannot mount root\r\n\r\n0000000001409970 genunix:vfs_mountroot+70 (0, 0, 0, 200, 1458270, 0)\r\n  %l0-3: 000000000144bc00 000000000144bc00 0000000000002000 00000000014956e8\r\n  %l4-7: 000000000149b400 0000000001411e58 000000000144c400 000000000144f400\r\n0000000001409a20 genunix:main+90 (1409ba0, f006a410, 1409ec0, 39a65f, 2000, 500)\r\n  %l0-3: 0000000000000001 000000000140a000 0000000001412fc8 0000000000000000\r\n  %l4-7: 0000000078002000 000000000039c000 00000000014a3ac8 0000000001066fb8\r\n\r\nskipping system dump - no dump device configured\r\nrebooting...\r\n3、修改硬盘WWN号信息:\r\nok  boot  cdrom  -s\r\n#  mount  /dev/dsk/c1t0d0s0  /mnt\r\n#  cd  /mnt/dev/dsk          \r\n#  ls  -al  c1t0d0s0  \r\n#  devfsadm  -r  /mnt  -p  /mnt/etc/path_to_inst  \r\n#  cd  /devices  \r\n#  find  .  -print|cpio  -pduVm  /mnt/devices  \r\n启动系统,仍然是起不来,55555\r\nSunOS Release 5.9 Version Generic_118558-06 64-bit\r\nCopyright 1983-2003 Sun Microsystems, Inc.  All rights reserved.\r\nUse is subject to license terms.\r\nCannot mount root on /pseudo/md@0:0,0,blk fstype ufs\r\npanic[cpu3]/thread=140a000: vfs_mountroot: cannot mount root\r\n\r\n继续查文档:\r\n4、检查硬盘major/minor  number:\r\n#  ls  -lL  /dev/dsk/c1t0d0s3\r\nbrw-r-----      1  root          sys            118,  11  Aug    9  15:36  /dev/dsk/c1t0d0s3\r\n\r\n5、修改  metadb信息,主要是wwn号和minor  number要改:\r\n/etc/lvm/mddb.cf:\r\n#metadevice  database  location  file  do  not  hand  edit\r\n#driver  minor_t  daddr_t  device  id              checksum\r\nssd          11            16            id1,ssd@w21000014c3aed3b6/d          -2156\r\nssd          11            2064        id1,ssd@w21000014c3aed3b6/d          -4204\r\n试着启动系统,又启不来,接着郁闷,唉。。。。。。\r\n有个兄弟发来一篇文章,哈哈,有救了,就是修改/kernel/drv/md.conf:\r\n#  Begin  MDD  database  info  (do  not  edit)\r\nmddb_bootlist1=\"ssd:11:16:id1,ssd@w20000014c3aed3b6/d ssd:11:2064:id1,ssd@w20000014c3aed3b6/d\";\r\n#  End  MDD  database  info  (do  not  edit)\r\n\r\n6、修改system文件:\r\nset md:mirrored_root_flag=1\r\n\r\n7、启动系统,sys-unconfig\r\n系统能起来,检查metadb,正常\r\nmetastat检查状态,正常\r\ndf -k,数据能读,应用程序能正常启\r\n8、增加metadb,完成镜像同步\r\nroot@GDSZ-PS-GW011-WAP08 # prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2\r\nfmthard:  New volume table of contents now in place.\r\n\r\n        flags                first blk        block count\r\n     a m  p  luo            16                2048                /dev/dsk/c1t0d0s3\r\n     a    p  luo            2064                2048                /dev/dsk/c1t0d0s3\r\n     a    p  luo            16                2048                /dev/dsk/c1t1d0s3\r\n     a    p  luo            2064                2048                /dev/dsk/c1t1d0s3\r\n\r\n用metareplace命令替换\r\nd40: Mirror\r\n    Submirror 0: d41\r\n      State: Okay         \r\n    Submirror 1: d42\r\n      State: Okay         \r\n    Pass: 1\r\n    Read option: roundrobin (default)\r\n    Write option: parallel (default)\r\n    Size: 8405376 blocks (4.0 GB)\r\n\r\nd41: Submirror of d40\r\n    State: Okay         \r\n    Hot spare pool: hsp001\r\n    Size: 8405376 blocks (4.0 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t0d0s7          0     No            Okay   Yes \r\n\r\n\r\nd42: Submirror of d40\r\n    State: Okay         \r\n    Hot spare pool: hsp001\r\n    Size: 8405376 blocks (4.0 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t1d0s7          0     No            Okay   Yes \r\n\r\n\r\nd30: Mirror\r\n    Submirror 0: d31\r\n      State: Okay         \r\n    Submirror 1: d32\r\n      State: Resyncing    \r\n    Resync in progress: 15 % done\r\n    Pass: 1\r\n    Read option: roundrobin (default)\r\n    Write option: parallel (default)\r\n    Size: 20982912 blocks (10 GB)\r\n\r\nd31: Submirror of d30\r\n    State: Okay         \r\n    Hot spare pool: hsp001\r\n    Size: 20982912 blocks (10 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t0d0s6          0     No            Okay   Yes \r\n\r\n\r\nd32: Submirror of d30\r\n    State: Resyncing    \r\n    Hot spare pool: hsp001\r\n    Size: 20982912 blocks (10 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t1d0s6          0     No       Resyncing   Yes \r\n\r\n\r\nd20: Mirror\r\n    Submirror 0: d21\r\n      State: Okay         \r\n    Submirror 1: d22\r\n      State: Okay         \r\n    Pass: 1\r\n    Read option: roundrobin (default)\r\n    Write option: parallel (default)\r\n    Size: 16790400 blocks (8.0 GB)\r\n\r\nd21: Submirror of d20\r\n    State: Okay         \r\n    Hot spare pool: hsp001\r\n    Size: 16790400 blocks (8.0 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t0d0s5          0     No            Okay   Yes \r\n\r\n\r\nd22: Submirror of d20\r\n    State: Okay         \r\n    Hot spare pool: hsp001\r\n    Size: 16790400 blocks (8.0 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t1d0s5          0     No            Okay   Yes \r\n\r\n\r\nd10: Mirror\r\n    Submirror 0: d11\r\n      State: Okay         \r\n    Submirror 1: d12\r\n      State: Resyncing    \r\n    Resync in progress: 24 % done\r\n    Pass: 1\r\n    Read option: roundrobin (default)\r\n    Write option: parallel (default)\r\n    Size: 33560448 blocks (16 GB)\r\n\r\nd11: Submirror of d10\r\n    State: Okay         \r\n    Hot spare pool: hsp001\r\n    Size: 33560448 blocks (16 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t0d0s1          0     No            Okay   Yes \r\n\r\n\r\nd12: Submirror of d10\r\n    State: Resyncing    \r\n    Hot spare pool: hsp001\r\n    Size: 33560448 blocks (16 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t1d0s1          0     No       Resyncing   Yes \r\n\r\n\r\nd0: Mirror\r\n    Submirror 0: d1\r\n      State: Okay         \r\n    Submirror 1: d2\r\n      State: Okay         \r\n    Pass: 1\r\n    Read option: roundrobin (default)\r\n    Write option: parallel (default)\r\n    Size: 16790400 blocks (8.0 GB)\r\n\r\nd1: Submirror of d0\r\n    State: Okay         \r\n    Hot spare pool: hsp001\r\n    Size: 16790400 blocks (8.0 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t0d0s0          0     No            Okay   Yes \r\n\r\n\r\nd2: Submirror of d0\r\n    State: Okay         \r\n    Hot spare pool: hsp001\r\n    Size: 16790400 blocks (8.0 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t1d0s0          0     No            Okay   Yes \r\n\r\n\r\nd104: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 4193680 blocks (2.0 GB)\r\n        Extent              Start Block              Block count\r\n             0                 66528739                  4193680\r\n\r\nd47: Mirror\r\n    Submirror 0: d49\r\n      State: Resyncing    \r\n    Submirror 1: d48\r\n      State: Okay         \r\n    Resync in progress: 7 % done\r\n    Pass: 1\r\n    Read option: roundrobin (default)\r\n    Write option: parallel (default)\r\n    Size: 189639936 blocks (90 GB)\r\n\r\nd49: Submirror of d47\r\n    State: Resyncing    \r\n    Hot spare pool: hsp001\r\n    Size: 189639936 blocks (90 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t1d0s4          0     No       Resyncing   Yes \r\n\r\n\r\nd48: Submirror of d47\r\n    State: Okay         \r\n    Hot spare pool: hsp001\r\n    Size: 189639936 blocks (90 GB)\r\n    Stripe 0:\r\n        Device     Start Block  Dbase        State Reloc Hot Spare\r\n        c1t0d0s4          0     No            Okay   Yes \r\n\r\n\r\nd101: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 4193680 blocks (2.0 GB)\r\n        Extent              Start Block              Block count\r\n             0                 62335058                  4193680\r\n\r\nd94: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 4193680 blocks (2.0 GB)\r\n        Extent              Start Block              Block count\r\n             0                 58141377                  4193680\r\n\r\nd91: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 4193680 blocks (2.0 GB)\r\n        Extent              Start Block              Block count\r\n             0                 53947696                  4193680\r\n\r\nd84: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 4193680 blocks (2.0 GB)\r\n        Extent              Start Block              Block count\r\n             0                 49754015                  4193680\r\n\r\nd81: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 4193680 blocks (2.0 GB)\r\n        Extent              Start Block              Block count\r\n             0                 45560334                  4193680\r\n\r\nd74: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 4193680 blocks (2.0 GB)\r\n        Extent              Start Block              Block count\r\n             0                 41366653                  4193680\r\n\r\nd71: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 4193680 blocks (2.0 GB)\r\n        Extent              Start Block              Block count\r\n             0                 37172972                  4193680\r\n\r\nd64: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 4193680 blocks (2.0 GB)\r\n        Extent              Start Block              Block count\r\n             0                 32979291                  4193680\r\n\r\nd61: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 4193680 blocks (2.0 GB)\r\n        Extent              Start Block              Block count\r\n             0                 28785610                  4193680\r\n\r\nd50: Soft Partition\r\n    Device: d47\r\n    State: Okay\r\n    Size: 28785608 blocks (13 GB)\r\n        Extent              Start Block              Block count\r\n             0                        1                 28785608\r\n\r\nhsp001: is empty\r\n\r\nDevice Relocation Information:\r\nDevice   Reloc        Device ID\r\nc1t1d0   Yes          id1,ssd@w500000e011dfc9c0\r\nc1t0d0   Yes          id1,ssd@w20000014c3aed3b6\n\n[ 本帖最后由 jf408 于 2006-8-10 20:51 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-08-10 19:24 |只看该作者
自己第一次写的SUN工作步骤,呵呵

论坛徽章:
0
3 [报告]
发表于 2006-08-10 20:46 |只看该作者
good  谢谢分享

论坛徽章:
0
4 [报告]
发表于 2006-08-10 20:57 |只看该作者
原帖由 ammy 于 2006-8-10 20:46 发表\r\ngood  谢谢分享
\r\n\r\n\r\n做了几年网络,这一年多来改行做SUN了,有点灰心,本来还打算考PE3,准备明年还是再转回去做我的CISCO,55555555555

论坛徽章:
0
5 [报告]
发表于 2006-08-11 10:36 |只看该作者
考 pe3 ? 资料全吗? \r\n交流一下?\r\n\r\nqq:343129705

论坛徽章:
0
6 [报告]
发表于 2006-08-11 10:37 |只看该作者
写的非常非常不错,把自己的问题和解决方法都列举了出来,以后遇到这样的情况可以按照兄台的方法解决

论坛徽章:
0
7 [报告]
发表于 2006-08-11 18:05 |只看该作者
原帖由 rmb 于 2006-8-11 10:36 发表\r\n考 pe3 ? 资料全吗? \r\n交流一下?\r\n\r\nqq:343129705
\r\n\r\n没什么资料哦,不过最近好像有同事过了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP