AIX更换硬盘方法
aix更换mirror硬盘hdisk0

AIX根盘镜像更换hdisk(dump device问题)AIX如果paging swap和dump device不同,系统不会mirror dump device(The system dump devices "primary /dev/hd6 and secondary /dev/sysdumpnull" should not be mirrored.),下面是系统正常情况下的dump device的信息:# lsvg -l rootvgrootvg:LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINThd5 boot 1 2 2 closed/syncd N/Ahd6 paging 244 488 2 open/syncd N/Ahd8 jfs2log 1 2 2 open/syncd N/Ahd4 jfs2 8 16 2 open/syncd /hd2 jfs2 40 80 2 open/syncd /usrhd9var jfs2 40 80 2 open/syncd /varhd3 jfs2 16 32 2 open/syncd /tmphd1 jfs2 40 80 2 open/syncd /homehd10opt jfs2 80 160 2 open/syncd /optlg_dumplv sysdump 16 16 1 open/syncd N/A# sysdumpdev -lprimary /dev/lg_dumplvsecondary /dev/sysdumpnullcopy directory /var/adm/rasforced copy flag TRUEalways allow dump FALSEdump compression ON# lslv -l lg_dumplvlg_dumplv:N/APV COPIES IN BAND DISTRIBUTIONhdisk0 016:000:000 0% 000:000:000:000:016目前dump device只有一个,在hdisk0上,如果hdisk0出现故障,系统可以从hdisk1启动,系统运行也不会有问题,只是没有dump device,所以如果需要更换hdisk0,需要特别注意一些别的问题,具体步骤:1 unmirror rootvgsmitty unmirrorvg或者unmirrorvg rootvg hdisk02 查看unmirror后vg的状态# lsvg -l rootvgrootvg:LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINThd5 boot 1 1 1 closed/syncd N/Ahd6 paging 244 244 1 open/syncd N/Ahd8 jfs2log 1 1 1 open/syncd N/Ahd4 jfs2 8 8 1 open/syncd /hd2 jfs2 40 40 1 open/syncd /usrhd9var jfs2 40 40 1 open/syncd /varhd3 jfs2 16 16 1 open/syncd /tmphd1 jfs2 40 40 1 open/syncd /homehd10opt jfs2 80 80 1 open/syncd /optlg_dumplv sysdump 16 16 1 closed/syncd N/A3 Reduce VGsmitty reducevg或者reducevg rootvg hdisk0将会报错:rmlv: Warning, all data belonging to logical volume lg_dumplv on physical volume hdisk0 will be destroyed.rmlv: Do you wish to continue? y(es) n(o)? 0516-016 ldeletepv: Cannot delete phy sical volume with allocated partitions. Use either migratepv to move the partitions or reducevg with the -d option to delete the partitions.0516-884 reducevg: Unable to remove physical volume hdisk0.解决方法:3.1 查看dump device的状态# lslv -l lg_dumplvlg_dumplv:N/APV COPIES IN BAND DISTRIBUTIONhdisk0 016:000:000 0% 000:000:000:000:0163.2 修改dum sysdumpdev -P -p /dev/sysdumpnullprimary /dev/sysdumpnullsecondary /dev/sysdumpnullcopy directory /var/adm/rasforced copy flag TRUEalways allow dump FALSEdump compression ON3.3 reducevgsmitty reducevg0516-914 rmlv: Warning, all data belonging to logical volumelg_dumplv on physical volume hdisk0 will be destroyed.rmlv: Do you wish to continue? y(es) n(o)?y-------------------缺省删除lg_dumplv rmlv: Logical volume lg_dumplv is removed.3.4 查看dump device的状态# lsvg -l rootvgrootvg:LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINThd5 boot 1 1 1 closed/syncd N/Ahd6 paging 244 244 1 open/syncd N/Ahd8 jfs2log 1 1 1 open/syncd N/Ahd4 jfs2 8 8 1 open/syncd /hd2 jfs2 40 40 1 open/syncd /usrhd9var jfs2 40 40 1 open/syncd /varhd3 jfs2 16 16 1 open/syncd /tmphd1 jfs2 40 40 1 open/syncd /homehd10opt jfs2 80 80 1 open/syncd /opt4 更换hdisk0# cfgmgr -v# lspv5 extendvg# smitty extendvg或者# extendvg rootvg hdisk06.镜像根盘# smitty mirrorvg7. bosboot -ad /dev/hdisk18. 设置启动顺序# bootlist -m normal hdisk0 hdisk1 cd0# bootlist -o -m normalhdisk0 blv=hd5hdisk1 blv=hd5cd0# lsvg -l rootvgrootvg:LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT hd5 boot 1 2 2 closed/syncd N/Ahd6 paging 244 488 2 open/stale N/Ahd8 jfs2log 1 2 2 open/stale N/Ahd4 jfs2 8 16 2 open/stale /hd2 jfs2 40 80 2 open/stale /usrhd9var jfs2 40 80 2 open/stale /varhd3 jfs2 16 32 2 open/stale /tmphd1 jfs2 40 80 2 open/stale /homehd10opt jfs2 80 160 2 open/stale /opt9.重新创建dump lv# mklv -t sysdump -y lg_dumplv rootvg 16 hdisk0 lg_dumplv10.修改主用dump device# sysdumpdev -Pp /dev/lg_dumplvprimary /dev/lg_dumplvsecondary /dev/sysdumpnullcopy directory /var/adm/rasforced copy flag TRUEalways allow dump FALSEdump compression ON# lsvg -l rootvgrootvg:LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINThd5 boot 1 2 2 closed/syncd N/Ahd6 paging 244 488 2 open/syncd N/Ahd8 jfs2log 1 2 2 open/syncd N/Ahd4 jfs2 8 16 2 open/syncd /hd2 jfs2 40 80 2 open/stale /usrhd9var jfs2 40 80 2 open/stale /varhd3 jfs2 16 32 2 open/stale /tmphd1 jfs2 40 80 2 open/stale /homehd10opt jfs2 80 160 2 open/stale /optlg_dumplv sysdump 16 16 1 open/syncd N/A█AIX rootvg 镜像,以与更换硬盘一、做镜像假设主机有2块硬盘hdisk0,hdisk1,系统安装在hdisk0上。
AIX下更换磁盘之更换坏盘

