分类: AIX
2013-02-01 18:30:44
2块硬盘互做镜像,对操作系统进行保护
1、
# lspv
hdisk0 0006477a94412985 rootvg active
hdisk1 0006477ad33d5a59 None
2、将hdisk1添加到rootvg
# smitty extendvg
Add a Physical Volume to a Volume Group
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
Force the creation of a volume group? no +
* VOLUME GROUP name [rootvg] +
* PHYSICAL VOLUME names [hdisk1] + //要添加的盘hdisk1
# lspv //hdisk1已加到rootvg中
hdisk0 0006477a94412985 rootvg active
hdisk1 0006477ad33d5a59 rootvg active
# lsvg -l rootvg //LV还没有成倍数
rootvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
hd5 boot 1 1 1 closed/syncd N/A
hd6 paging 16 16 1 open/syncd N/A
hd8 jfslog 1 1 1 open/syncd N/A
hd4 jfs 1 1 1 open/syncd /
hd2 jfs 42 42 1 open/syncd /usr
hd9var jfs 2 2 1 open/syncd /var
hd3 jfs 32 32 1 open/syncd /tmp
hd1 jfs 1 1 1 open/syncd /home
hd10opt jfs 2 2 1 open/syncd /opt
lv00 jfs 94 94 1 open/syncd /fix
fslv01 jfs 314 314 1 open/syncd /oracle
3、做镜像
# smitty mirrorvg
[Entry Fields]
* VOLUME GROUP name rootvg
Mirror sync mode [Background] + 选后台模式,
PHYSICAL VOLUME names []
Number of COPIES of each logical 2 +
partition
Keep Quorum Checking On? no +
Create Exact LV Mapping? no +
4、查看镜像情况,成2倍
# 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 16 32 2 open/syncd N/A
hd8 jfslog 1 2 2 open/syncd N/A
hd4 jfs 1 2 2 open/syncd /
hd2 jfs 42 84 2 open/stale /usr
hd9var jfs 2 4 2 open/stale /var
hd3 jfs 32 64 2 open/stale /tmp
hd1 jfs 1 2 2 open/stale /home
hd10opt jfs 2 4 2 open/stale /opt
lv00 jfs 94 188 2 open/stale /fix
fslv01 jfs 314 628 2 open/stale /oracle
# lsvg -p rootvg
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk0 active 542 36 00..00..00..00..36
hdisk1 active 1093 587 218..109..00..41..219
//2个hdisk使用的PP数目相同,都是506
5、添加启动顺序
# bootlist -m normal -o
-
hdisk0 blv=hd5
# bosboot -ad /dev/hdisk1
bosboot: Boot image is 37856 512 byte blocks.
# bootlist -m normal hdisk0 hdisk1
# bootlist -m normal -o
hdisk0 blv=hd5
hdisk1 blv=hd5
如果同步还没完成,AIX系统重启,重启完后VG会自动继续同步,不用人工干预
如果其中一块盘有问题,不影响系统使用