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 rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 2 2 closed/syncd N/A
hd6 paging 244 488 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 8 16 2 open/syncd /
hd2 jfs2 40 80 2 open/syncd /usr
hd9var jfs2 40 80 2 open/syncd /var
hd3 jfs2 16 32 2 open/syncd /tmp
hd1 jfs2 40 80 2 open/syncd /home
hd10opt jfs2 80 160 2 open/syncd /opt
lg_dumplv sysdump 16 16 1 open/syncd N/A
# sysdumpdev -l
primary /dev/lg_dumplv
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
# lslv -l lg_dumplv
lg_dumplv:N/A
PV COPIES IN BAND DISTRIBUTION
hdisk0 016:000:000 0% 000:000:000:000:016
目前dump device只有一个,在hdisk0上,如果hdisk0出现故障,系统可以从hdisk1启动,系统运行也不会有问题,只是没有dump device,所以如果需要更换hdisk0,需要特别注意一些别的问题,具体步骤:
1 unmirror rootvg
smitty unmirrorvg
或者
unmirrorvg rootvg hdisk0
2 查看unmirror后vg的状态
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 244 244 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 8 8 1 open/syncd /
hd2 jfs2 40 40 1 open/syncd /usr
hd9var jfs2 40 40 1 open/syncd /var
hd3 jfs2 16 16 1 open/syncd /tmp
hd1 jfs2 40 40 1 open/syncd /home
hd10opt jfs2 80 80 1 open/syncd /opt
lg_dumplv sysdump 16 16 1 closed/syncd N/A
3 Reduce VG
smitty 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_dumplv
lg_dumplv:N/A
PV COPIES IN BAND DISTRIBUTION
hdisk0 016:000:000 0% 000:000:000:000:016
3.2 修改dum sysdumpdev -P -p /dev/sysdumpnull
primary /dev/sysdumpnull
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
3.3 reducevg
smitty reducevg
0516-914 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)?y-------------------缺省删除lg_dumplv
rmlv: Logical volume lg_dumplv is removed.
3.4 查看dump device的状态
# lsvg -l rootvg
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 244 244 1 open/syncd N/A
hd8 jfs2log 1 1 1 open/syncd N/A
hd4 jfs2 8 8 1 open/syncd /
hd2 jfs2 40 40 1 open/syncd /usr
hd9var jfs2 40 40 1 open/syncd /var
hd3 jfs2 16 16 1 open/syncd /tmp
hd1 jfs2 40 40 1 open/syncd /home
hd10opt jfs2 80 80 1 open/syncd /opt
4 更换hdisk0
# cfgmgr -v
# lspv
5 extendvg
# smitty extendvg
或者
# extendvg rootvg hdisk0
6.镜像根盘
# smitty mirrorvg
7. bosboot -ad /dev/hdisk1
8. 设置启动顺序
# bootlist -m normal hdisk0 hdisk1 cd0
# bootlist -o -m normal
hdisk0 blv=hd5
hdisk1 blv=hd5
cd0
# 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 244 488 2 open/stale N/A
hd8 jfs2log 1 2 2 open/stale N/A
hd4 jfs2 8 16 2 open/stale /
hd2 jfs2 40 80 2 open/stale /usr
hd9var jfs2 40 80 2 open/stale /var
hd3 jfs2 16 32 2 open/stale /tmp
hd1 jfs2 40 80 2 open/stale /home
hd10opt jfs2 80 160 2 open/stale /opt
9.重新创建dump lv
# mklv -t sysdump -y lg_dumplv rootvg 16 hdisk0
lg_dumplv
10.修改主用dump device
# sysdumpdev -Pp /dev/lg_dumplv
primary /dev/lg_dumplv
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
dump compression ON
# 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 244 488 2 open/syncd N/A
hd8 jfs2log 1 2 2 open/syncd N/A
hd4 jfs2 8 16 2 open/syncd /
hd2 jfs2 40 80 2 open/stale /usr
hd9var jfs2 40 80 2 open/stale /var
hd3 jfs2 16 32 2 open/stale /tmp
hd1 jfs2 40 80 2 open/stale /home
hd10opt jfs2 80 160 2 open/stale /opt
lg_dumplv sysdump 16 16 1 open/syncd N/A
http://bldmickey.blog.sohu.com/55699977.html