AIX下更换磁盘之更换坏盘选择性步骤此步骤为确保当前的hdisk0或hdisk1确为坏盘做准备,可不操作,操作只会增加安全性:1停应用2关机:#shutdown –F3停电拔出坏硬盘,看硬盘上信息FRU Number、Serial Number、Part Number是否对的起来,对应正确再一次确认了此盘是系统中对应的坏盘。
如果不是就记录下FRU Number、Serial Number、Part Number 信息,插上硬盘、开机用lscfg命令(例:lscfg -vl hdisk1)查看其它硬盘的信息。
再次确认出坏盘的正确hdisk号。
以下步骤在机器停止应用的情况下操作,应用包括:HACMP双机(smitty clstop),oracle等等。
1、坏盘为hdisk0,执行以下步骤:1)、破除镜像把HDISK0从ROOTVG中不做MIRROW:#unmirrorvg rootvg hdisk0查看物理卷#lspv这时HDISK0不在和HDISK1为MIRROR输入以下命令# lspv -l hdisk0Dumplv如果有显示上一行dumplv信息,按照以下操作:→如果现在hdisk0仍然处于激活状态,你可以简单地用“migratepv”命令把“dumplv”从hdisk0移到hdisk1:# migratepv -l dumplv hdisk0 hdisk1→如果现在hdisk0处于丢失状态或者已经坏掉,你将需要做如下操作:# lslv dumplv ---> 获得此逻辑卷的属性为你重建做准备LOGICAL VOLUME: dumplv ---VOLUME GROUP: rootvgLV IDENTIFIER: 00097c7f00004c00000000e9732a0422.16 PERMISSION: read/writeVG STATE: active/complete ---LV STATE: opened/syncdTYPE: sysdump ---WRITE VERIFY: offMAX LPs: 512 --- PP SIZE: 16 megabyte(s)COPIES: 1 -------SCHED POLICY: parallelLPs: 20 ---------PPs: 20STALE PPs: 0 --- BB POLICY: relocatableINTER-POLICY: minimum ---RELOCATABLE: yesINTRA-POLICY: middle --- UPPER BOUND: 32MOUNT POINT: N/A --------LABEL: NoneMIRROR WRITE CONSISTENCY: on/ACTIVEEACH LP COPY ON A SEPARATE PV ?: yes# sysdumpdev -Pp /dev/sysdumpnull# rmlv dumplv# mklv -t sysdump -y dumplv rootvg 20 hdisk1# sysdumpdev -Pp /dev/dumplv2)、逻辑去除磁盘把hdisk0从rootvg中去除#reducevg rootvg hdisk0在hdisk1上创建boot image#bosboot –ad /dev/hdisk1改变启动设备的顺序#bootlist –m normal hdisk1 cd0删除HDISK0#rmdev –dl hdisk0#lspv#lscfg –vl hdisk0以上2条命令不会显示hdisk0的相关信息,表示已删除hdisk03)、移出热插拔磁盘1. 当前系统登录用户身份应是root,如果不是以root用户身份登录进入系统;2. 在命令行输入“ smit”;3. 选择 System Storage Management (Physical and Logical Storage);4. 选择 Removable Disk Management;5. 选择 Remove a Disk;6. 从屏幕列示中选择要移出的硬盘hdisk0然后按下回车键;7. 按照屏幕上的指导来移出硬盘;8. 当你被询问“Are you sure?”, 按下回车键. 你选择的硬盘的电源显示灯将保持亮的状态;9. 物理上移出硬盘;10. 按下 F10退出smit菜单.4)、加回热插拔磁盘1. 物理安装新硬盘到硬盘槽里;2. 当前系统登录用户身份应是root,如果不是以root用户身份登录进入系统;3. 在命令行输入“ smit”;4. 选择 Devices.5. 选择 Install/Configure Devices Added After IPL 并且按下回车键.5)、重新镜像rootvg卷组下面的步骤认为用户有一个包含hdisk1的rootvg卷组并且准备镜像rootvg到一个新磁盘:hdisk0.1.把hdisk0加进rootvg卷组:#extendvg rootvg hdisk02.关掉rootvg的 QUORUM功能:#chvg -Qn rootvg3.镜像rootvg#mirrorvg -c 2 rootvg hdisk04.重新生成 boot image#bosboot -ad /dev/hdisk05.更新bootlist#bootlist -m normal hdisk0 hdisk1 cd06.重起系统#shutdown -Fr系统正常运行,完毕。
aix更换硬盘步骤

