AIX主机更换损坏的系统盘!

# lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            removed            542         264         109..00..00..46..109
hdisk1            active            542         278         88..00..00..81..109

# lsvg -l rootvg
rootvg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
hd5                 boot       1     2     2    closed/syncd  N/A
hd6                 paging     64    128   2    open/syncd    N/A
hd8                 jfslog     1     2     2    open/syncd    N/A
hd4                 jfs        6     12    2    open/syncd    /
hd2                 jfs        127   254   2    open/syncd    /usr
hd9var              jfs        4     8     2    open/syncd    /var
hd3                 jfs        37    74    2    open/syncd    /tmp
hd1                 jfs        3     6     2    open/syncd    /home
hd10opt             jfs        21    42    2    open/syncd    /opt
dumplv              sysdump    14    14    1    open/syncd    N/A
 
*Here your checking to make sure there’s a 1:2 relationship, meaning that there are copies.  Notice dumplv.  It’s not copied so we need to make sure dumplv data isn’t on the failing disk.  To check, run;

$ lslv -l dumplv
dumplv:N/A
PV                COPIES        IN BAND       DISTRIBUTION
hdisk1            014:000:000   100%          000:014:000:000:000

# bootinfo -b
hdisk1

This is telling us that the logical volume dumplv is on hdisk1.  If hdisk0 is the failing disk, then we are okay.  Otherwise, we would have to migrate the data over to the good drive and proceed.

# unmirrorvg rootvg hdisk0
# reducevg rootvg hdisk0
# rmdev -l hdisk0 –d

Before you power down, it’s a good idea to check the system to make sure it will boot from the good drive.  Do that by performing;
# bootinfo -b
hdisk1


This tells you what drive it was last booted up.  We want to change this to boot to the new drive, so;

# bosboot -ad /dev/hdisk1

And check bootlist

# bootlist –m normal –o
hdisk1
 
NOW WE CAN POWER DOWN THE BOX AND REPLACE THE DRIVE

Once disk has been replaced, power up the server.  Once at command prompt, run;

# cfgmgr

This will install the new device and allow the OS to see it.

# lsdev -Cc disk

hdisk0  Available 40-60-00-4,0 16 Bit LVD SCSI Disk Drive
hdisk1  Available 40-60-00-8,0 16 Bit LVD SCSI Disk Drive

Make sure that the OS says it’s available.  If it is, we can assign it to a volume group.

# extendvg rootvg hdisk0

This will assign it a PVID and assign it to the volumegroup rootvg to make it available for use.  Now we can mirror;

# mirrovg rootvg

This will take a little while as it’s taking all data now on hdisk0 and making a copy to hdisk1.

# lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            542         264         109..00..00..46..109
hdisk1            active            542         278         88..00..00..81..109
Once it’s mirroring, we can make sure it’s assigned to rootvg by doing the above.  We can also check to make sure there’s copies;

# lsvg -l rootvg
rootvg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
hd5                 boot       1     2     2    closed/syncd  N/A
hd6                 paging     64    128   2    open/syncd    N/A
hd8                 jfslog     1     2     2    open/syncd    N/A
hd4                 jfs        6     12    2    open/syncd    /
hd2                 jfs        127   254   2    open/syncd    /usr
hd9var              jfs        4     8     2    open/syncd    /var
hd3                 jfs        37    74    2    open/syncd    /tmp
hd1                 jfs        3     6     2    open/syncd    /home
hd10opt             jfs        21    42    2    open/syncd    /opt
dumplv              sysdump    14    14    1    open/syncd    N/A

Now we need to modify the bosboot to recreate the boot image;

# bosboot –a
hdisk1
# bosboot -ad /dev/hdisk0

Double check your bootlist to make sure hdisk0 is in there;

# bootlist –m normal –o
hdisk0
hdisk1

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7597006/viewspace-539748/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7597006/viewspace-539748/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值