AIX 系统下做 rootvg


发现硬盘:

# lsdev -Cc disk

hdisk0 Available 08-08-00-4,0 16 Bit LVD SCSI Disk Drive

hdisk1 Available 08-08-00-5,0 16 Bit LVD SCSI Disk Drive


# lspv

hdisk0 00ce898aff3e9f74 rootvg active

hdisk1 none None


重新扫描硬盘:

# cfgmgr �Cv


查看PV容量是否一致:

# prtconf | grep disk

hdisk0 active 546 445 109..105..13..109..109

+ hdisk0 U787A.001.DPM1TZX-P1-T10-L4-L0 16 Bit LVD SCSI Disk Drive (73400 MB)

+ hdisk1 U787A.001.DPM1TZX-P1-T10-L5-L0 16 Bit LVD SCSI Disk Drive (73400 MB)


检查PV是否为AIX支持的引导设备(返回值为1说明可以作为引导设备,如返回其他值则此盘不是候选)

# bootinfo -B hdisk

1


激活PV,则赋值pvid

# chdev -l hdisk1 -a pv=yes

hdisk1 changed

# lspv

hdisk0 00ce898aff3e9f74 rootvg active

hdisk1 00ce898ab8144cd9 None active

hdisk2 none None

hdisk3 00ce898a00606e9c None


hdisk1加入rootvg

# extendvg rootvg hdisk1(此hdisk1已加入其它卷)

0516-1398 extendvg: The physical volume hdisk1, appears to belong to

another volume group. Use the force option to add this physical volume

to a volume group.

0516-792 extendvg: Unable to extend volume group.



强行把hdisk1加入rootvg

# extendvg -f rootvg hdisk1

# lspv

hdisk0 00ce898aff3e9f74 rootvg active

hdisk1 00ce898ab8144cd9 rootvg active

hdisk2 none None

hdisk3 00ce898a00606e9c None


单镜像,关闭QUORUM,先查看QUORUM的状态:

# lsvg rootvg

VOLUME GROUP: rootvg VG IDENTIFIER: 00ce898a00004c00000001420d0ddd10

VG STATE: active PP SIZE: 128 megabyte(s)

VG PERMISSION: read/write TOTAL PPs: 1092 (139776 megabytes)

MAX LVs: 256 FREE PPs: 991 (126848 megabytes)

LVs: 9 USED PPs: 101 (12928 megabytes)

OPEN LVs: 8 QUORUM: 2 (Enabled)

TOTAL PVs: 2 VG DESCRIPTORS: 3

STALE PVs: 0 STALE PPs: 0

ACTIVE PVs: 2 AUTO ON: yes

MAX PPs per VG: 32512

MAX PPs per PV: 1016 MAX PVs: 32

LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no

HOT SPARE: no BB POLICY: relocatable


关闭QUORUM

# chvg -Qn rootvg

0516-1804 chvg: The quorum change takes effect immediately.


查看状态:

# lsvg rootvg

VOLUME GROUP: rootvg VG IDENTIFIER: 00ce898a00004c00000001420d0ddd10

VG STATE: active PP SIZE: 128 megabyte(s)

VG PERMISSION: read/write TOTAL PPs: 1092 (139776 megabytes)

MAX LVs: 256 FREE PPs: 991 (126848 megabytes)

LVs: 9 USED PPs: 101 (12928 megabytes)

OPEN LVs: 8 QUORUM: 1 (Disabled)

TOTAL PVs: 2 VG DESCRIPTORS: 3

STALE PVs: 0 STALE PPs: 0

ACTIVE PVs: 2 AUTO ON: yes

MAX PPs per VG: 32512

MAX PPs per PV: 1016 MAX PVs: 32

LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no

HOT SPARE: no BB POLICY: relocatable




建立rootvg所有的lv的镜像-卷组镜像(先查看,1LPs对应1PPs,执行命令后,查看1LPs对应2PPs)

# 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 4 4 1 open/syncd N/A

hd8 jfs2log 1 1 1 open/syncd N/A

hd4 jfs2 1 1 1 open/syncd /

hd2 jfs2 27 27 1 open/syncd /usr

hd9var jfs2 1 1 1 open/syncd /var

hd3 jfs2 64 64 1 open/syncd /tmp

hd1 jfs2 1 1 1 open/syncd /home

hd10opt jfs2 1 1 1 open/syncd /opt

# mirrorvg -s rootvg

0516-1126 mirrorvg: rootvg successfully mirrored, user should perform

bosboot of system to initialize boot records. Then, user must modify

bootlist to include: hdisk1 hdisk0.

# lsvg -l rootvg

rootvg:

LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT

hd5 boot 1 2 2 closed/stale N/A

hd6 paging 4 8 2 open/stale N/A

hd8 jfs2log 1 2 2 open/stale N/A

hd4 jfs2 1 2 2 open/stale /

hd2 jfs2 27 54 2 open/stale /usr

hd9var jfs2 1 2 2 open/stale /var

hd3 jfs2 64 128 2 open/stale /tmp

hd1 jfs2 1 2 2 open/stale /home

hd10opt jfs2 1 2 2 open/stale /opt

做镜像同步:

# syncvg -v rootvg


在两块盘上创建引导信息,

# lslv -l hd5

hd5:N/A

PV COPIES IN BAND DISTRIBUTION

hdisk0 001:000:000 100% 001:000:000:000:000

hdisk1 001:000:000 100% 001:000:000:000:000

# bosboot -a

bosboot: Boot image is 37849 512 byte blocks.



# bosboot -ad /dev/hdisk0

bosboot: Boot image is 37849 512 byte blocks.

# bosboot -ad /dev/hdisk1

bosboot: Boot image is 37849 512 byte blocks.


更新引导设备顺序,实现单机bos容错,系统从hdisk0进行引导,当hdisk0不可用时将从hdisk1进行引导,以提供单机容错。

# bootlist -m normal �Co

hdisk0 blv=hd5

# bootlist -m normal hdisk0 hdisk1

# bootlist -m normal �Co

hdisk0 blv=hd5

hdisk1 blv=hd5


重启系统

# sync

# shutdown -Fr

如果前面步骤执行了quorum关闭的操作,必须重新启动系统之后quorum才会生效。


引导过程检查

# bootinfo -b


你可能感兴趣的:(AIX,mirror,ROOTVG)