aix更换硬盘步骤硬盘更换5种情况一.如果disk mirrored,步骤如下:1.删除该磁盘上所以逻辑卷的复件unmirrorvg lv_xx 1 hdiskX 或者rmlvcopy lv_xx 1 hdiskX2.从卷组中删除该磁盘reducevg vg_name hdiskX3.删除该磁盘在ODM中的定义rmdev -dl hdiskX*4.连接新硬盘到系统如果是非热插拔需重启reboot5.添加新硬盘到卷阻extendvg vg_name hdiskY6.创建新的拷贝如果是rootvg:chvg -Qn rootvg(如果是单镜像)mirrorvg -s rootvg 或者mklvcopy(mirrorvg) lv_xx 2 hdiskY syncvg(varyonvg) -v rootvgbosboot -abootlist -m normal hdiskX hdiskYbootinfo -b二.如果磁盘没有镜像但在线状态1.连接新的硬盘到系统2.添加新硬盘到卷组中extendvg vg_name hdiskY3.移动数据到新的硬盘migratepv hdiskX hdiskY如果是rootvg:磁盘中有hd5migratepv -l hd5 hdiskX hdiskYbosboot -ad /dev/hdiskYchpv -c hdiskYbootlist -m normal hdiskX hdiskYmigratepv hdiskX hdiskYsysdumpdev -P /dev/hdX(如果是活动状态)4.从卷组中删除硬盘reducevg vg_name hdiskX5.删除该磁盘在ODM中的定义rmdev -dl hdiskX三.如果没有镜像磁盘彻底损坏,能够varyon状态下(卷组中有可用的磁盘)1.检查所有lv和文件系统在磁盘上的状态lspv -l hdsikY2.移除所有在坏盘上的文件系统的挂载umount /dev/lv_xx3.移除所有在坏盘上的lv和文件系统smit rmfs 或者 rmlv lv_xx4.从卷组中删除硬盘reducevg vg_name hdiskX5.删除该磁盘在ODM中的定义rmdev -dl hdiskY6.添加新硬盘到卷组中extendvg vg_name hdiskZ7.重新创建所以lv和文件系统在新的磁盘上smit crfs 或者 mklv -y lv_xx8.如果有数据的备份,从备份中恢复数据restore -rvqf /dev/rmt0四.如果没有镜像磁盘彻底损坏,不能够varyon状态下(卷组中没有可用的磁盘)如果是rootvg:1. 替换故障磁盘。
AIX rootvg换故障盘reducevg报错的解决办法

