在HPUX 11iV3系统中更换已镜像的非根磁盘(原创)

合集下载

AIX磁盘更换

AIX磁盘更换

情景 1如果要替换的磁盘已做了镜像,推荐如下步骤:1. 删除该磁盘上所有逻辑卷的复件,使用 rmlvcopy 命令或 unmirrorvg 命令。

2. 从卷组中删除该磁盘,使用 reducevg 命令。

3. 使用 rmdev 命令删除该磁盘定义。

4. 物理移除该磁盘。

如果磁盘不是可热交换的(hot-swappable),可能要求重启系统。

5. 使备用的磁盘可用。

如果磁盘是可热交换的(hot-swappble),可运行 cfgmgr;否则,需要重启系统。

6. 把新加的磁盘放入卷组,使用 extendvg 命令。

7. 重建并同步所有逻辑卷的复件,使用 mklvcopy 命令或 mirrorvg 命令。

rootvg 由hdisk0和hdisk1做成mirror,hdisk0报故障#unmirrorvg rootvg hdisk0#reducevg rootvg hdisk0#rmdev -l hdisk0 -d换故障硬盘#cfgmgr -v确认新换硬盘物理卷名为hdiskx#lspv#chdev -l hdiskx -a pv=yes#extendvg rootvg hdiskx#mirrorvg rootvg#bosboot -ad /dev/hdiskx#bootlist -m normal hdisk1 hdiskx重启,系统从hdisk1启动datavg由hdisk5和hdisk6做成mirror,hdisk6报故障#unmirrorvg datavg hdisk6#reducevg datavg hdisk6#rmdev -l hdisk6 -d换故障硬盘#cfgmgr -v确认新换硬盘物理卷名为hdiskx#lspv#chdev -l hdiskx -a pv=yes#extendvg datavg hdiskx#mirrorvg datavg情景 2如果要替换的磁盘没有镜像,但仍在起作用,推荐按以下步骤:1. 使备用磁盘可用。

HP Integrity server HPUX 11.31 Mirroring boot disks

HP Integrity server HPUX 11.31 Mirroring boot disks

HP Integrity server HPUX 11.31 Mirroring boot disks贵阳曾凡宏HP Integrity server HPUX 11.31 Mirroring boot disks (1)扯蛋 (1)Itanium mirroring 步骤 (3)Itanium mirroring 全过程 (4)拆除分区的方法 (15)扯蛋开始正题之前先抱怨一下,HP原厂也真不是东西,提供的文档不详细也就罢了,他们竟然提供的文档还是错误的,我无论如何都没有想到用MKBOOT写AUTO语句的时候用到的竟然会是块设备(当然,我不清楚是只写块设备,还是块设备字符设备都要写,不过百分之五十一是只写块设备),虽然在一老外的贴子中提到这里用的是块设备,但我还是选择了相信原厂的文档,坚持了无数次。

原厂就是故意搞错的,信不信由你,反正我信了。

这是种什么行为,这是一种打压第三方的恶劣行径。

害我这两天死皮赖脸的在联通机房折腾了这台新鲜的RX8640十二个小时,管理员一下班就来催我走,还好今天没走,和他拿了钥匙,坚持到了最后,在我快要绝望的时候,我想到了这一点,终于成功了。

安腾11.31的系统改变挺多的,十秒中断那里也算是一个,这里不再是以前的SEA,然后BO ******,而是一个与SETBOOT相关联的可选择式菜单,如图:这里面有个以前没见过的东西,EFI SHELL [BUILT-IN],相关文章可以在网上找到。

正常情况下,十秒中断后选择启动项后是这样的:而我呢,无数次看到的是这样的:镜像LV的顺序一定要搞对,要不然会出问题的,我一开始图省事一个FOR循环做所有的LV,因为还有一个LV是不规则的命名,所以我用LV*指定了所有的LV。

结果就是:看到没有,镜像盘上的LV的顺序。

这样就会导致:安腾11.31系统最直观的区别应该就是他的设备文件吧。

用-m参数的IOSCAN命令看看:关于磁盘的分区,后面会提到创建分区以及拆除分区的方法。

hpux 更换根盘镜像

hpux 更换根盘镜像

HP-UX 更换根盘镜像专题方法一1,拆除设备镜像,踢出坏盘.解除镜像:vgdisplay vg00 //查看vg00中的LV的镜像状态。

lvreduce –m 0 /dev/vg00/lvol1 /dev/dsk/cXtYd0lvreduce –m 0 /dev/vg00/lvol2 /dev/dsk/cXtYd0...拆除所有vg00中所有mirror的lvvgreduce vg00 /dev/dsk/cXtYd02.换盘,做镜像在镜像盘上创建物理卷,并设置成可引导设备。

# pvcreate -f -B /dev/rdsk/cXtYd0 //-B可以启动。

将此盘添加到根卷。

# vgextend /dev/vg00 /dev/dsk/cXtYd0生成LIF引导信息和AUTO文件。

# mkboot /dev/rdsk/cXtYd0 //创建BOOT区# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/cXtYd0# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/cXtYd0给根盘上的所有逻辑卷做镜像,务必从第一个LV开始,按顺序执行,镜像需要一定时间,请耐心等待。

# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cXtYd0 /BOOT卷# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/cXtYd0# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/cXtYd0# lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/cXtYd0# lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/cXtYd0# lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/cXtYd0# lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/cXtYd0...镜像所有的vg00中的lv更新引导、根和主交换的镜像副本包含在BDRA中的引导信息。

HPUX 11.31系统镜像

HPUX 11.31系统镜像

【HPUX 11.31专题】HPUX 11.31系统镜像HPUX 11.23及以后版本与11.22版本配置根盘镜像的最大的不同:1. 新增加了HPSP分区11.22系统根盘只划分了两个分区EFI / HP-UX,在11.23系统中,划分了3个分区,分别为EFI / HP-UX / HPSP相应在使用idisk命令划分硬盘分区时使的/tmp/partitionfile 文件中的内容也做了相应调整。

2. EFI分区大小从原先的100M,增加到500M。

镜像步骤1、查看基本信息#ioscan -m dsfPersistent DSF Legacy DSF(s)========================================/dev/pt/pt2 /dev/rscsi/c5t7d0/dev/rtape/tape1_BEST /dev/rmt/c7t3d0BEST/dev/rtape/tape1_BESTn /dev/rmt/c7t3d0BESTn/dev/rtape/tape1_BESTb /dev/rmt/c7t3d0BESTb/dev/rtape/tape1_BESTnb /dev/rmt/c7t3d0BESTnb/dev/pt/pt3 /dev/rscsi/c6t15d0/dev/rdisk/disk11 /dev/rdsk/c0t6d0/dev/rdisk/disk11_p1 /dev/rdsk/c0t6d0s1/dev/rdisk/disk11_p2 /dev/rdsk/c0t6d0s2/dev/rdisk/disk11_p3 /dev/rdsk/c0t6d0s3/dev/rdisk/disk12 /dev/rdsk/c1t2d0/dev/rdisk/disk13 /dev/rdsk/c2t6d0/dev/rdisk/disk14 /dev/rdsk/c5t1d0/dev/rdisk/disk15 /dev/rdsk/c5t0d0/dev/rdisk/disk16 /dev/rdsk/c5t3d0/dev/rdisk/disk17 /dev/rdsk/c5t2d0/dev/rdisk/disk18 /dev/rdsk/c6t1d0/dev/rdisk/disk19 /dev/rdsk/c6t0d0/dev/rdisk/disk20 /dev/rdsk/c6t2d0/dev/rdisk/disk21 /dev/rdsk/c6t3d0这个命令是11.31操作系统里面所独有的,普通操作的时候看不出有什么好处,在有多路径的时候优势就显示出来了,比如说添加了EMC的存储,设备名/dev/rdsk/c5t0d0跟/dev/rdsk/c8t0d0对应的是同一块磁盘,在11.23下面如果要加入到vg里面必须把两个设备名都加进去,而在11.31下面因为有了多路径映射,会显示为/dev/rdisk/diskxx的形式,对应这两个设备,这样就比较一目了然了。

更换mirror硬盘步骤

更换mirror硬盘步骤

Rootvg更换mirror硬盘描述:两块盘hdisk0 和hdisk1 属rootvg 且做了mirror,有一块硬盘损坏,需要在线更换硬盘。

步骤:1、备份rootvg2、解镜像mirror3、删除坏掉的硬盘4、添加新的硬盘到rootvg5、做镜像mirror6、做同步1、和客户沟通对rootvg进行mksysb备份。

防止意外。

2、执行smitty vg在volume里选择需要除去镜像的卷组,physical vlume name里选择需要去掉的硬盘hdisk1执行reducevg rootvg hdisk1,将hdisk1从卷组rootvg里删除。

执行boslist –a查看列出结果若报错,执行boslist -ad /dev/hd5 hdisk0执行chpv –c hdisk1 清除hdisk1上的引导记录执行boslist –m normal hdisk0执行完了之后查看rootvg状态lsvg –l rootvg看一下lv state ,有无stale状态的文件系统出现。

其中lg_dumplv变为stale的话可以忽略掉。

3、删除坏的硬盘,执行diag——回车——task··选择hot plug task然后hdisk1硬盘灯会长亮。

更换硬盘4、添加新的硬盘到rootvg执行cfgmgr –v,扫描到新加入的硬盘lspv查看执行extendvg rootvg hdisk1将hdisk1加入到rootvg中。

在执行mirror vg之前要查看rootvg的quroum是否更改,一般建议执行chvg –Qn rootvg,将其设为disabled状态执行smit vg需要更改的选项如下图所示。

完毕之后,执行boslist –m normal hdisk0 hdisk1将引导区加入到hdisk0和hdisk1上。

6、做同步执行syncvg -v rootvg命令可以做rootvg的同步。

更换HP盘阵上含镜像的PVG里的坏盘

更换HP盘阵上含镜像的PVG里的坏盘

lifls /dev//rdsk/c0t6d0 lifcp /dev/rdsk/c0t6d0:AUTO - 查看autofile内容
lifls /dev/rdsk/c0t6d0 查看lif内容
lifls /dev/rdsk/c0t6d0 查看lif内容
mkboot -a "hpux" /dev/rdsk/c0t6d0 (如果不用默认的hpux,这里可以'hpux'换成'hpux -lq')
8. 镜像LV
用lvlnboot查看各个lv的特殊功能
2. 拆镜像
#lvreduce -m 0(数字0) /dev/vgname/lvname /dev/dsk/cxtxdx //删除/dev/dsk/cxtxdx上的镜像副本,使镜像个数为0,即只留原副本
wg2q_2:[/]#vgdisplay -v |grep 'LV Name' 查询需要拆除的lvname
在故障机A(已修复)上导出vg的map文件:#vgexport –s –v –p –m /tmp/vgname.map vgname
将上步导出的map文件copy到未修复的B机,放入临时目录/tmp/map/vgname.map
在B机上导出vg信息,破坏掉vg信息:#vgexport vgname
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
/dev/dsk/c2t0d0 /dev/rdsk/c2t0d0
#rmsf -H 0/1/1/0.0.0 fail_disk_path
LV Name /dev/vg00/lvol1

HP-UX(MirrorDisk配置和恢复)

HP-UX(MirrorDisk配置和恢复)

MirrorDisk配置和恢复(DNT内部技术文档)目录一、配置Mirror Disk 31、执行lvlnboot -v命令检查系统中的启动设备 32、创建第二块系统盘 33、为第二块磁盘创建boot引导信息 44、为第二块磁盘创建auto引导信息 45、扩展vg00,添加第二块硬盘 46、扩展vg00中各逻辑卷,添加镜像磁盘 47、执行如下操作后重新启动系统 58、在启动Main Menu出现时,从第二块磁盘启动 59、系统启动以后执行如下操作 6二、镜像盘损坏(主启动盘)的恢复 61.系统环境 62.模拟主镜像盘损坏(主启动盘) 73.镜像盘启动后,替换新磁盘 73.故障解决方法 8一、在线修复丢失的镜像盘 81.将lvm header恢复到disk 82. 重新激活vg 83.同步stale的extent 84.将boot 程序从好的disk ,复制到新加的disk 8 5.更新启动信息 9二、进入管理模式修复Mirror Disk 91. 从镜像盘启动 92. 进入管理模式 103.初始化磁盘 104. 恢复卷组信息到新更换的盘. 105. 激活卷组,开始镜像同步 106. 挂起/usr ,使得mkboot命令可用 107. 加载启动工具 118. 加载自启动文件. 119. 更新 LIF's Label file 1110. 重新启动 11二、如果vgcfgrestore新磁盘失败 111.从镜像盘启动 112. 进入管理模式 113. 重新导入导出vg00,vgchange -a y vg00 114. 激活卷组 125.Lvlnboot –R 126. mount /usr 127. 重新配置mirror disk (参考mirror disk配置) 12三、备注 12一、配置Mirror Disk1、执行lvlnboot -v命令检查系统中的启动设备#lvlnboot -vBoot Definitions for Volume Group /dev/vg00:Physical Volumes belonging in Root Volume Group:/dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot DiskBoot: lvol1 on: /dev/dsk/c1t2d0Root: lvol3 on: /dev/dsk/c1t2d0Swap: lvol2 on: /dev/dsk/c1t2d0Dump: lvol2 on: /dev/dsk/c1t2d0, 02、创建第二块系统盘#pvcreate -f -B /dev/rdsk/c2t0d03、为第二块磁盘创建boot引导信息#mkboot /dev/dsk/c2t0d04、为第二块磁盘创建auto引导信息#mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/dsk/c2t0d05、扩展vg00,添加第二块硬盘#vgextend /dev/vg00 /dev/dsk/c2t0d06、扩展vg00中各逻辑卷,添加镜像磁盘lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t0d0lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t0d0lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t0d0lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t0d0lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t0d0lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t0d0lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t0d0lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t0d0lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c2t0d0lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c2t0d0 或者采用循环结构for i in /dev/vg00/lvol*dolvextend –m 1 $i /dev/dsk/c2t0d0done7、执行如下操作后重新启动系统lvdisplay /dev/vg00/lvol1lvlnboot -r /dev/vg00/lvol3 /dev/vg00lvlnboot -b /dev/vg00/lvol1 /dev/vg00lvlnboot -s /dev/vg00/lvol2 /dev/vg00lvlnboot -d /dev/vg00/lvol2 /dev/vg00lvlnboot -Rv#shutdown –ry 08、在启动Main Menu出现时,从第二块磁盘启动Main Menu:>seaP0 0/0/2/0.6 intscsia.6 Random access mediasP1 0/0/2/1.6 intscsia.6 Random access medias P0 0/4/0/0.0 Random access mediasP3 0/10/0/0.1 Random access mediasP4 1/10/0/0.5 Sequene access mediasMain Menu:>bo p19、系统启动以后执行如下操作#lvlnboot -v#lvdisplay -v /dev/vg00/lvol1二、镜像盘损坏(主启动盘)的恢复1.系统环境[l2000:root]/#lvlnboot -RvBoot Definitions for Volume Group /dev/vg00:Physical Volumes belonging in Root Volume Group:/dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot Disk/dev/dsk/c1t0d0 (0/0/1/1.0.0) -- Boot DiskBoot: lvol1 on: /dev/dsk/c1t2d0/dev/dsk/c1t0d0Root: lvol3 on: /dev/dsk/c1t2d0/dev/dsk/c1t0d0Swap: lvol2 on: /dev/dsk/c1t2d0/dev/dsk/c1t0d0Dump: lvol2 on: /dev/dsk/c1t2d0, 02.模拟主镜像盘损坏(主启动盘)关机后卸载主启动盘/dev/dsk/c1t2d0,从镜像启动盘/dev/dsk/c1t0d0启动3.镜像盘启动后,替换新磁盘# vgcfgrestore -n /dev/vg00 /dev/rdsk/c1t2d0。

HP UX 11.31 更换系统盘

HP UX 11.31  更换系统盘

关于HP UX 11.31系统更换系统盘的体会贵阳曾凡宏HP UX 11.31系统变化最为明显的是其磁盘设备名的变化。

新的磁盘设备名为永久设备名,其设备名与LUN的WorldWide Identifier (WWID)绑定。

更换交换机,HBA卡等都不会使设备文件名发生改变。

HP UX 11.31 系统更换系统盘的程序不再和11.11、11.23一样。

在拔除故障盘后以及插入新盘前,需要输入一条命令”rmsf –a /dev/disk/disk**”删除与之相关的所有的设备文件,插入硬盘后重新扫描一下就OK了。

在出意外的情况下,你会无法删除原先的设备文件,这时你把新的硬盘插入,虽然能看得到新硬盘的描述,但是硬盘的状态会显示”NO_HW”,这是因为占用了这条LUNPA TH的设备文件名绑定的是被拔除的硬盘的WWID,所以无法识别到新的硬盘,所以呢,我们要做的就是更改一下绑定的WWID,用这个命令“scsimgr replace_wwid –D /dev/rdisk/disk** ds f”好使。

将这个新的WWID绑定到原先的设备文件名上,然后才能正常识别到更换上去的硬盘,但是这样的话,换上去的盘就不能使用原先的设备名。

当然,有解决的办法,后面有提到的。

贵州联通的一块RP7420上的系统盘故障后,我前后去了三次,都没有更换成功,一开始以为是硬盘的原因,结果经过一晚的试验,发现硬盘都是正常的。

今天在刘工的帮助下,终于发现这是WWID的原因。

感谢刘工。

感谢GOOGLE。

归根结底,还是自己学艺不精,没能与时俱进。

这两天因为自己技术的落后,让张和琳增添了不少麻烦,在此向张和琳表示感谢。

下面是更换硬盘的日志:有两种情况,一种是正常的,一种是非正常的。