AIX rootvg换盘时reducevg报错的处理办法神州数码--沈飞龙2017-8 作为AIX系统管理员,rootvg的磁盘坏了一个,需要换盘,这是大家经常遇到的事情。
正常情况下,unmirrorvgreducevg换盘extendvgmirrorvg这些都不会遇到什么问题。
但总是有特殊情况,就是我在unmirrorvg成功之后,reducevg总是报错,需要unmount rootvg上的文件系统,生产环境,哪能说停就停呢?1 lsvg–p rootvg检查成员磁盘,确定哪个是救命稻草,哪个盘是坏了的。
从上图中看出,hdisk114磁盘损坏,需要更换。
按照正常步骤,1 unmirrorvgrootvg hdisk114;2 reducevg–d rootvg hdisk114;rmdev–dl hdisk114 –R ;4 hot plug;5 extendvgrootvghdiskXXX(新盘号);6 mirrorvgrootvg;7 bosboot–ad hdiskXXX (新盘号);8 bootlist–M normal –o 检查和设置启动盘。
但是,一切都那么顺利,我就不需要写这个文章了,在第2部,reducevg的时候,先是lg-dumplv 占用,解决以后,有要下umount /oracle 等其他好多个文件系统,我就意识到,这是一个非正常的系统,又是数据库,哪能随便停了让我换系统盘呢,想想办法吧。
首先,你得知道目前系统有点问题,所以操作要小心。
经过尝试多次失败,reducevg报错,于是,reducevg的运行思路,将此任务拆解,使用smit lv 来一个一个的lv进行拆除镜像Step 1Step 2Step 3Step 4 按F4 ,选择rootvg的一个lv注意:原来是镜像,所以是2,现在要拆除,要将2改为1,在PHYSICAL VOLUME names 要选择故障磁盘,如我们这个例子的hdisk114 ,回车,结果OK,那就是成功啦。
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. 使备用磁盘可用。
[案例] AIX更换故障磁盘12-11
![[案例] AIX更换故障磁盘12-11](https://img.taocdn.com/s3/m/b4258ad5e109581b6bd97f19227916888486b9f3.png)
[案例] AIX更换故障磁盘12-11AIX 更换故障磁盘一、确认卷组中有哪些磁盘,是否做有镜像[root@L2AFC-LC02:/]# lsvg -p datavgdatavg:PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk2 missing 528 127 105..00..00..00..22hdisk0 active 528 127 105..00..00..00..22[root@L2AFC-LC02:/]# lsvg -l datavgdatavg:LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINTdatalv jfs2 400 800 2 open/syncd /data1loglv00 jfs2log 1 2 2 open/stale N/A1.取消磁盘镜像[root@L2AFC-LC02:/]# unmirrorvg -c 1 datavg hdisk21.从datavg中去除损坏hdisk2[root@L2AFC-LC02:/]# reducevg datavg hdisk21.删除坏盘的raid信息2.smitty dev3.选择Disk Array4.选择Ibm SAS Disk Array5.选择Ibm SAS Disk Array Manager6.选择List SAS Disk Array Configuration7.选择对应的sissas卡,查看坏盘所在的RAID8.选择Delete a SAS Disk Array,删除刚才查到的sissas19.选择Change/Show SAS Disk Array10.选择Change/Show SAS pdisk11.选择pdisk2进行删除12.选择List SAS Disk Array Configuration 确认删除成功1.从系统中去掉坏盘[root@L2AFC-LC02:/]# rmdev -dl hdisk2[root@L2AFC-LC02:/]# rmdev -Rdl pdisk21.拔掉坏盘更换新盘2.重新搜索新盘驱动[root@L2AFC-LC02:/]# cfgmgr -v[root@L2AFC-LC02:/]# lsdev -Cc disk[root@L2AFC-LC02:/]# chdev -l hdisk2 -a pv=yes[root@L2AFC-LC02:/]# lspvhdisk0 00f9cda18c5158c7 datavg activehdisk1 00f9cda18c5197ea rootvg activehdisk2 00f9cda18c519ebf none nonehdisk3 00f9cd9e8c16fd13 rootvg activehdisk4 00f9cda13f7e088f caavg_private activehdisk5 00f9cda140dd5ed6 oravg concurrent1.为hdisk1 和新盘hdisk2重新配置RAID02.smitty dev3.选择Disk Array4.选择Ibm SAS Disk Array5.选择Ibm SAS Disk Array Manager6.选择Create an Array Candidate pdisk and Format to RAID block size,选择sissas17.选择所要创建的RAID组的形式:0,大小512KB,选择要加入的pdisk,把pdisk加入RAID组8.选择Create a SAS Disk Array,选择sissas1,创建RAID9.lspv确认1.将hdisk2重新加入datavg中[root@L2AFC-LC02:/]# extendvg datavg hdisk21.为datavg重新做镜像[root@L2AFC-LC02:/]# mirrorvg -c 2 datavg hdisk0 hdisk2[root@L2AFC-LC02:/]# lsvg -l datavgdatavg:LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINTdatalv jfs2 400 800 2 open/syncd /data1loglv00 jfs2log 1 2 2 open/stale N/A1.确认作业结果[root@L2AFC-LC02:/]# lsvg -p datavg [root@L2AFC-LC02:/]# lsvg -l datavg。
AIX5.3的磁盘镜像、更换操作汇总

AIX5.3的磁盘镜像、更换操作汇总1.如何在AIX里面用命令显示AIX是从那块物理硬盘启动的?显示设置的启动顺序,究竟是从哪块盘启#lslv -m hd5#bootinfo -b如果你只是想看mirror是否成功,那就用lslv -m hd5如果是想看当前是使用哪块盘引导启动的,那就用bootinfo -b2.做MIRROR时出错解决方法?# extendvg rootvg hdisk10516-1398 extendvg: The physical volume hdisk1, appears to belong toanother volume group. Use the force option to add this physical volumeto a volume group.-792 extendvg: Unable to extend volume group.解决:因为此hdisk1之前曾经被其它的VG(ROOTVG)使用过,所以你可以用加参数-f 或用smitty 强力创建。
#extendvg -f rootvg hdisk13.创建镜像#mirrorvg rootvg hdisk1 (默认创建2份镜像)#mirrorvg -c 3 rootvg hdisk1 (创建3份镜像)注意必须做镜像同步:Step 1: 重新创建两块硬盘的启动映象,执行下面的命令完成:#bosboot -ad hdisk1Step 2: 修改启动列表,按照下面的方法完成:#bootlist -m normal hdisk0 hdisk1 cd0Step 3: 查看启动列表是否修改成功,参照下面方法及输出:#bootlist -m normal -ohdisk0 blv=hd5hdisk1 blv=hd5cd0同步后在创建LV和文件系统的同步命令:#mirrorvg -S -c 2 rootvg说明:c参数:指出mirrorvg后每个LV必须有的副本数。
更换AIX硬盘步骤

POWER6 informationReplacing the disk drive using AIXUse this procedure to remove and replace a disk drive concurrently with the AIX® operating system.1.Access the unit by:a.Open the front rack door.b.Loosen the thumbscrew (A) on the right side of the cover.c.Slide the cover to the right and remove it from the system unitslot (B).2.Remove the disk drive as a resource:a.Log in as root user or use CE Login.b.At the command line, type diag and press Enter.c.Press Enter to continue.d.On the Function Selection display, select Task Selection.e.Select Hot Plug Task.f.Select RAID Hot Plug Devices.g.Select the adapter that is connected to the array that contains thedisk drive you want to replace and press Enter.h.Select Commit.i.On the Identify and Remove Resources display, select Identify.j.Select the disk drive you want to remove and press Enter.The disk drive slot enters the identify state. The concurrent maintenancelight for the slot begins flashing. The following figures show the locationsof the concurrent maintenance lights A. Verify that the flashing lightcorresponds to the location for the disk drive you want to remove, andpress Enter.The disk drive slot exits the identify state.Note: If the disk drive slot is not in the Remove state, contact your nextlevel of support.k.On the Identify and Remove Resources display, select Remove.A list of the disk drives that you can remove is shown. If the disk drive youwant to remove does not appear on the list, ask your system administratorto put the disk drive in the failed state before continuing with thisprocedure. For information, see AIX System Management Guide:Operating System and Devices.l.Select the disk drive you want to remove and press Enter.The disk drive slot enters the remove state and power is removed from theslot. The concurrent maintenance light for the slot begins flashing rapidly.3.Remove the disk drive by:a.Unlock the disk drive handle by squeezing it and pulling it out towardyou as shown.b.Support the bottom of the disk drive as you slide it out of the systemor expansion unit. Do not hold the disk drive by the handle.The concurrent maintenance light for the slot turns off when you removethe disk drive.4.5.Install the bezel on the new disk drive:a.Find the package that contains the new disk drive.Attention: Disk drives are fragile. Handle with care.b.Remove the disk drive from its static protective package.c.Unlock the handle of the replacement disk drive by squeezing andpulling it out toward you. If the handle is not all the way out, the disk drivewill not slide into the system.d.Attach the disk drive bezel (A) to the replacement disk drive asshown.e.Press in and then tighten the thumbscrew (B) to secure the bezel tothe disk drive.6.Install the disk drive:a.Support the bottom of the disk drive as you align it with the guiderails in the system unit. Do not hold the disk drive by the handle.b.Slide the disk drive into the system until it stops.c.Push the disk drive handle in until it locks.Note: It is important to ensure that when installing a disk drive, that thedrive is fully seated and all the way into the system.7.Add the new disk drive as a resource:a.Press Enter.The disk drive slot exits the Remove state and enters the Normal state.b.Exit to the RAID Hot-Plug Devices menu. Press the F3 or ESC 3 key toreturnc.Exit to the Task selection display.d.Select Log Repair Action.e.Select the disk drive that you replaced and then press Enter.f.Select Commit after you have made your selection and then pressEnter.g.Exit to the command line.8.To rebuild data on the replacement disk drive, refer to the information for thecontroller to which the disk drive is attached:∙If the disk drive is attached to a PCI-X SCSI RAID controller, see the PCI−X SCSI RAID Controller Reference Guide for AIX.∙If the disk drive is attached to a PCI SCSI RAID adapter (feature code 2498), see the PCI 4−Channel Ultra3 SCSI RAID Adapter ReferenceGuide.For more information, see the AIX System Management Guide: OperatingSystem and Devices.9.Go to Verifying a repair. This completes this procedure.Parent topic:Disk driveSend feedback | Rate this pageLast updated: Wed, May 01, 2013。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
当主机硬盘丢失
#lsvg -lp rootvg 结果
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk0 active 542 0 00..00..00..00..00
hdisk1 missing 542 0 00..00..00..00..00
#chpv -va hdisk1 看看能不能找回来
如果找不回来,则必须尽早予以跟换,跟换前必须做好备份!
先查看机器是否有磁带机,若无则
1、外置磁带机连接
#cfgmgr -v
#lsdev -Cc tape 看一下rmt0是不是avaiable
2、内置磁带机则直接备份
#smitty mksysb
3、查看硬盘的S/N,P/N号
#lscfg –vl hdisk*
查看物理卷
lspv
查看逻辑卷组
lsvg
查看在用的逻辑卷组
lsvg –o
# lsvg -o
#sysdumpdev –l
4、查看所有硬盘(包括逻辑盘)的状态
# lsdev -Cc disk
查看7133磁盘柜硬盘状态
#lsdev –Cc pdisk
5、把HDISK0从ROOTVG中不做MIRROW
#unmirrorvg rootvg hdisk0 (长时间40分钟)
查看物理卷
#lspv
这时HDISK0不在和HDISK1为MIRROR
把hdisk0从rootvg中去除
#reducevg rootvg hdisk0 (长时间0分2钟)
在HDISK1上创建boot image
#bosboot –ad hdisk1
改变启动设备的顺序
#bootlist –m normal hdisk1 cd0
删除HDISK0
#rmdev –l hdisk0 –d
#lspv
#lscfg –vl hdisk0
以上2条命令不会显示HDISK0的相关信息
(如果无法unmirrorvg 和rmdev 的话,就只能直接关机换盘了。
)
6、关机后将对应的硬盘予以跟换,如果是热插拔的则可以热跟换。
#shutdown –F
7、开机
lspv
发现多出HDISK4,而我们需要的是HDISK0
删除HDISK4
#rmdev –l hdisk4 –d
#cfgmgr
#chdev –l hdiskN –a pv=yes (pvID无时使用)
#lspv
发现多出HDISK0,HDISK4,可能是我前面删除HDISK0,没有做cfgmgr的原因删除HDISK4,HDISK0
#rmdev –l hdisk4 –d
#rmdev –l hdisk0 –d
#cfgmgr
#lspv
好了,HDISK0出现了
8、把HDISK0加到ROOTVG中并做镜像
#extendvg –f rootvg hdisk0
(由于之前直接换的盘,则ODM库可能坏
执行#synclvodm rootvg ,synclvodm是同步或者重建LVCB,ODM,VGDA。
或执行#redefinevg -d hdisk0 rootvg,换好的硬盘就能加入rootvg了)
做MIRROR
#mirrorvg –c 2 rootvg
查看PV
#lspv
OK
如果新盘无法认出来,lsdev –Cc disk 显示Miss盘的信息时,可能是以下原因:
# unmirrorvg -c 1 rootvg 0007899aba16f713
用这个命令执行有问题,只能够用rmlvcopy hd5 1 hdis0来执行,把hdisk0上面的哪个copy 删除掉
rmlvcopy hd5 1 hdis0
rmlvcopy hd6 1 hdis0
rmlvcopy hd8 1 hdis0
rmlvcopy hd4 1 hdis0
rmlvcopy hd2 1 hdis0
rmlvcopy hd9var 1 hdis0
rmlvcopy hd3 1 hdis0
rmlvcopy hd1 1 hdis0
做完这个操作后,系统正常
用lsvg -l rootvg看系统,系统正常
用lsvg -p rootvg
看到hdisk0还在,用reducevg rootvg 0007899aba16f713(原来hdisk0的pvid)
再次用lsvg -p rootvg查看,hdisk0已经不在了,ok,到现在为止,问题,解决
后面的问题就是做系统mirror
在之前的操作可以先试试以下的命令:
1.用rmlvcopy命令删除lv的镜像,可以删除一个(我做实验的时候,只删除一个lv,然
后就可以用unmirrorvg了),也可以一个一个全部删除。
2. 用unmirrorvg rootvg pvid 不要加hdisk参数,加pvid参数,这时候应该可以删除,
得到pvid的方法:lsvg -p rootvg就可以看到rootvg里这两块硬盘的pvid。
3. 用reducevg rootvg pvid 从卷组里删除这块硬盘
在HDISK0,HDISK1上创建boot image
#bosboot –ad hdisk0
#bosboot –ad hdisk1
改变启动设备的顺序
#bootlist –m normal hdisk0 hdisk1 cd0。