正常的:1、先拔除故障盘# ioscan -fnCdiskClass I H/W Path Driver S/W State H/W Type Description====================================================================== =disk 1 0/0/0/2/0.6.0 sdisk NO_HW DEVICE HP 146 GST3146854LC/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0disk 2 0/0/0/2/1.0.0 sdisk CLAIMED DEVICE HP DVD-ROM 305/dev/dsk/c1t0d0 /dev/rdsk/c1t0d0disk 0 0/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC/dev/dsk/c2t6d0 /dev/rdsk/c2t6d0# ioscan -m dsfPersistent DSF Legacy DSF(s)========================================/dev/rdisk/disk3 /dev/rdsk/c2t6d0/dev/rdisk/disk4 /dev/rdsk/c0t6d0/dev/rdisk/disk5 /dev/rdsk/c1t0d0# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HP DVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk5disk 4 64000/0xfa00/0x5 esdisk NO_HW DEVICE online HP 146 GST3146854LC0/0/0/2/0.0x6.0x0/dev/disk/disk4 /dev/rdisk/disk42、删除故障盘相关的设备文件# rmsf -a /dev/disk/disk4# ioscan -fuCdiskClass I H/W Path Driver S/W State H/W Type Description====================================================================== =disk 2 0/0/0/2/1.0.0 sdisk CLAIMED DEVICE HP DVD-ROM 305disk 0 0/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC# ioscan -m dsfPersistent DSF Legacy DSF(s)========================================/dev/rdisk/disk3 /dev/rdsk/c2t6d0/dev/rdisk/disk5 /dev/rdsk/c1t0d0# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HP DVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk53、扫描磁盘,自动生成设备文件# ioscan -fnCdiskClass I H/W Path Driver S/W State H/W Type Description====================================================================== =disk 1 0/0/0/2/0.6.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0disk 2 0/0/0/2/1.0.0 sdisk CLAIMED DEVICE HP DVD-ROM 305/dev/dsk/c1t0d0 /dev/rdsk/c1t0d0disk 0 0/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC/dev/dsk/c2t6d0 /dev/rdsk/c2t6d0# ioscan -m dsfPersistent DSF Legacy DSF(s)========================================/dev/rdisk/disk3 /dev/rdsk/c2t6d0/dev/rdisk/disk4 /dev/rdsk/c0t6d0/dev/rdisk/disk5 /dev/rdsk/c1t0d0# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 4 64000/0xfa00/0x1 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/2/0.0x6.0x0/dev/disk/disk4 /dev/rdisk/disk4disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HP DVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk54、DD测试# dd if=/dev/rdisk/disk4 of=/dev/null7421+0 records in7421+0 records out# pvcreate /dev/rdisk/disk4Physical volume "/dev/rdisk/disk4" has been successfully created.更换成功不正常的情况:1、拔除故障盘# ioscan -fnCdiskClass I H/W Path Driver S/W State H/W Type Description====================================================================== =disk 1 0/0/0/2/0.6.0 sdisk NO_HW DEVICE HP 73.4GMAX3073NC/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0disk 2 0/0/0/2/1.0.0 sdisk CLAIMED DEVICE HP DVD-ROM 305/dev/dsk/c1t0d0 /dev/rdsk/c1t0d0disk 0 0/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC/dev/dsk/c2t6d0 /dev/rdsk/c2t6d0You have mail in /var/mail/root# ioscan -m dsfPersistent DSF Legacy DSF(s)========================================/dev/rdisk/disk3 /dev/rdsk/c2t6d0/dev/rdisk/disk4 /dev/rdsk/c0t6d0/dev/rdisk/disk5 /dev/rdsk/c1t0d0# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 4 64000/0xfa00/0x1 esdisk NO_HW DEVICE online HP 73.4GMAX3073NC0/0/0/2/0.0x6.0x0/dev/disk/disk4 /dev/rdisk/disk4disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HP DVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk52、删除相关设备文件# rmsf -a /dev/rdisk/disk4# ioscan -fnCdiskClass I H/W Path Driver S/W State H/W Type Description====================================================================== =disk 2 0/0/0/2/1.0.0 sdisk CLAIMED DEVICE HP DVD-ROM 305/dev/dsk/c1t0d0 /dev/rdsk/c1t0d0disk 0 0/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC/dev/dsk/c2t6d0 /dev/rdsk/c2t6d0# ioscan -m dsfPersistent DSF Legacy DSF(s)========================================/dev/rdisk/disk3 /dev/rdsk/c2t6d0/dev/rdisk/disk5 /dev/rdsk/c1t0d0# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HP DVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk53、扫描磁盘,自动生成设备文件# ioscan -fnCdiskClass I H/W Path Driver S/W State H/W Type Description====================================================================== =disk 1 0/0/0/2/0.6.0 sdisk CLAIMED DEVICE SEAGA TE ST3146807LC/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0disk 2 0/0/0/2/1.0.0 sdisk CLAIMED DEVICE HP DVD-ROM 305/dev/dsk/c1t0d0 /dev/rdsk/c1t0d0disk 0 0/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC/dev/dsk/c2t6d0 /dev/rdsk/c2t6d04、DD测试一下,没输出,硬盘灯亮了一会就熄了# dd if=/dev/rdisk/disk4 of=/dev/null# dd if=/dev/rdisk/disk4 of=/dev/null# dd if=/dev/rdisk/disk4 of=/dev/null5、再扫描一下,是不是我扫描的不够彻底?!# ioscanH/W Path Class Description=======================================================root0 cell0/0 ioa System Bus Adapter (804)0/0/0 ba Local PCI Bus Adapter (782)0/0/0/0/0 tty PCI BaseSystem (103c128d)0/0/0/0/1 tty PCI Serial (103c1048)0/0/0/1/0 lan HP A6096-69001 PCI 1000Base-T Built-in I/O0/0/0/2/0 ext_bus SCSI C87x Ultra Wide Single-Ended0/0/0/2/0.6 target0/0/0/2/0.6.0 disk SEAGATE ST3146807LC0/0/0/2/1 ext_bus SCSI C87x Ultra Wide Single-Ended0/0/0/2/1.0 target0/0/0/2/1.0.0 disk HP DVD-ROM 3050/0/0/3/0 ext_bus SCSI C896 Ultra Wide Single-Ended0/0/0/3/0.6 target0/0/0/3/0.6.0 disk HP 73.4GMAX3073NC0/0/0/3/1 ext_bus SCSI C896 Ultra2 Wide LVD0/0/1 ba Local PCI Bus Adapter (782)0/0/1/0 slot PCI Slot0/0/2 ba Local PCI Bus Adapter (782)0/0/2/0 slot PCI Slot0/0/4 ba Local PCI Bus Adapter (782)0/0/4/0 slot PCI Slot0/0/6 ba Local PCI Bus Adapter (782)0/0/6/0 slot PCI Slot0/0/8 ba Local PCI Bus Adapter (782)0/0/8/0 slot PCI Slot0/0/8/0/0 fc HP Tachyon XL2 Fibre Channel Mass Storage Adapter0/0/10 ba Local PCI Bus Adapter (782)0/0/10/0 slot PCI Slot0/0/10/0/0 lan HP A6825-60101 PCI 1000Base-T Adapter0/0/12 ba Local PCI Bus Adapter (782)0/0/12/0 slot PCI Slot0/0/14 ba Local PCI Bus Adapter (782)0/0/14/0 slot PCI Slot0/5 memory Memory0/10 processor Processor0/11 processor Processor6、再测试,还是没有输出、灯不亮了# dd if=/dev/rdisk/disk4 of=/dev/null7、再扫描# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 4 64000/0xfa00/0x1 esdisk CLAIMED DEVICE online SEAGA TE ST3146807LC0/0/0/2/0.0x6.0x0/dev/disk/disk4 /dev/rdisk/disk4disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HP DVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk58、再测试,还是没有输出# dd if=/dev/rdisk/disk4 of=/dev/null9、再扫# ioscan -m dsfPersistent DSF Legacy DSF(s)========================================/dev/rdisk/disk3 /dev/rdsk/c2t6d0/dev/rdisk/disk4 /dev/rdsk/c0t6d0/dev/rdisk/disk5 /dev/rdsk/c1t0d010、再测# dd if=/dev/rdisk/disk4 of=/dev/null11、PVCREA TE一下看看,噢,报错了# pvcreate /dev/rdisk/disk4pvcreate: IO error on Physical V olume device "/dev/rdisk/disk4".12、重新绑定一下WWID看看# scsimgr replace_wwid -D /dev/rdisk/disk4 dsfscsimgr:WARNING: Performing replace_wwid on the resource may have some impact on system operation.Do you really want to replace? (y/[n])? yscsimgr: Successfully validated binding of LUN paths with new LUN.Old and new paths must not be the samescsimgr: ERROR: Failed to re-assign replaced LUN device special file to replacing LUN13、扫一下# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 4 64000/0xfa00/0x1 esdisk CLAIMED DEVICE online SEAGA TE ST3146807LC0/0/0/2/0.0x6.0x0/dev/disk/disk4 /dev/rdisk/disk4disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HPDVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk514、测试,看来这盘光荣了,不好意思,这两天搞坏了两块盘# dd if=/dev/rdisk/disk4 of=/dev/null/dev/rdisk/disk4: Device busydd: cannot open /dev/rdisk/disk415、试试,死马当活马医了# rmsf -a /dev/disk/disk4Device /dev/disk/disk4 is busy. Cannot remove.16、扫一下先# ioscanH/W Path Class Description=======================================================root0 cell0/0 ioa System Bus Adapter (804)0/0/0 ba Local PCI Bus Adapter (782)0/0/0/0/0 tty PCI BaseSystem (103c128d)0/0/0/0/1 tty PCI Serial (103c1048)0/0/0/1/0 lan HP A6096-69001 PCI 1000Base-T Built-in I/O0/0/0/2/0 ext_bus SCSI C87x Ultra Wide Single-Ended0/0/0/2/0.6 target0/0/0/2/0.6.0 disk SEAGATE ST3146807LC0/0/0/2/1 ext_bus SCSI C87x Ultra Wide Single-Ended0/0/0/2/1.0 target0/0/0/2/1.0.0 disk HP DVD-ROM 3050/0/0/3/0 ext_bus SCSI C896 Ultra Wide Single-Ended0/0/0/3/0.6 target0/0/0/3/0.6.0 disk HP 73.4GMAX3073NC0/0/0/3/1 ext_bus SCSI C896 Ultra2 Wide LVD0/0/1 ba Local PCI Bus Adapter (782)0/0/1/0 slot PCI Slot0/0/2 ba Local PCI Bus Adapter (782)0/0/2/0 slot PCI Slot0/0/4 ba Local PCI Bus Adapter (782)0/0/4/0 slot PCI Slot0/0/6 ba Local PCI Bus Adapter (782)0/0/6/0 slot PCI Slot0/0/8 ba Local PCI Bus Adapter (782)0/0/8/0 slot PCI Slot0/0/8/0/0 fc HP Tachyon XL2 Fibre Channel Mass Storage Adapter0/0/10 ba Local PCI Bus Adapter (782)0/0/10/0 slot PCI Slot0/0/10/0/0 lan HP A6825-60101 PCI 1000Base-T Adapter0/0/12 ba Local PCI Bus Adapter (782)0/0/12/0 slot PCI Slot0/0/14 ba Local PCI Bus Adapter (782)0/0/14/0 slot PCI Slot0/5 memory Memory0/10 processor Processor0/11 processor Processor17、看来真的挂了# dd if=/dev/disk/disk4 of=/dev/null/dev/disk/disk4: Device busydd: cannot open /dev/disk/disk418、拔掉# ioscan -fnCdiskClass I H/W Path Driver S/W State H/W Type Description====================================================================== =disk 1 0/0/0/2/0.6.0 sdisk NO_HW DEVICE SEAGA TE ST3146807LC/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0disk 2 0/0/0/2/1.0.0 sdisk CLAIMED DEVICE HP DVD-ROM 305/dev/dsk/c1t0d0 /dev/rdsk/c1t0d0disk 0 0/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC/dev/dsk/c2t6d0 /dev/rdsk/c2t6d0# ioscan -m dsfPersistent DSF Legacy DSF(s)========================================/dev/rdisk/disk3 /dev/rdsk/c2t6d0/dev/rdisk/disk4 /dev/rdsk/c0t6d0/dev/rdisk/disk5 /dev/rdsk/c1t0d0# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 4 64000/0xfa00/0x1 esdisk NO_HW DEVICE online SEAGA TE ST3146807LC0/0/0/2/0.0x6.0x0/dev/disk/disk4 /dev/rdisk/disk4disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HP DVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk519、删除相关设备文件、噢,麦糕的!删不掉了# rmsf -a /dev/disk/disk4Device /dev/disk/disk4 is busy. Cannot remove.20、把盘插回去再扫一下试试??额,这里的状态正常不能代表什么啊……# ioscanH/W Path Class Description=======================================================root0 cell0/0 ioa System Bus Adapter (804)0/0/0 ba Local PCI Bus Adapter (782)0/0/0/0/0 tty PCI BaseSystem (103c128d)0/0/0/0/1 tty PCI Serial (103c1048)0/0/0/1/0 lan HP A6096-69001 PCI 1000Base-T Built-in I/O0/0/0/2/0 ext_bus SCSI C87x Ultra Wide Single-Ended0/0/0/2/0.6 target0/0/0/2/0.6.0 disk SEAGATE ST3146807LC0/0/0/2/1 ext_bus SCSI C87x Ultra Wide Single-Ended0/0/0/2/1.0 target0/0/0/2/1.0.0 disk HP DVD-ROM 3050/0/0/3/0 ext_bus SCSI C896 Ultra Wide Single-Ended0/0/0/3/0.6 target0/0/0/3/0.6.0 disk HP 73.4GMAX3073NC0/0/0/3/1 ext_bus SCSI C896 Ultra2 Wide LVD0/0/1 ba Local PCI Bus Adapter (782)0/0/1/0 slot PCI Slot0/0/2 ba Local PCI Bus Adapter (782)0/0/2/0 slot PCI Slot0/0/4 ba Local PCI Bus Adapter (782)0/0/4/0 slot PCI Slot0/0/6 ba Local PCI Bus Adapter (782)0/0/6/0 slot PCI Slot0/0/8 ba Local PCI Bus Adapter (782)0/0/8/0 slot PCI Slot0/0/8/0/0 fc HP Tachyon XL2 Fibre Channel Mass Storage Adapter0/0/10 ba Local PCI Bus Adapter (782)0/0/10/0 slot PCI Slot0/0/10/0/0 lan HP A6825-60101 PCI 1000Base-T Adapter0/0/12 ba Local PCI Bus Adapter (782)0/0/12/0 slot PCI Slot0/0/14 ba Local PCI Bus Adapter (782)0/0/14/0 slot PCI Slot0/5 memory Memory0/10 processor Processor0/11 processor Processor# ioscan -fnCdiskClass I H/W Path Driver S/W State H/W Type Description====================================================================== =disk 1 0/0/0/2/0.6.0 sdisk CLAIMED DEVICE SEAGA TE ST3146807LC/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0disk 2 0/0/0/2/1.0.0 sdisk CLAIMED DEVICE HP DVD-ROM 305/dev/dsk/c1t0d0 /dev/rdsk/c1t0d0disk 0 0/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC/dev/dsk/c2t6d0 /dev/rdsk/c2t6d0# ioscan -m dsfPersistent DSF Legacy DSF(s)========================================/dev/rdisk/disk3 /dev/rdsk/c2t6d0/dev/rdisk/disk4 /dev/rdsk/c0t6d0/dev/rdisk/disk5 /dev/rdsk/c1t0d0# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 4 64000/0xfa00/0x1 esdisk CLAIMED DEVICE online SEAGA TE ST3146807LC0/0/0/2/0.0x6.0x0/dev/disk/disk4 /dev/rdisk/disk4disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HP DVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk521、DD一下还是不行呢# dd if=/dev/rdisk/disk4 of=/dev/null/dev/rdisk/disk4: Device busydd: cannot open /dev/rdisk/disk422、还是删不掉呢# rmsf -a /dev/disk/disk4Device /dev/disk/disk4 is busy. Cannot remove.23、没救了,换一块试试吧,先拔掉# ioscanH/W Path Class Description=======================================================root0 cell0/0 ioa System Bus Adapter (804)0/0/0 ba Local PCI Bus Adapter (782)0/0/0/0/0 tty PCI BaseSystem (103c128d)0/0/0/0/1 tty PCI Serial (103c1048)0/0/0/1/0 lan HP A6096-69001 PCI 1000Base-T Built-in I/O0/0/0/2/0 ext_bus SCSI C87x Ultra Wide Single-Ended0/0/0/2/0.6 target0/0/0/2/0.6.0 disk SEAGATE ST3146807LC0/0/0/2/1 ext_bus SCSI C87x Ultra Wide Single-Ended0/0/0/2/1.0 target0/0/0/2/1.0.0 disk HP DVD-ROM 3050/0/0/3/0 ext_bus SCSI C896 Ultra Wide Single-Ended0/0/0/3/0.6 target0/0/0/3/0.6.0 disk HP 73.4GMAX3073NC0/0/0/3/1 ext_bus SCSI C896 Ultra2 Wide LVD0/0/1 ba Local PCI Bus Adapter (782)0/0/1/0 slot PCI Slot0/0/2 ba Local PCI Bus Adapter (782)0/0/2/0 slot PCI Slot0/0/4 ba Local PCI Bus Adapter (782)0/0/4/0 slot PCI Slot0/0/6 ba Local PCI Bus Adapter (782)0/0/6/0 slot PCI Slot0/0/8 ba Local PCI Bus Adapter (782)0/0/8/0 slot PCI Slot0/0/8/0/0 fc HP Tachyon XL2 Fibre Channel Mass Storage Adapter0/0/10 ba Local PCI Bus Adapter (782)0/0/10/0 slot PCI Slot0/0/10/0/0 lan HP A6825-60101 PCI 1000Base-T Adapter0/0/12 ba Local PCI Bus Adapter (782)0/0/12/0 slot PCI Slot0/0/14 ba Local PCI Bus Adapter (782)0/0/14/0 slot PCI Slot0/5 memory Memory0/10 processor Processor0/11 processor Processor# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 4 64000/0xfa00/0x1 esdisk NO_HW DEVICE online SEAGA TE ST3146807LC0/0/0/2/0.0x6.0x0/dev/disk/disk4 /dev/rdisk/disk4disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HP DVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk524、删,汗!!!# rmsf -a /dev/disk/disk4Device /dev/disk/disk4 is busy. Cannot remove.25、插,扫(注意没?盘是插进去了,扫描的时候也能看到盘的描述了,但是状态是NO_HW 哦!)# ioscanH/W Path Class Description=======================================================root0 cell0/0 ioa System Bus Adapter (804)0/0/0 ba Local PCI Bus Adapter (782)0/0/0/0/0 tty PCI BaseSystem (103c128d)0/0/0/0/1 tty PCI Serial (103c1048)0/0/0/1/0 lan HP A6096-69001 PCI 1000Base-T Built-in I/O0/0/0/2/0 ext_bus SCSI C87x Ultra Wide Single-Ended0/0/0/2/0.6 target0/0/0/2/0.6.0 disk HP 73.4GMAX3073NC0/0/0/2/1 ext_bus SCSI C87x Ultra Wide Single-Ended0/0/0/2/1.0 target0/0/0/2/1.0.0 disk HP DVD-ROM 3050/0/0/3/0 ext_bus SCSI C896 Ultra Wide Single-Ended0/0/0/3/0.6 target0/0/0/3/0.6.0 disk HP 73.4GMAX3073NC0/0/0/3/1 ext_bus SCSI C896 Ultra2 Wide LVD0/0/1 ba Local PCI Bus Adapter (782)0/0/1/0 slot PCI Slot0/0/2 ba Local PCI Bus Adapter (782)0/0/2/0 slot PCI Slot0/0/4 ba Local PCI Bus Adapter (782)0/0/4/0 slot PCI Slot0/0/6 ba Local PCI Bus Adapter (782)0/0/6/0 slot PCI Slot0/0/8 ba Local PCI Bus Adapter (782)0/0/8/0 slot PCI Slot0/0/8/0/0 fc HP Tachyon XL2 Fibre Channel Mass Storage Adapter0/0/10 ba Local PCI Bus Adapter (782)0/0/10/0 slot PCI Slot0/0/10/0/0 lan HP A6825-60101 PCI 1000Base-T Adapter0/0/12 ba Local PCI Bus Adapter (782)0/0/12/0 slot PCI Slot0/0/14 ba Local PCI Bus Adapter (782)0/0/14/0 slot PCI Slot0/5 memory Memory0/10 processor Processor0/11 processor Processor# ioscan -fnCdiskClass I H/W Path Driver S/W State H/W Type Description====================================================================== =disk 1 0/0/0/2/0.6.0 sdisk NO_HW DEVICE HP 73.4GMAX3073NC/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0disk 2 0/0/0/2/1.0.0 sdisk CLAIMED DEVICE HP DVD-ROM 305/dev/dsk/c1t0d0 /dev/rdsk/c1t0d0disk 0 0/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 73.4GMAX3073NC/dev/dsk/c2t6d0 /dev/rdsk/c2t6d0# ioscan -m dsfPersistent DSF Legacy DSF(s)========================================/dev/rdisk/disk3 /dev/rdsk/c2t6d0/dev/rdisk/disk4 /dev/rdsk/c0t6d0/dev/rdisk/disk5 /dev/rdsk/c1t0d0# ioscan -m lunClass I Lun H/W Path Driver S/W State H/W Type Health Description====================================================================== disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE online HP 73.4GMAX3073NC0/0/0/3/0.0x6.0x0/dev/disk/disk3 /dev/rdisk/disk3disk 4 64000/0xfa00/0x1 esdisk NO_HW DEVICE online HP 73.4GMAX3073NC0/0/0/2/0.0x6.0x0/dev/disk/disk4 /dev/rdisk/disk4disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE online HP DVD-ROM 3050/0/0/2/1.0x0.0x0/dev/disk/disk5 /dev/rdisk/disk526、不要紧,还有办法# scsimgr replace_wwid -D /dev/rdisk/disk4 dsfscsimgr:WARNING: Performing replace_wwid on the resource may have some impact on system operation.Do you really want to replace? (y/[n])? yscsimgr: Successfully validated binding of LUN paths with new LUN./dev/disk/disk4 is being used. Cannot perform redirection.scsimgr: ERROR: Failed to re-assign replaced LUN device special file to replacing LUN27、看看。

HPUX11.31根盘镜像

HPUX11.31根盘镜像

HPUX11.31根盘镜像11.31采用了一种新的设备命名方式:永久性设备名类似于/dev/disk/disk1、/dev/rdisk/disk1(注意是disk不是dsk哦!),原有的11.23的方式还可以正常使用,不过新的系统默认表达方式已经是/dev/disk/disk1这种了!使用原有的11.23根盘实施步骤完全可以正常mirror,不过就是某些地方不太美观:DB91:/#lvlnboot -vBoot Definitions for Volume Group /dev/vg00:Physical Volumes belonging in Root Volume Group:/dev/disk/disk3_p2 -- Boot Disk/dev/dsk/c6t6d0s2 -- Boot DiskBoot: lvol1 on: /dev/disk/disk3_p2/dev/dsk/c6t6d0s2Root: lvol3 on: /dev/disk/disk3_p2/dev/dsk/c6t6d0s2Swap: lvol2 on: /dev/disk/disk3_p2/dev/dsk/c6t6d0s2Dump: lvol2 on: /dev/disk/disk3_p2, 0所以最好还是改为/dev/disk/disk1这种表达方式,下面是个人的一个实施过程,供大家参考下:------------START------------------------newdisk="disk5"sourdisk="disk3"echo "3">/tmp/partitionfileecho "EFI 500MB">>/tmp/partitionfileecho "HPUX 100%">>/tmp/partitionfileecho "HPSP 500MB">>/tmp/partitionfileidisk -wf **************************insf -e -Cdiskefi_fsinit -d /dev/rdisk/"$newdisk"\_p1mkboot -e -l /dev/rdisk/$newdiskefi_ls -d /dev/rdisk/"$newdisk"\_p1lifls -l /dev/rdisk/"$newdisk"\_p2efi_cp -d /dev/rdisk/"$newdisk"\_p1 -u /EFI/HPUX/AUTO /tmp/x; cat /tmp/xmkboot -a "boot vmunix -lq" /dev/rdisk/$newdiskdd if=/dev/rdisk/"$sourdisk"\_p3 of=/dev/rdisk/"$newdisk"\_p3 bs=1024kpvcreate -B /dev/rdisk/"$newdisk"\_p2vgextend /dev/vg00 /dev/disk/"$newdisk"\_p2for i in 1 2 3 4 5 6 7 8dolvextend -m 1 /dev/vg00/lvol$i /dev/disk/"$newdisk"\_p2donelvlnboot -Rvsetboot -a ******* -h **********--------------END---------------注意这不是一个完全的脚本,需要修改的:)另外一个地方需要注意:HPSP的大小由400MB扩大为500MB,否则会报:#dd if=/dev/rdsk/c0t6d0s3 of=/dev/rdsk/c6t6d0s3 bs=1024kI/O error400+0 records in399+1 records out原因不太清楚,但是不影响好像。

镜像、鬼盘换盘步骤

镜像、鬼盘换盘步骤

碰到镜像根盘鬼盘的换盘步骤如下:1. #vgreduce -f /dev/vgXX2. #lvreduce -A n -m 0 -k /dev/vgXX/lvolX /dev/dsk/cXtYdZ3. replace disk4. #pvcreate -B /dev/rdsk/cXtYdZ5. #mkboot -l /dev/rdsk/cXtYdZ6. #mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/cXtYdZ7. #vgextend /dev/vgXX /dev/dsk/cXtYdZ8. #lvextend -m 1 /dev/vgXX/lvolX /dev/dsk/cXtYdZ...9. #setboot -v#lvlnboot -v检查并设置启动配置注:1、为保证前后lvmtab 内容不变,最好先对lvmtab 文件进行备份2、在出现鬼盘的情况下,可以尝试备份lvmtab 后,用#lvscan 命令重建lvmtab 文件问:What is a Ghost Disk?答:PV that has failed or not even physically connected but still recorded in the lvmtab. A Ghost Disk is usually indicated by #vgdisplay reporting more Current PVs(recorded in lvmtab) than Active PVs(recorded in kernel).问:鬼盘的换盘步骤?答:一般换盘步骤是在换完硬盘后用命令#vgcfgrestore -n /dev/vgXX /dev/rdsk/cXtYdZ在新盘写入VGRA 和PVRA 信息但是由于lvmtab和kernel里的PV信息不对,会提示“Mismatch between the backup file and the runningkernel!”假如你100%肯定备份的vg信息是对的,可以加参数#vgcfgrestore -R必须先释放pv才能更换#vgreduce -f /dev/vgXXTo remove all PVs that are “free”, i.e. there is no LV having extents on that PV. Otherwise, if the PV is not free, #vgreduce -f reports an extents map to identify the associated LVs.You must free all PEs using lvreduce/lvremove before the PV can be removed.Check LV state#lvdisplay -v /dev/vgXX/lvolX假如lv做了镜像#lvreduce -A n -m 0 -k /dev/vgXX/lvolX /dev/dsk/cXtYdZ删除坏盘镜像假如lv没有做镜像#lvremove -A n /dev/vgXX/lvolX没有做镜像的话,lv的数据会丢失〈参数解释〉--------------------------------------------------------------------------------vgreduce-f vg_name force reduction of missing physical volume(s) in agiven volume group. This option does not requirea physical volume (PV) to be supplied on thecommand line. vgreduce obtains the name of eachphysical volume (PV) belonging to the volume groupfrom the file /etc/lvmtab. It then reads the LVMstructures from each PV and compares these withthat held by the kernel to work out which PVs aremissing. PVs which are missing will be candidatesfor removal. If all the physical extents on themissing PV are free then it will be removed fromthe volume group. Otherwise vgreduce will reportthe physical to logical extent mapping. Formissing PVs, which have extents in use, you mustfree up all the extents by using lvreduce(1M) orlvremove(1M) and re-run vgreduce with the -foption. This option is most commonly used whenthe vgdisplay(1M) command shows "Cur PV" higherthan "Act PV" and all of the PVs belonging to thevolume group are attached. This option only workson PVs and not on links.example: vgreduce -f /dev/vg01--------------------------------------------------------------------------------lvreduce -k This option should be used only in thespecial instance when you want to reduce amirrored logical volume on a physical volumethat is missing or has failed.Use this option with the -m option.example: lvreduce -m 0 -k /dev/vg01/lvol1 /dev/dsk/c1t0d0附:在没碰到鬼盘的情况下,换镜像根盘的步骤如下1.vgcfgrestore -n /dev/vg00 /dev/rdsk/c3t6d02.vgchange -a y -q n vg003.mkboot -l /dev/dsk/cXtYdZ ; lifls -l /dev/dsk/cXtYdZ4.mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c3t6d0 ; lifcp /dev/dsk/cXtYdZ:AUTO -5.lvlnboot -v (check & set lvlnboot)6.pvdisplay -v <replaced disk> | grep current7.vgsync vg008.lvdisplay -v $(find /dev/vg00 -type b) | grep stale | wc -l (check the progress of the sync)。

HP-UX11.11系统镜像及镜像恢复与重建

HP-UX11.11系统镜像及镜像恢复与重建


#lvextend -m 1 /dev/vg00/lvol* /dev/dsk/cxtydz #lvlnboot -R lvlnboot -s lvlnboot -r lvlnboot -d) #lvlnboot -v #lvdisplay -v /dev/vg00/lvol*|more setboot shutdown -ry 0
制作根盘镜像
#swlist
查看有没有装镜像软件(B2491BA MirrorDisk/UX) #ioscan -fnC disk 扫描磁盘设备 #pvcreate -B -f /dev/rdsk/cxtydz 强制清除物理盘原有信息创建可引导的物
理卷

#vgextend /dev/vg00 /dev/dsk/cxtydz
重做镜像



#ioscan -fnC disk #pvcreate -B -f /dev/rdsk/cxtydz #vgextend /dev/vg00 /dev/dsk/cxtydz #mkboot -l /dev/rdsk/cxtydz #mkboot -a “hpux -lq(;0)/stand/vmunix” /dev/rdsk/cxtydz (#mkboot -a “hpux -lq(;0)/stand/vmunix” /dev/rdsk/cXtYdZ)

引导
#lvlnboot -v
交换 转储

验证BDRA(引导数据预留区)的设置

#lvdisplay -v /dev/vg00/lvol*|more
验证各逻辑卷是否正确连接配置


setboot设置引导路径
shutdown -ry 0重启验证镜像是否成功

在HPUX11iV3系统中更换已镜像的非根磁盘(原创)

在HPUX11iV3系统中更换已镜像的非根磁盘(原创)

在HPUX11iV3系统中更换已镜像的非根磁盘(原创)在HPUX 11iV3系统中更换已镜像的非根磁盘(原创)变化:HP新版操作系统(B11.31),在磁盘设备这部分和以往的版本有些区别,磁盘设备有两种表达形式,一种为传统的方式(/dev/dsk/cCtTdD),另一种为永久性设备名,也就是说不按位置,如这块盘在系统中一号槽位上叫/dev/disk/disk1,把这块盘拔到插到别的槽位上还disk1。

这一点和Tru64 unix v5.X版本一样了。

所以在更换LVM磁盘方面有一些新的变化。

更换步骤:如果磁盘上的所有物理盘区在另一个磁盘上均有副本,并且您的磁盘不是引导磁盘,则可以使用此步骤。

举例:如要更换的磁盘的Lunpath 硬件路径为0/1/1/1.0x3.0x0,其设备专用文件名为 /dev/disk/disk14 和 /dev/rdisk/disk14。

1. 将硬件路径保存到磁盘。

运行 ioscan 命令并记录故障磁盘的硬件路径。

# ioscan –m lun /dev/disk/disk14Class I Lun H/W Path Driver S/W State H/W Type Health Description========================================================================disk 14 64000/0xfa00/0x0 esdisk CLAIMED DEVICE offline HP MSA Vol0/1/1/1.0x3.0x0/dev/disk/disk14 /dev/rdisk/disk14LUN 实例编号为14,LUN 硬件路径为64000/0xfa00/0x0,Lunpath 硬件路径为 0/1/1/1.0x3.0x0。

更换故障磁盘后,将创建新的 LUN 实例和 LUN 硬件路径。

要在更换磁盘后标识该磁盘,必须使用 Lunpath 硬件路径(在本示例中为0/1/1/1.0x3.0x0)。

HP UX 安腾11.23根镜像

HP UX 安腾11.23根镜像

HPUX 11.23下根盘镜像全过程(上)分类:HPUX 2009-04-27 16:17 395人阅读评论(0) 收藏举报、知识准备HPUX 11.23与11.22版本配置根盘镜像的最大的不同:1. 新增加了HPSP分区;11.22系统根盘只划分了两个分区EFI/HP-UX,在11.23系统中,划分了3个分区,分别为EFI/HP-UX/HPSP.相应在使用idisk命令划分硬盘分区时使用的/tmp/partitionfile 文件中的内容也做了相应调整.2. EFI分区大小从原先的100M,增加到500M二、实验目的对一台HP rx8640机器的2号分区根盘(146GB)镜像;三、操作过程1. From HPUX, use vgdisplay to identify the disk that is in vg00. Use ioscan to find the spare disk.# vgdisplay -v --> vg00 is on /dev/dsk/c0t6d0s2# ioscan -efunC disk --> c2t6d0Class I H/W Path Driver S/W State H/W Type Description========================================================================disk 1 0/0/0/2/0.6.0 sdisk CLAIMED DEVICE HP 146 GST3146855LC/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0/dev/dsk/c0t6d0s1 /dev/rdsk/c0t6d0s1/dev/dsk/c0t6d0s2 /dev/rdsk/c0t6d0s2/dev/dsk/c0t6d0s3 /dev/rdsk/c0t6d0s3Acpi(HWP0002,PNP0A03,0)/Pci(2|0)/Scsi(Pun6,Lun0)/HD(Part1,Sig0E481F42-F04C-11DC-8002-D6217B60E5 88)//EFI/HPUX/HPUX.EFIdisk 0 0/0/0/2/1.2.0 sdisk CLAIMED DEVICE Optiarc DVD RW AD-5170A/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0disk 2 0/0/0/3/0.6.0 sdisk CLAIMED DEVICE HP 146 GST3146855LC/dev/dsk/c2t6d0 /dev/rdsk/c2t6d02. Create the system, OS, and service partitions.# vi /tmp/partitionfile3EFI 500MBHPUX 100%HPSP 400MB# idisk -wf /tmp/partitionfile /dev/rdsk/c2t6d0idisk version: 1.31********************** WARNING ***********************If you continue you may destroy all data on this disk.Do you wish to continue(yes/no)? yes <-- Answer "yes" and not "y"3. Create device files needed for the new partitions.# insf -eC diskinsf: Installing special files for sdisk instance 1 address 0/0/0/2/0.6.0 insf: Installing special files for sdisk instance 0 address 0/0/0/2/1.2.0 insf: Installing special files for sdisk instance 2 address 0/0/0/3/0.6.0 insf: Installing special files for sdisk instance 3 address 0/0/12/1/0/4/1.0.0 insf: Installing special files for sdisk instance 4 address 0/0/12/1/0/4/1.1.0 insf: Installing special files for sdisk instance 5 address 0/0/12/1/0/4/1.2.0 insf: Installing special files for sdisk instance 6 address 0/0/12/1/0/4/1.3.0 insf: Installing special files for sdisk instance 7 address 0/0/14/1/0/4/1.0.0 insf: Installing special files for sdisk instance 8 address 0/0/14/1/0/4/1.1.0 insf: Installing special files for sdisk instance 9 address 0/0/14/1/0/4/1.2.0 insf: Installing special files for sdisk instance 10 address 0/0/14/1/0/4/1.3.04. Verify the partition table.# idisk /dev/rdsk/c2t6d0idisk version: 1.32EFI Primary Header:Signature = EFI PARTRevision = 0x10000HeaderSize = 0x5cHeaderCRC32 = 0xe51d545dMyLbaLo = 0x1MyLbaHi = 0x0AlternateLbaLo = 0x1117732fAlternateLbaHi = 0x0FirstUsableLbaLo = 0x22FirstUsableLbaHi = 0x0LastUsableLbaLo = 0x1117730cLastUsableLbaHi = 0x0Disk GUID = 711f04da-2190-11dd-8001-d6217b60e588PartitionEntryLbaLo = 0x2PartitionEntryLbaHi = 0x0NumberOfPartitionEntries = 0xcSizeOfPartitionEntry = 0x80PartitionEntryArrayCRC32 = 0x280b786cPrimary Partition Table (in 512 byte blocks):Partition 1 (EFI):Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93bUnique Partition GUID = 711f066a-2190-11dd-8002-d6217b60e588 Starting Lba Lo = 0x22Starting Lba Hi = 0x0Ending Lba Lo = 0xfa021Ending Lba Hi = 0x0Partition 2 (HP-UX):Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000 Unique Partition GUID = 711f0688-2190-11dd-8003-d6217b60e588 Starting Lba Lo = 0xfa022Starting Lba Hi = 0x0Ending Lba Lo = 0x110af30bEnding Lba Hi = 0x0Partition 3 (HPSP):Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000 Unique Partition GUID = 711f06a6-2190-11dd-8004-d6217b60e588 Starting Lba Lo = 0x110af30cStarting Lba Hi = 0x0Ending Lba Lo = 0x1117730bEnding Lba Hi = 0x0EFI Alternate Header:Signature = EFI PARTRevision = 0x10000HeaderSize = 0x5cMyLbaLo = 0x1117732fMyLbaHi = 0x0AlternateLbaLo = 0x1AlternateLbaHi = 0x0FirstUsableLbaLo = 0x22FirstUsableLbaHi = 0x0LastUsableLbaLo = 0x1117730cLastUsableLbaHi = 0x0Disk GUID = 711f04da-2190-11dd-8001-d6217b60e588PartitionEntryLbaLo = 0x1117730ePartitionEntryLbaHi = 0x0NumberOfPartitionEntries = 0xcSizeOfPartitionEntry = 0x80PartitionEntryArrayCRC32 = 0x280b786cAlternate Partition Table (in 512 byte blocks):Partition 1 (EFI):Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b Unique Partition GUID = 711f066a-2190-11dd-8002-d6217b60e588 Starting Lba Lo = 0x22Starting Lba Hi = 0x0Ending Lba Lo = 0xfa021Ending Lba Hi = 0x0Partition 2 (HP-UX):Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000 Unique Partition GUID = 711f0688-2190-11dd-8003-d6217b60e588 Starting Lba Lo = 0xfa022Starting Lba Hi = 0x0Ending Lba Lo = 0x110af30bEnding Lba Hi = 0x0Partition 3 (HPSP):Partition Type GUID = e2a1e728-32e3-11d6-a682-7b03a0000000 Unique Partition GUID = 711f06a6-2190-11dd-8004-d6217b60e588 Starting Lba Lo = 0x110af30cStarting Lba Hi = 0x0Ending Lba Hi = 0x0Legacy MBR (MBR Signatures in little endian):MBR Signature = 0x6c041f71Protective MBR5. Verify that the device files were created properly.# ioscan -efnC disk --> c2t6d0 is 0/0/0/3/0.6.06. Populate the /efi/hpux/ directory in the new EFI system partition.# mkboot -e -l /dev/rdsk/c2t6d07. Change the auto file for the mirror to boot without quorum.NOTE: Using "s1"# echo "boot vmunix -lq" > /tmp/AUTO.lq# efi_cp -d /dev/rdsk/c2t6d0s1 /tmp/AUTO.lq /EFI/HPUX/AUTONOTE: We assume that if we boot from the primary, the mirror is fullyfunctional and therefore we don't need to override quorum. Your site mightrequire that both disks override quorum.8. Verify the contents of the auto file on the primary and the mirror.NOTE: Using "s1"# efi_cp -d /dev/rdsk/c0t6d0s1 -u /EFI/HPUX/AUTO /tmp/AUTO.pri# efi_cp -d /dev/rdsk/c2t6d0s1 -u /EFI/HPUX/AUTO /tmp/AUTO.alt# cat /tmp/AUTO.priboot vmunix# cat /tmp/AUTO.altboot vmunix -lq分享到:∙上一篇:HPUX下定位网卡位置∙下一篇:HPUX 11.23下根盘镜像全过程(下)HPUX 11.23下根盘镜像全过程(下)分类:HPUX 2009-04-27 16:19 300人阅读评论(0) 收藏举报9. Add the new partition to vg00.NOTE: Using "s2"# pvcreate -fB /dev/rdsk/c2t6d0s2Physical volume "/dev/rdsk/c2t6d0s2" has been successfully created.# vgextend vg00 /dev/dsk/c2t6d0s2Volume group "vg00" has been successfully extended.Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf10. Mirror all logical volumes in vg00.NOTE: Using "s2"# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t6d0s2The newly allocated mirrors are now being synchronized. This operation willtake some time. Please wait ....Logical volume "/dev/vg00/lvol1" has been successfully extended.Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t6d0s2The newly allocated mirrors are now being synchronized. This operation willtake some time. Please wait ....Logical volume "/dev/vg00/lvol2" has been successfully extended.Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t6d0s2The newly allocated mirrors are now being synchronized. This operation willtake some time. Please wait ....Logical volume "/dev/vg00/lvol3" has been successfully extended.Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t6d0s2The newly allocated mirrors are now being synchronized. This operation willtake some time. Please wait ....Logical volume "/dev/vg00/lvol4" has been successfully extended.Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t6d0s2The newly allocated mirrors are now being synchronized. This operation willtake some time. Please wait ....Logical volume "/dev/vg00/lvol5" has been successfully extended.Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t6d0s2The newly allocated mirrors are now being synchronized. This operation willtake some time. Please wait ....Logical volume "/dev/vg00/lvol6" has been successfully extended.Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t6d0s2The newly allocated mirrors are now being synchronized. This operation willtake some time. Please wait ....Logical volume "/dev/vg00/lvol7" has been successfully extended.Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf # lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t6d0s2The newly allocated mirrors are now being synchronized. This operation willtake some time. Please wait ....Logical volume "/dev/vg00/lvol8" has been successfully extended.Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf11. Add the new disk to /stand/bootconf.NOTE: Using "s2"# vi /stand/bootconfl /dev/dsk/c0t6d0s2l /dev/dsk/c2t6d0s212. Verify that the new disk was added to vg00, and the lv's are in sync.# vgdisplay -v vg00--- Volume groups ---VG Name /dev/vg00VG Write Access read/writeVG Status availableMax LV 255Cur LV 8Open LV 8Max PV 16Cur PV 2Act PV 2VGDA 4PE Size (Mbytes) 32Total PE 8692Alloc PE 2330Free PE 6362Total PVG 0Total Spare PVs 0Total Spare PVs in use 0--- Logical volumes ---LV Name /dev/vg00/lvol1LV Status available/syncd LV Size (Mbytes) 1792 Current LE 56Allocated PE 112Used PV 2LV Name /dev/vg00/lvol2LV Status available/syncd LV Size (Mbytes) 8192 Current LE 256Allocated PE 512Used PV 2LV Name /dev/vg00/lvol3LV Status available/syncd LV Size (Mbytes) 992 Current LE 31Allocated PE 62Used PV 2LV Name /dev/vg00/lvol4LV Status available/syncd LV Size (Mbytes) 512 Current LE 16Used PV 2LV Name /dev/vg00/lvol5LV Status available/syncd LV Size (Mbytes) 128 Current LE 4Allocated PE 8Used PV 2LV Name /dev/vg00/lvol6LV Status available/syncd LV Size (Mbytes) 9184 Current LE 287Allocated PE 574Used PV 2LV Name /dev/vg00/lvol7LV Status available/syncd LV Size (Mbytes) 7776 Current LE 243Allocated PE 486Used PV 2LV Name /dev/vg00/lvol8LV Status available/syncd LV Size (Mbytes) 8704 Current LE 272Allocated PE 544Used PV 2--- Physical volumes ---PV Name /dev/dsk/c0t6d0s2 PV Status available Total PE 4346Free PE 3181Proactive Polling OnPV Name /dev/dsk/c2t6d0s2PV Status availableTotal PE 4346Free PE 3181Autoswitch OnProactive Polling On13. Verify that the BDRA was updated properly. Take note of the HW paths for step 14.# lvlnboot -vBoot Definitions for Volume Group /dev/vg00:Physical Volumes belonging in Root Volume Group:/dev/dsk/c0t6d0s2 (0/0/0/2/0.6.0) -- Boot Disk/dev/dsk/c2t6d0s2 (0/0/0/3/0.6.0) -- Boot DiskBoot: lvol1 on: /dev/dsk/c0t6d0s2/dev/dsk/c2t6d0s2Root: lvol3 on: /dev/dsk/c0t6d0s2/dev/dsk/c2t6d0s2Swap: lvol2 on: /dev/dsk/c0t6d0s2/dev/dsk/c2t6d0s2Dump: lvol2 on: /dev/dsk/c0t6d0s2, 014. Add EFI primary and high availability boot path menu entries.# setboot -p 0/0/0/2/0.6.0# setboot -h 0/0/0/3/0.6.0# setboot -b on15. Verify that the primary and mirror boot paths are configured properly.# setbootPrimary bootpath : 0/0/0/2/0.6.0HA Alternate bootpath : 0/0/0/3/0.6.0Alternate bootpath : 0/0/0/1/0Autoboot is ON (enabled)16. Test the new mirror by booting off of it.# cd /# shutdown -ry 0SHUTDOWN PROGRAM05/14/08 17:19:51 EATBroadcast Message from root (console) Wed May 14 17:19:51...SYSTEM BEING BROUGHT DOWN NOW ! ! !# grep "Boot device" /var/adm/syslog/syslog.logvmunix: Boot device's HP-UX HW path is: 0/0/0/2/0.6.017. Change the boot sequence in order to boot from mirror disk /dev/dsk/c2t6d0:# setboot -p 0/0/0/3/0.6.0# setboot -h 0/0/0/2/0.6.0# setboot -b on# setbootPrimary bootpath : 0/0/0/3/0.6.0HA Alternate bootpath : 0/0/0/2/0.6.0Alternate bootpath : 0/0/0/1/0# cd /# shutdown -ry 018. Verify which disk/kernel you booted from.# grep "Boot device" /var/adm/syslog/syslog.logvmunix: Boot device's HP-UX HW path is: 0/0/0/3/0.6.0overhpux 11.23安腾做mirror步骤详细说明,见全文...HPUX 11.23与11.22版本配置根盘镜像的最大的不同:1. 新增加了HPSP分区11.22系统根盘只划分了两个分区EFI / HP-UX,在11.23系统中,划分了3个分区,分别为EFI / HP-UX / HPSP相应在使用idisk命令划分硬盘分区时使的/tmp/partitionfile 文件中的内容也做了相应调整。

关于hpux换镜像硬盘的方法

关于hpux换镜像硬盘的方法

关于hpux换镜像硬盘的方法关于hpux换硬盘的疑惑镜像的两个硬盘坏了一个,更换步骤如下1、备份vg的配置信息#vgcfgbackup vg022、剥离镜像#lvreduce -m 0 -A n lv_name /dev/dsk/cXtXdX 3、物理操作:换盘4、测试盘的可用性#ioscan /dev/dsk/cXtXdX5、恢复lvm配置信息到pv#vgcfgrestore -n vg02 /dev/dsk/cXtXdX 6、激活新的pv(不知道这个“激活”用的恰不恰当)#vgchange -a y vg007、重建镜像#lvextend -m 1 lv_name /dev/dsk/cXtXdX疑惑:做完上诉第二步,是否可以用一下步骤代替3、将pv从vg中拿走#vgreduce -A n vg02 /dev/dsk/cXtXdX 4、物理操作:换盘5、测试盘的可用性#ioscan /dev/dsk/cXtXdX6、格式化pv#pvcreate /dev/rdsk/cXtXdX7、将pv加入vg#vgextend vg02 /dev/dsk/cXtXdX 8、重建镜像#lvextend -m 1 lv_name /dev/dsk/cXtXdX这样一个过程和aix下换盘就一致了2006-11-21 23:12 pangyi以前找的一篇文章1. Determine which lvol's are mirrored in the volume group of thefaulty disk.# lvdisplay -v /dev/vgXX/lvol* | more2. Reduce any logical volumes that have mirror copies on the faulty disk.# lvreduce -m 0 /dev/vgXX/lvolX /dev/dsk/cXtXd0 (for 1 way mirroring) # lvreduce -m 1 /dev/vgXX/lvolX /dev/dsk/cXtXd0 (for 2 way mirroring) NOTE: You must repeat the lvreduce for every lvolX on the faultydisk.3. Reduce the volume group.# vgreduce /dev/vgXX /dev/dsk/cXtXd04. Replaced the faulty hot swap disk.5. Initialize the replaced disk for LVM.# pvcreate -f /dev/rdsk/cXtXd06. Extend the volume group.# vgextend /dev/vgXX /dev/dsk/cXtXd07. Restore the volume group information.# vgcfgrestore -n /dev/vgXX /dev/rdsk/cXtXd08. Activate the volume group containing the replaced disk.# vgchange -a y /dev/vgXX9. The volume group will now resynchronize the mirroring. NOTE: If the resync does not occur, issuethis command:# vgsync /dev/vgXX实践出真知。

Linux替换硬盘已挂载目录的技巧

Linux替换硬盘已挂载目录的技巧

Linux替换硬盘已挂载目录的技巧
导读:Linux系统硬盘挂载完目录后,通常是不会去修改它的,但有时因为工作或个人需求,要修改硬盘已挂载的目录,要如何操作呢?下面通过实例讲解Linux如何更改硬盘已挂载目录,有需要的朋友不妨来学习下。

国内好多IDC会把硬盘分为两块,系统盘和数据盘,特别是采用云技术的一些商家。

这种盘通常系统盘的读写速度要比数据盘好。

如果对硬盘大小不在乎的话,完全可以不必理会数据盘,用数据盘当备份倒也不错。

但如果网站全生成静态的话,那就需要大硬盘了,其实修改硬盘已挂载分区很简单。

比如想把已经挂载在home目录上的硬盘挂载到data目录上,如下操作#df -h(查看分区情况及数据盘名称)
# mkdir /data(如果没有data目录就创建,否则此步跳过)
# umount /home(卸载硬盘已挂载的home目录)
# mount /dev/sdb1 /data (挂载到data目录)
# vi /etc/fstab (编辑fstab文件修改或添加,使重启后可以自动挂载)
/dev/sdb1 /data ext3 auto 0 0
数据盘新挂载目录
编辑/etc/fstab里面的/home为/data,或创建让系统启动的时候自动挂载到
/data
Linux修改硬盘已挂载目录的方法就介绍到这里了,本文并没有讲解过多的理论知识,而是通过实例让用户掌握Linux修改硬盘已挂载目录的步骤,更直观实用。

如何在惠普家用电脑上更改硬盘光驱驱动器盘符

如何在惠普家用电脑上更改硬盘光驱驱动器盘符

如何在惠普家用电脑上更改硬盘/光驱驱动器盘符一、故障现象在电话支持过程中,有时会有用户来电报修,反映在我的电脑中硬盘或光驱的盘符出现错乱。

如图1中盘符错乱:硬盘的两个分区不再连接在一起,而是一个是C盘,一个是E 盘,光驱做为D盘夹在了当中优易客打印耗材商城。

这种现象会造成一定的问题,比如由于驱动器盘符更改,导致之前安装的程序找不到安装路径,无法正常工作或系统(Windows Xp / Vista)出现问题。

如图1所示。

图1:硬盘驱动器C:E:盘符,中间夹了光驱D:二、故障原因产生盘优易客打印耗材商城符错乱现象的主要原因是由于用户安装了虚拟光驱软件,或是进行了硬盘分区,或者加装了其他驱动器引起。

三、解决方法在不知道如何处理的情况下,通过重装系统可以解决问题。

但其实根本无需重新安装系统,只需要手动更改相应盘符设置就可以解决。

1、XP设置方法。

(1)点击“开始”,右键点击“我的电脑”,左键点击“管理”。

如图2所示。

图2(2)点击左侧“磁盘管理”,右键点击选择右侧下方需要更改盘符的驱动器,选择“更改驱动器名和路径”(系统盘不允许修改,如此例的C盘)。

如图3、图4所示。

图3(硬盘)图4(光驱)(3)点击“更改”。

如图4所示。

图4(4)点击“指派以下驱动器号”后的“下拉列表”,选择需要设置的驱动器号。

如图5所示。

图5(5)点击“确定”按钮。

优易客打印耗材商城如图6所示。

图6(6)在弹出警告框中,点击“是”。

如图7所示。

图7(7)正常情况下驱动器盘符更改立即生效(也可以重新启动电脑)!2、VISTA设置方法(1)点击“开始”,右键点击“计算机”,优易客打印耗材商城 左键点击“管理”。

如图8所示。

图8(2)用户帐户控制开启的话会有警告框,请点击“继续”。

如图9所示。

图9(3)点击左侧“磁盘管理”,右键点击选择右侧下方需要更改盘符的驱动器,选择“更改驱动器号和路径”(系统盘不允许修改)。

如图10所示。

图10(4)点击“更改”。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

在HPUX 11iV3系统中更换已镜像的非根磁盘(原创)
变化:
HP新版操作系统(B11.31),在磁盘设备这部分和以往的版本有些区别,磁盘设备有两种表达形式,一种为传统的方式(/dev/dsk/cCtTdD),另一种为永久性设备名,也就是说不按位置,如这块盘在系统中一号槽位上叫/dev/disk/disk1,把这块盘拔到插到别的槽位上还disk1。

这一点和Tru64 unix v5.X版本一样了。

所以在更换LVM磁盘方面有一些新的变化。

更换步骤:
如果磁盘上的所有物理盘区在另一个磁盘上均有副本,并且您的磁盘不是引导磁盘,则可以使用此步骤。

举例:如要更换的磁盘的 Lunpath 硬件路径为 0/1/1/1.0x3.0x0,其设备专用文件名为 /dev/disk/disk14 和 /dev/rdisk/disk14。

1. 将硬件路径保存到磁盘。

运行 ioscan 命令并记录故障磁盘的硬件路径。

# ioscan –m lun /dev/disk/disk14
Class I Lun H/W Path Driver S/W State H/W Type Health Description
========================================================================
disk 14 64000/0xfa00/0x0 esdisk CLAIMED DEVICE offline HP MSA Vol
0/1/1/1.0x3.0x0
/dev/disk/disk14 /dev/rdisk/disk14
LUN 实例编号为 14,LUN 硬件路径为 64000/0xfa00/0x0,Lunpath 硬件
路径为 0/1/1/1.0x3.0x0。

更换故障磁盘后,将创建新的 LUN 实例和 LUN 硬件路径。

要在更换磁盘后标识该磁盘, 必须使用 Lunpath 硬件路径(在本示例中为 0/1/1/1.0x3.0x0)。

2. 暂停 LVM 对磁盘的访问。

如果磁盘不可热交换,则必须在关闭系统电源后才能更换磁盘。

关闭系统后,便暂停了对 磁盘的 LVM 访问。

否则,请使用 pvchange 命令的 –a 选项断开此设备:
# pvchange -a N /dev/disk/disk14
3. 更换磁盘。

如果磁盘是可热交换的,请直接更换它。

如果磁盘不可热交换,请关闭系统和电源,然后更换磁盘。

按正常方式重新引导系统。

4. 通知海量存储子系统已更换磁盘。

如果未重新引导系统以更换故障磁盘,则必须首先运行 scsimgr,然后才能将该新磁盘用 作旧磁盘的替换。

这一步就是在系统中去除原盘的记录,使用新换的硬盘来替换旧盘的信息例如:
# scsimgr replace_wwid –D /dev/rdisk/disk14
该命令允许存储子系统使用新磁盘的 LUN World-Wide-Identifier 替换旧磁盘的 LUN World-Wide-Identifier (WWID)。

存储子系统将为替换磁盘创建一个新 LUN 实例和新设备专用文件。

5. 确定磁盘的新实例编号。

运行 ioscan –m lun 来确定更换磁盘的新 LUN 实例。

例如:
# ioscan –m lun
Class I Lun H/W Path Driver S/W State H/W Type Health Description
========================================================================
disk 14 64000/0xfa00/0x0 esdisk NO_HW DEVICE offline HP MSA Vol
/dev/disk/disk14 /dev/rdisk/disk14
...
disk 28 64000/0xfa00/0x1c esdisk CLAIMED DEVICE online HP MSA Vol
0/1/1/1.0x3.0x0
/dev/disk/disk28 /dev/rdisk/disk28
在该示例中,已为新磁盘创建 LUN 实例 28,其 LUN 硬件路径为 64000/0xfa00/0x1c,具有设备专用文件 /dev/disk/disk28 和 /dev/rdisk/disk28,其 Lunpath 硬件路径与旧磁盘相同,为 0/1/1/1.0x3.0x0。

请注意,现在没有 Lunpath 与旧磁盘的 LUN 实例14 关联。

如果已重新引导系统来更换故障磁盘,则 ioscan –m lun 将不显示旧磁盘。

6. 将旧实例编号分配给替换磁盘。

运行 io_redirect_dsf 向新磁盘重新分配旧 LUN 实例编号。

例如:
# io_redirect_dsf -d /dev/disk/disk14 -n /dev/disk/disk28
这将向替换磁盘分配 LUN 实例编号 (14)。

此外,将重命名新磁盘的设备专用文件,以与旧 LUN 实例编号一致。

以下 ioscan –m lun 输出显示了结果:
# ioscan –m lun /dev/disk/disk14
Class I Lun H/W Path Driver S/W State H/W Type Health Description
========================================================================
disk 14 64000/0xfa00/0x1c esdisk CLAIMED DEVICE online HP MSA Vol
0/1/1/1.0x3.0x0
/dev/disk/disk14 /dev/rdisk/disk14
LUN 硬件路径为 64000/0xfa00/0x0 的旧磁盘的 LUN 表示形式已经被删除。

已从 LUN实例 28 向 LUN 实例 14 重新分配硬件路径为 64000/0xfa00/0x1c 的新磁盘的 LUN 表示形式,并且其设备专用文件也已重命名为 /dev/disk/disk14 和/dev/rdisk/disk14。

7. 将 LVM 配置信息保存到磁盘上。

运行 vgcfgrestore,将 LVM 配置信息恢复到添加的磁盘上:
# vgcfgrestore -n /dev/vgnn /dev/rdisk/disk14
8. 恢复 LVM 对磁盘的访问。

在上面的步骤 2中,如果未重新引导系统,请运行带 –a 选项的 pvchange 命令重新连接 磁盘:
# pvchange –a y /dev/disk/disk14
如果已重新引导系统,请通过运行 vgchange 命令来重新激活卷组并重新连接任何缺少的 磁盘:
# vgchange -a y /dev/vgnn
由于更换磁盘上的所有数据都进行了镜像,所以不必执行其他任何操作;LVM 会自动将磁盘上的数据与数据的其他镜像副本进行同步。

最后不需要去关心这块硬盘上有哪些LV的LE映射到PE上,自动恢复。

后续:
对于做了mirror的根盘恢复的步聚类似,只是需要使用正常的mkboot 和lvlnboot等命令来更新BDRA和LIF区域。

但对于安腾启动盘还需要进行idisk,使用的盘为/dev/disk/disk14_p2,有一个Partition 2,要了解这些,还要参考别的资料哦。

相关文档
最新文档