扩展fs发现pv状态变成removed,用chpv -v -a hdisk即可,至于什么原因造成removed?

一.解除vg mirrorunmirrorvg vgname hdiskx hdiskxx,后面跟被踢掉的hdisk

root@SNCPRD:/# lsvg -p p40datavg
p40datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk5 active 999 838 200..79..159..200..200
hdisk6 active 999 839 200..40..199..200..200
hdisk7 active 999 0 00..00..00..00..00
hdisk8 active 999 658 200..00..58..200..200
hdisk1 removed 999 878 200..79..199..200..200
hdisk2 removed 999 839 200..40..199..200..200
hdisk3 removed 999 0 00..00..00..00..00
hdisk4 removed 999 658 200..00..58..200..200
#
root@SNCPRD:/# lsvg -l p40datavg
p40datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv02 jfs2log 1 2 2 open/stale N/A
dvdlv jfs2 120 240 2 open/stale /DVD
upgradeoslv jfs2 40 80 2 open/stale /upgradeAIX
sapmntlv jfs2 20 40 2 open/stale /sapmnt
usrsaplv jfs2 120 240 2 open/stale /usr/sap
oraclelv jfs2 80 160 2 open/stale /oracle
p40oralv jfs2 1200 2400 4 open/stale /oracle/P40
sapdblv jfs2 40 80 2 open/stale /sapdb
paging00 paging 40 40 1 closed/syncd N/A
root@SNCPRD:/# lspv
hdisk0 0001d23ce361a58d rootvg active
hdisk5 00067a2b42f1a0e9 p40datavg active
hdisk1 00067a2b646c51d3 p40datavg active
hdisk2 00067a2b646c52c8 p40datavg active
hdisk3 00067a2b646c53b0 p40datavg active
hdisk4 00067a2b646c54b2 p40datavg active
hdisk6 00067a2b42f1a13b p40datavg active
hdisk7 00067a2b42f1a182 p40datavg active
hdisk8 00067a2b42f1a1bd p40datavg active
hdisk9 0001d23c26e6ffd2 rootvg active
root@SNCPRD:/# unmirrorvg p40datavg hdisk1 hdisk2 hdisk3 hdisk4
0516-1804 chvg: The quorum change takes effect immediately.

二.从vg里踢掉pvreducevg hdiskx hdiskxx

root@SNCPRD:/# lsvg -p p40datavg
p40datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk5 active 999 838 200..79..159..200..200
hdisk6 active 999 839 200..40..199..200..200
hdisk7 active 999 0 00..00..00..00..00
hdisk8 active 999 658 200..00..58..200..200
hdisk1 removed 999 999 200..200..199..200..200
hdisk2 removed 999 999 200..200..199..200..200
hdisk3 removed 999 999 200..200..199..200..200
hdisk4 removed 999 999 200..200..199..200..200
root@SNCPRD:/# lsvg -l p40datavg
p40datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv02 jfs2log 1 1 1 open/syncd N/A
dvdlv jfs2 120 120 1 open/syncd /DVD
upgradeoslv jfs2 40 40 1 open/syncd /upgradeAIX
sapmntlv jfs2 20 20 1 open/syncd /sapmnt
usrsaplv jfs2 120 120 1 open/syncd /usr/sap
oraclelv jfs2 80 80 1 open/syncd /oracle
p40oralv jfs2 1200 1200 2 open/syncd /oracle/P40
sapdblv jfs2 40 40 1 open/syncd /sapdb
paging00 paging 40 40 1 closed/syncd N/A
root@SNCPRD:/# reducevg p40datavg hdisk1 hdisk2 hdisk3 hdisk4
root@SNCPRD:/# lsvg -p p40datavg
p40datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk5 active 999 838 200..79..159..200..200
hdisk6 active 999 839 200..40..199..200..200
hdisk7 active 999 0 00..00..00..00..00
hdisk8 active 999 658 200..00..58..200..200

三.将pv重新加入vgextendvg vgname hdiskx hdiskxx

root@SNCPRD:/# extendvg p40datavg hdisk1 hdisk2 hdisk3 hdisk4
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-1398 extendvg: The physical volume hdisk2, appears to belong to
another volume group. Use the force option to add this physical volume
to a volume group.
0516-1398 extendvg: The physical volume hdisk3, appears to belong to
another volume group. Use the force option to add this physical volume
to a volume group.
0516-1398 extendvg: The physical volume hdisk4, 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.
root@SNCPRD:/# extendvg -f p40datavg hdisk1 hdisk2 hdisk3 hdisk4
root@SNCPRD:/# lsvg -p p40datavg
p40datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk5 active 999 838 200..79..159..200..200
hdisk6 active 999 839 200..40..199..200..200
hdisk7 active 999 0 00..00..00..00..00
hdisk8 active 999 658 200..00..58..200..200
hdisk1 active 999 999 200..200..199..200..200
hdisk2 active 999 999 200..200..199..200..200
hdisk3 active 999 999 200..200..199..200..200
hdisk4 active 999 999 200..200..199..200..200

五.smitty vg - mirror vg


另外一个比较悲剧,lv镜像落在了同一边的存储,恰好这个存储的pv变成了removed状态

一.解除vg mirror

$ lsvg p50datavg
VOLUME GROUP: p50datavg VG IDENTIFIER: 00067a4b0000d4000000013d431fc6db
VG STATE: active PP SIZE: 256 megabyte(s)
VG PERMISSION: read/write TOTAL PPs: 7992 (2045952 megabytes)
MAX LVs: 512 FREE PPs: 790 (202240 megabytes)
LVs: 8 USED PPs: 7202 (1843712 megabytes)
OPEN LVs: 7 QUORUM: 1 (Disabled)
TOTAL PVs: 8 VG DESCRIPTORS: 4
STALE PVs: 4 STALE PPs: 413
ACTIVE PVs: 4 AUTO ON: no
MAX PPs per VG: 130048
MAX PPs per PV: 1016 MAX PVs: 128
LTG size (Dynamic): 128 kilobyte(s) AUTO SYNC: no
HOT SPARE: no BB POLICY: relocatable
PV RESTRICTION: none INFINITE RETRY: no
#
$ lsvg -p p50datavg
p50datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk5 active 999 0 00..00..00..00..00
hdisk6 active 999 0 00..00..00..00..00
hdisk7 active 999 415 15..00..00..200..200
hdisk8 active 999 0 00..00..00..00..00
hdisk1 removed 999 0 00..00..00..00..00
hdisk2 removed 999 375 00..00..00..175..200
hdisk3 removed 999 0 00..00..00..00..00
hdisk4 removed 999 0 00..00..00..00..00
# unmirrorvg p50datavg hdisk1 hdisk2 hdisk3 hdisk4
0516-076 lreducelv: Cannot remove last good copy of stale partition.
Resynchronize the partitions with syncvg and try again.
0516-922 rmlvcopy: Unable to remove logical partition copies from
logical volume p50oralv.
0516-1135 unmirrorvg: The unmirror of the volume group failed.
The volume group is still partially or fully mirrored.
#
6005076802810A058800000000000168

二.removed状态的pv上有正常的copied,是不能被踢掉的

# lscfg -vpl hdisk52
hdisk52 U78AF.001.WZS08C2-P1-C35-L1-T1-W500507680225BF9E-L24000000000000 MPIO FC 2145 Manufacturer................IBM
Machine Type and Model......2145
ROS Level and ID............0000
Device Specific.(Z0)........0000063268181002
Device Specific.(Z1)........0200a04
Serial Number...............6005076802810A058800000000000168
#
#
PLATFORM SPECIFIC
#
Name: disk
Node: disk
Device Type: block
#
vhost 1 SRM
mkvdev -vdev hdisk52 -vadapter vhost1 -dev p50bak
#
backup full database format '/backup/%d_whole_%T_%u_%t_%s_%p' include current controlfile plus archivelog;
channel ORA_DISK_1: starting piece 1 at 05-MAY-18
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup plus archivelog command at 05/05/2018 23:14:18
ORA-19502: write error on file "/oracle/P50/oraflash/P50/backupset/2018_05_05/o1_mf_annnn_TAG20180505T231347_fgvlkvq4_.bkp", block number 1906688 (block size=512)
ORA-27063: number of bytes read/written is incorrect
IBM AIX RISC System/6000 Error: 5: I/O error
Additional information: -1
Additional information: 1048576
#
EAA3D429 0505222318 U S LVDD PHYSICAL PARTITION MARKED STALE
26120107 0505222318 U S LIBLVM PHYSICAL VOLUME DEFINED AS MISSING
26120107 0505222318 U S LIBLVM PHYSICAL VOLUME DEFINED AS MISSING
26120107 0505222318 U S LIBLVM PHYSICAL VOLUME DEFINED AS MISSING
26120107 0505222318 U S LIBLVM PHYSICAL VOLUME DEFINED AS MISSING
A6DF45AA 0505221118 I O RMCdaemon The daemon is started.
2BFA76F6 0505221018 T S SYSPROC SYSTEM SHUTDOWN BY USER
9DBCFDEE 0505221118 T O errdemon ERROR LOGGING TURNED ON
192AC071 0505220918 T O errdemon ERROR LOGGING TURNED OFF
#
bmviewer pts/1 172.16.3.28 May 05 23:14 still logged in.
bmviewer pts/0 172.16.3.28 May 05 22:50 still logged in.
bmviewer pts/0 172.16.3.28 May 05 22:13 - 22:46 (00:32)
reboot ~ May 05 22:11
shutdown pts/0 May 05 22:09
bmviewer pts/0 172.16.3.28 May 05 22:05 - System is halted by system administrator. (00:03)
#
PV Status: hdisk5 00067a4b431fc609 PVACTIVE
hdisk6 00067a4b431fc646 PVACTIVE
hdisk7 00067a4b431fc684 PVACTIVE
hdisk8 00067a4b431fc6c1 PVACTIVE
hdisk1 00067a4b638229b5 PVREMOVED
hdisk2 00067a4b63822a98 PVREMOVED
hdisk3 00067a4b63822b76 PVREMOVED
hdisk4 00067a4b63822c49 PVREMOVED
varyonvg: Volume group p50datavg is varied on.
p50datavg
PV Status: hdisk5 00067a4b431fc609 PVACTIVE
hdisk6 00067a4b431fc646 PVACTIVE

三.检查lv的pp分布

# lslv -m p50oralv |awk '{print $3,$5}'|uniq
PV1 PV2
hdisk3 hdisk8
hdisk1 hdisk5
hdisk2 hdisk5
hdisk1 hdisk5
hdisk1 hdisk6
hdisk4 hdisk6
hdisk4 hdisk7
hdisk1 hdisk4
hdisk1 hdisk7
hdisk2 hdisk7
# lsvg -p p50datavg
p50datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk5 active 999 0 00..00..00..00..00
hdisk6 active 999 0 00..00..00..00..00
hdisk7 active 999 415 15..00..00..200..200
hdisk8 active 999 0 00..00..00..00..00
hdisk1 removed 999 41 00..41..00..00..00
hdisk2 removed 999 475 00..100..00..175..200
hdisk3 removed 999 40 00..40..00..00..00
hdisk4 removed 999 120 00..120..00..00..00
#

pv1 2 3 4一组,pv5 6 7 8一组,p50oralv上一个对应hdisk1 hdisk4落在了同一个存储上


备份数据

1.将这4个removed的盘在V7000上做flashcopy,挂载到新的AIX主机,
mkvdev -vdev hdisk3 -vadapter vhost0 -dev p50_data01
mkvdev -vdev hdisk4 -vadapter vhost0 -dev p50_data02
mkvdev -vdev hdisk5 -vadapter vhost0 -dev p50_data03
mkvdev -vdev hdisk6 -vadapter vhost0 -dev p50_data04
mkvdev -vdev hdisk7 -vadapter vhost0 -dev p50_bak
2.在vioc强制导入vg
importvg -y datavg -f hdiskxx
3.数据库可以正常启动


修复过程

# chpv -v a hdisk1
# lsvg -p p50datavg
p50datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk5 active 999 0 00..00..00..00..00
hdisk6 active 999 0 00..00..00..00..00
hdisk7 active 999 415 15..00..00..200..200
hdisk8 active 999 0 00..00..00..00..00
hdisk1 active 999 41 00..41..00..00..00
hdisk2 removed 999 475 00..100..00..175..200
hdisk3 removed 999 40 00..40..00..00..00
hdisk4 removed 999 120 00..120..00..00..00
SRMPRD:p50adm 11> lsvg -l p50datavg
p50datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 open/syncd N/A
dvdlv jfs2 100 100 1 open/syncd /DVD
upgradeoslv jfs2 40 40 1 open/syncd /upgradeAIX
sapmntlv jfs2 40 40 1 open/syncd /sapmnt
usrsaplv jfs2 40 40 1 open/syncd /usr/sap
oraclelv jfs2 80 80 1 open/syncd /oracle
p50oralv jfs2 3200 6400 8 open/syncd /oracle/P50
paging00 paging 100 200 2 open/syncd N/A
SRMPRD:p50adm 12> lsvg -p p50datavg
p50datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk5 active 999 0 00..00..00..00..00
hdisk6 active 999 0 00..00..00..00..00
hdisk7 active 999 415 15..00..00..200..200
hdisk8 active 999 0 00..00..00..00..00
hdisk1 active 999 41 00..41..00..00..00
hdisk2 active 999 475 00..100..00..175..200
hdisk3 active 999 40 00..40..00..00..00
hdisk4 active 999 120 00..120..00..00..00

vg镜像不完整,p50oralv有2个pp,其他都是1个pp


一.检查pv的pp状态

lspv -p hdisk1
lspv -p hdisk2
lspv -p hdisk3
lspv -p hdisk4
lspv -p hdisk5
lspv -p hdisk6
lspv -p hdisk7
lspv -p hdisk8
#
SRMPRD:p50adm 24> hdisk1:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-200 used outer edge p50oralv jfs2 /oracle/P50
201-241 free outer middle
242-400 used outer middle p50oralv jfs2 /oracle/P50
401-599 used center p50oralv jfs2 /oracle/P50
600-799 used inner middle p50oralv jfs2 /oracle/P50
800-999 used inner edge p50oralv jfs2 /oracle/P50
SRMPRD:p50adm 25> lspv -p hdisk2
hdisk2:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-200 used outer edge p50oralv jfs2 /oracle/P50
201-300 free outer middle
301-400 used outer middle p50oralv jfs2 /oracle/P50
401-500 used center paging00 paging N/A
501-599 used center p50oralv jfs2 /oracle/P50
600-624 used inner middle p50oralv jfs2 /oracle/P50
625-799 free inner middle
800-999 free inner edge
SRMPRD:p50adm 26> lspv -p hdisk3
hdisk3:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-200 used outer edge p50oralv jfs2 /oracle/P50
201-240 free outer middle
241-400 used outer middle p50oralv jfs2 /oracle/P50
401-599 used center p50oralv jfs2 /oracle/P50
600-799 used inner middle p50oralv jfs2 /oracle/P50
800-999 used inner edge p50oralv jfs2 /oracle/P50
SRMPRD:p50adm 27> lspv -p hdisk4
hdisk4:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-200 used outer edge p50oralv jfs2 /oracle/P50
201-320 free outer middle
321-400 used outer middle p50oralv jfs2 /oracle/P50
401-599 used center p50oralv jfs2 /oracle/P50
600-799 used inner middle p50oralv jfs2 /oracle/P50
800-999 used inner edge p50oralv jfs2 /oracle/P50
SRMPRD:p50adm 28> lspv -p hdisk5
hdisk5:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-200 used outer edge p50oralv jfs2 /oracle/P50
201-201 used outer middle loglv00 jfs2log N/A
202-241 used outer middle usrsaplv jfs2 /usr/sap
242-400 used outer middle p50oralv jfs2 /oracle/P50
401-599 used center p50oralv jfs2 /oracle/P50
600-799 used inner middle p50oralv jfs2 /oracle/P50
800-999 used inner edge p50oralv jfs2 /oracle/P50
SRMPRD:p50adm 29> lspv -p hdisk6
hdisk6:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-200 used outer edge p50oralv jfs2 /oracle/P50
201-300 used outer middle dvdlv jfs2 /DVD
301-400 used outer middle p50oralv jfs2 /oracle/P50
401-599 used center p50oralv jfs2 /oracle/P50
600-799 used inner middle p50oralv jfs2 /oracle/P50
800-999 used inner edge p50oralv jfs2 /oracle/P50
SRMPRD:p50adm 30> lspv -p hdisk7
hdisk7:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-15 free outer edge
16-200 used outer edge p50oralv jfs2 /oracle/P50
201-240 used outer middle upgradeoslv jfs2 /upgradeAIX
241-320 used outer middle oraclelv jfs2 /oracle
321-400 used outer middle p50oralv jfs2 /oracle/P50
401-500 used center paging00 paging N/A
501-599 used center p50oralv jfs2 /oracle/P50
600-799 free inner middle
800-999 free inner edge
SRMPRD:p50adm 31> lspv -p hdisk8
hdisk8:
PP RANGE STATE REGION LV NAME TYPE MOUNT POINT
1-200 used outer edge p50oralv jfs2 /oracle/P50
201-240 used outer middle sapmntlv jfs2 /sapmnt
241-400 used outer middle p50oralv jfs2 /oracle/P50
401-599 used center p50oralv jfs2 /oracle/P50
600-799 used inner middle p50oralv jfs2 /oracle/P50
800-999 used inner edge p50oralv jfs2 /oracle/P50

VIOC 无法启动  0533 code
Incremental checkpoint up to RBA [0x1f14c.66cd.0], current log tail at RBA [0x1f14f.106c.0]
Mon May 07 00:33:22 2018
Completed checkpoint up to RBA [0x1f14d.2.10], SCN: 942253277
Completed checkpoint up to RBA [0x1f14e.2.10], SCN: 942253360
Completed checkpoint up to RBA [0x1f14f.2.10], SCN: 942253663
Mon May 07 00:59:04 2018
Incremental checkpoint up to RBA [0x1f14f.134e.0], current log tail at RBA [0x1f14f.134e.0]
Mon May 07 01:29:05 2018
Incremental checkpoint up to RBA [0x1f14f.1e27.0], current log tail at RBA [0x1f14f.1e27.0]
Mon May 07 01:59:06 2018
Incremental checkpoint up to RBA [0x1f14f.1e65.0], current log tail at RBA [0x1f14f.1e78.0]
Mon May 07 02:00:00 2018
Closing scheduler window
Closing Resource Manager plan via scheduler window
Clearing Resource Manager plan via parameter
Mon May 07 02:29:08 2018
Incremental checkpoint up to RBA [0x1f14f.2833.0], current log tail at RBA [0x1f14f.2833.0]
#
Mon May 07 10:11:27 2018
Starting ORACLE instance (normal)
sskgpgetexecname failed to get name
LICENSE_MAX_SESSION = 0

重新挂载新的VIOC

rmvdev -vtd p50_data01
rmvdev -vtd p50_data02
rmvdev -vtd p50_data03
rmvdev -vtd p50_data04
#
mkvdev -vdev hdisk3 -vadapter vhost1 -dev p50_data01
mkvdev -vdev hdisk4 -vadapter vhost1 -dev p50_data02
mkvdev -vdev hdisk5 -vadapter vhost1 -dev p50_data03
mkvdev -vdev hdisk6 -vadapter vhost1 -dev p50_data04
mkvdev -vdev hdisk8 -vadapter vhost1 -dev tmp_sys

检查lv的pp分布

SRMPRD:p50adm 4> lsvg -l p50datavg
p50datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 open/syncd N/A
dvdlv jfs2 100 100 1 open/syncd /DVD
upgradeoslv jfs2 40 40 1 open/syncd /upgradeAIX
sapmntlv jfs2 40 40 1 open/syncd /sapmnt
usrsaplv jfs2 40 40 1 open/syncd /usr/sap
oraclelv jfs2 80 80 1 open/syncd /oracle
p50oralv jfs2 3200 6400 8 open/syncd /oracle/P50
paging00 paging 100 200 2 open/syncd N/A
#
lslv -m loglv00 |awk '{print $3,$5}' |uniq
lslv -m dvdlv |awk '{print $3,$5}' |uniq
lslv -m upgradeoslv |awk '{print $3,$5}' |uniq
lslv -m sapmntlv |awk '{print $3,$5}' |uniq
lslv -m usrsaplv |awk '{print $3,$5}' |uniq
lslv -m oraclelv |awk '{print $3,$5}' |uniq
lslv -m paging00 |awk '{print $3,$5}' |uniq
lslv -m p50oralv |awk '{print $3,$5}' |uniq
#
SRMPRD:p50adm 36> lslv -m loglv00 |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk5
SRMPRD:p50adm 37> lslv -m dvdlv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk6
SRMPRD:p50adm 38> lslv -m upgradeoslv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk7
SRMPRD:p50adm 39> lslv -m sapmntlv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk8
SRMPRD:p50adm 40> lslv -m usrsaplv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk5
SRMPRD:p50adm 41> lslv -m oraclelv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk7
SRMPRD:p50adm 42> lslv -m paging00 |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk2 hdisk7
SRMPRD:p50adm 43> lslv -m p50oralv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk3 hdisk8
hdisk1 hdisk5
hdisk2 hdisk5
hdisk1 hdisk5
hdisk1 hdisk6
hdisk4 hdisk6
hdisk4 hdisk7
hdisk1 hdisk4
hdisk1 hdisk7

1.当前lv是同步状态

SRMPRD:p50adm 71> lsvg -l p50datavg
p50datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 open/syncd N/A
dvdlv jfs2 100 100 1 open/syncd /DVD
upgradeoslv jfs2 40 40 1 open/syncd /upgradeAIX
sapmntlv jfs2 40 40 1 open/syncd /sapmnt
usrsaplv jfs2 40 40 1 open/syncd /usr/sap
oraclelv jfs2 80 80 1 open/syncd /oracle
p50oralv jfs2 3200 6400 8 open/syncd /oracle/P50
paging00 paging 100 200 2 open/syncd N/A

2.将lvpaging00删除副本

  • 2.1 原来的lv pp分布
SRMPRD:p50adm 42> lslv -m paging00    |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk2 hdisk7
  • 2.2 将hdisk2上的pp副本删掉
rmlvcopy paging00 1 hdisk2
  • 2.3 结果
# lsvg -l p50datavg
p50datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
...
paging00 paging 100 100 1 open/syncd N/A

3.将lvp50oralv删除副本

  • 3.1 原来的lv pp分布
SRMPRD:p50adm 75> lslv -m p50oralv    |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk3 hdisk8
hdisk1 hdisk5
hdisk2 hdisk5
hdisk1 hdisk5
hdisk1 hdisk6
hdisk4 hdisk6
hdisk4 hdisk7
hdisk1 hdisk4
hdisk1 hdisk7
hdisk2 hdisk7
  • 2.2 将pp分布分成两组1-4,5-8
SRMPRD:p50adm 79> lslv -m p50oralv | grep hdisk1 |grep hdisk4
2860 0883 hdisk1 0980 hdisk4
2861 0884 hdisk1 0981 hdisk4
2862 0885 hdisk1 0982 hdisk4
2863 0886 hdisk1 0983 hdisk4
2864 0887 hdisk1 0984 hdisk4
2865 0888 hdisk1 0985 hdisk4
2866 0889 hdisk1 0986 hdisk4
2867 0890 hdisk1 0987 hdisk4
2868 0891 hdisk1 0988 hdisk4
2869 0892 hdisk1 0989 hdisk4
2870 0893 hdisk1 0990 hdisk4
2871 0894 hdisk1 0991 hdisk4
2872 0895 hdisk1 0992 hdisk4
2873 0896 hdisk1 0993 hdisk4
2874 0897 hdisk1 0994 hdisk4
2875 0898 hdisk1 0995 hdisk4
2876 0899 hdisk1 0996 hdisk4
2877 0900 hdisk1 0997 hdisk4
2878 0901 hdisk1 0998 hdisk4
2879 0902 hdisk1 0999 hdisk4
# 将这20个PP在hdisk4上副本迁移到hdisk7上去,也就是将2860-2879这20个LP的第2个副本迁移到hdisk7
migratelp p50oralv/2860/2 hdisk7
migratelp p50oralv/2861/2 hdisk7
migratelp p50oralv/2862/2 hdisk7
migratelp p50oralv/2863/2 hdisk7
migratelp p50oralv/2864/2 hdisk7
migratelp p50oralv/2865/2 hdisk7
migratelp p50oralv/2866/2 hdisk7
migratelp p50oralv/2867/2 hdisk7
migratelp p50oralv/2868/2 hdisk7
migratelp p50oralv/2869/2 hdisk7
migratelp p50oralv/2870/2 hdisk7
migratelp p50oralv/2871/2 hdisk7
migratelp p50oralv/2872/2 hdisk7
migratelp p50oralv/2873/2 hdisk7
migratelp p50oralv/2874/2 hdisk7
migratelp p50oralv/2875/2 hdisk7
migratelp p50oralv/2876/2 hdisk7
migratelp p50oralv/2877/2 hdisk7
migratelp p50oralv/2878/2 hdisk7
migratelp p50oralv/2879/2 hdisk7
  • 2.3 查看lv的pp分布已经在2组hdisk,1-4,5-8
# lslv -m p50oralv    |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk3 hdisk8
hdisk1 hdisk5
hdisk2 hdisk5
hdisk1 hdisk5
hdisk1 hdisk6
hdisk4 hdisk6
hdisk4 hdisk7
hdisk1 hdisk7
hdisk2 hdisk7
  • 2.4 本来想着删除全部的lv副本,重新mirrorvg,换一种方式,将没有副本的lv全部建一个副本
  • 2.5 除了lvp50oralv有副本外,其他的lv只存在hdisk5-8上,将没有副本的lv创建副本到hdisk1-4上
# lsvg -l p50datavg
p50datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 1 1 open/syncd N/A
dvdlv jfs2 100 100 1 open/syncd /DVD
upgradeoslv jfs2 40 40 1 open/syncd /upgradeAIX
sapmntlv jfs2 40 40 1 open/syncd /sapmnt
usrsaplv jfs2 40 40 1 open/syncd /usr/sap
oraclelv jfs2 80 80 1 open/syncd /oracle
p50oralv jfs2 3200 6400 8 open/syncd /oracle/P50
paging00 paging 100 100 1 open/syncd N/A
#mklvcopy testlv 2 hdisk11
mklvcopy loglv00 2 hdisk1 hdisk2 hdisk3 hdisk4
mklvcopy dvdlv 2 hdisk1 hdisk2 hdisk3 hdisk4
mklvcopy upgradeoslv 2 hdisk1 hdisk2 hdisk3 hdisk4
mklvcopy sapmntlv 2 hdisk1 hdisk2 hdisk3 hdisk4
mklvcopy usrsaplv 2 hdisk1 hdisk2 hdisk3 hdisk4
mklvcopy oraclelv 2 hdisk1 hdisk2 hdisk3 hdisk4
mklvcopy paging00 2 hdisk1 hdisk2 hdisk3 hdisk4
  • 2.6 同步lv
syncvg -f -l dvdlv
syncvg -f -l upgradeoslv
syncvg -f -l sapmntlv
syncvg -f -l usrsaplv
syncvg -f -l oraclelv
syncvg -f -l paging00
  • 2.7 结果已经同步
p50datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 2 2 open/stale N/A
dvdlv jfs2 100 200 2 open/syncd /DVD
upgradeoslv jfs2 40 80 2 open/syncd /upgradeAIX
sapmntlv jfs2 40 80 2 open/syncd /sapmnt
usrsaplv jfs2 40 80 2 open/syncd /usr/sap
oraclelv jfs2 80 160 2 open/syncd /oracle
p50oralv jfs2 3200 6400 8 open/syncd /oracle/P50
paging00 paging 100 200 2 open/syncd N/A
  • 2.8 最后检查lv的pp分布是不是落在两边
# lslv -m loglv00     |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk5 hdisk4
# lslv -m dvdlv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk6 hdisk2
# lslv -m upgradeoslv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk7 hdisk4
# lslv -m sapmntlv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk8 hdisk4
# lslv -m usrsaplv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk5 hdisk1
# lslv -m oraclelv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk7 hdisk2
# lslv -m paging00 |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk7 hdisk2
# lslv -m p50oralv |awk '{print $3,$5}' |uniq
PV1 PV2
hdisk3 hdisk8
hdisk1 hdisk5
hdisk2 hdisk5
hdisk1 hdisk5
hdisk1 hdisk6
hdisk4 hdisk6
hdisk4 hdisk7
hdisk1 hdisk7
hdisk2 hdisk7

# lsvg -l p30datavg
p30datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 2 2 open/syncd N/A
dvdlv jfs2 140 280 2 open/syncd /DVD
upgradeoslv jfs2 40 80 2 open/syncd /upgradeAIX
sapmntlv jfs2 20 40 2 open/syncd /sapmnt
usrsaplv jfs2 160 320 2 open/syncd /usr/sap
oraclelv jfs2 80 160 2 open/syncd /oracle
p30oralv jfs2 800 1600 2 open/syncd /oracle/P30
paging00 paging 100 200 2 open/syncd N/A
# lsvg -p p30datavg
p30datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk3 active 999 598 40..59..99..200..200
hdisk4 active 999 59 00..00..00..00..59
hdisk1 removed 999 598 40..59..99..200..200
hdisk2 removed 999 59 00..00..00..00..59
p30datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk3 active 999 598 40..59..99..200..200
hdisk4 active 999 59 00..00..00..00..59
hdisk1 removed 999 598 40..59..99..200..200
hdisk2 removed 999 59 00..00..00..00..59
# chpv -v a hdisk1
0516-1010 chpv: Warning, the physical volume hdisk1 has open logical
volumes. Continuing with change.
# chpv -v a hdisk2
0516-1010 chpv: Warning, the physical volume hdisk2 has open logical
volumes. Continuing with change.
# lsvg -p p30datavg
p30datavg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk3 active 999 598 40..59..99..200..200
hdisk4 active 999 59 00..00..00..00..59
hdisk1 active 999 598 40..59..99..200..200
hdisk2 active 999 59 00..00..00..00..59
# lsvg -l p30datavg
p30datavg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfs2log 1 2 2 open/syncd N/A
dvdlv jfs2 140 280 2 open/syncd /DVD
upgradeoslv jfs2 40 80 2 open/syncd /upgradeAIX
sapmntlv jfs2 20 40 2 open/syncd /sapmnt
usrsaplv jfs2 160 320 2 open/syncd /usr/sap
oraclelv jfs2 80 160 2 open/syncd /oracle
p30oralv jfs2 800 1600 2 open/syncd /oracle/P30
paging00 paging 100 200 2 open/syncd N/A
#

AIX 解除镜像再重建同步的更多相关文章

  1. SQL SERVER 基于数据库镜像的主从同步(数据库镜像实践汇总)

    SQL SERVER 基于数据库镜像的主从同步 Author:chaoqun.guo    createtime:2019-03-26 目录 SQL SERVER 基于数据库镜像的主从同步... 1 ...

  2. (转)AIX下镜像制作与取消,更换硬盘问题

    AIX下镜像制作与取消,更换硬盘问题 ROOTVG做镜像问题: 下面命令全部在AIX5.4上运行通过 # lspv hdisk0      000a1ddc7f36a2f0      rootvg   ...

  3. (转)AIX rootvg 镜像创建与磁盘更换

    # prtconf | grep disk # chdev -l hdisk1 -a pv=yes # extendvg rootvg hdisk1 # chvg -Qn rootvg # lsvg ...

  4. aix rootvg镜像

    就一般生产系统而已,操作系统层面都要进行备份,而最常见的操作系统备份方式之一就是做镜像(mirror),而实践过程中,往往是把rootvg这个卷组做镜像操作.查看rootvg是否已经进行镜像方法: 1 ...

  5. AIX 环境下ODM库同步

    IBM AIX v5.3操作系统环境下有时会出现ODM库与rootvg硬盘上数据不同步的情况.使用命令lsvg -l datavg检查文件系统类型,发现显示为"???"这就表示OD ...

  6. 印象笔记再WIN10同步失败解决方法

    IE11不支持tls1.1导致印象笔记安全性失效 打开组策略,关闭IE的加密策略就可以同步了

  7. 同步网络时间到linux服务器(先修改时区再进行同步网络时间)

    查看时区:date -R 修改整个系统时区: rm -f /etc/localtime ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 网 ...

  8. Oracle表存在则删除后再重建

    简单的执行方式: drop table USERINFO; create table USERINFO ( EnglishName ), ChineseName ), Sex ), Age int, ...

  9. (十八)VMware Harbor 镜像同步

    为什么需要镜像同步 由于对镜像的访问是一个核心的容器概念,在实际使用过程中,一个镜像库可能是不够用的,下例情况下,我们可能会需要部署多个镜像仓库: 国外的公有镜像下载过慢,需要一个中转仓库进行加速 容 ...

随机推荐

  1. Memcached在企业中的应用

    Memcached简介 Memcached是一个自由开源的,高性能,分布式内存对象缓存系统. Memcached是以LiveJournal旗下Danga Interactive公司的Brad Fitz ...

  2. java中ThreadPool的介绍和使用

    文章目录 Thread Pool简介 Executors, Executor 和 ExecutorService ThreadPoolExecutor ScheduledThreadPoolExecu ...

  3. Netty随记之ChannelInboundHandlerAdapter、SimpleChannelInboundHandler

    ChannelInboundHandlerAdapter ChannelInboundHandlerAdapter是ChannelInboundHandler的一个简单实现,默认情况下不会做任何处理, ...

  4. MongoDB学习(三)

    MongoDB条件操作符 $gt  > 大于 $lt   < 小于 $gte >= 大于等于 $lte  <= 小于等于 $ne  !=  不等于 条件操作符可用于查询语句中, ...

  5. C++课程设计详解-12306的模拟实现

    目录 设计思路... 3 思路分析:.... 3 数据组织:.... 4 具体功能实现过程... 4 管理端具体功能实现:.... 4 用户端具体功能实现:.... 5 调试截图和调试过程中遇到的问题 ...

  6. SpringBoot返回JSON日期格式问题

    SpringBoot中默认返回的日期格式类似于这样: "birth": 1537407384500 或者是这样: "createTime": "201 ...

  7. 软件——Jira是什么

    JIRA这个工具接触有好几年了,在多个海外项目上都用过这个工具.去年又在项目上深度使用后就有点爱不释手了,回国后也在找机会推荐给其它项目上用.最近正好有新项目需要用,借这个机会把JIRA的配置学习的过 ...

  8. 化妆品行业的一个MES系统案例(三)

    项目的主要需求如下: (1) 管理产品的配方(物料BOM) (2) 管理产品的生产工艺(最终要将工艺参数下发到设备PLC自动执行) (3) 根据生产工单集合产品配方生成称量任务(其实领料之后的成料过程 ...

  9. C# 数据操作系列 - 0. 序言

    0. 前言 在上一个系列中,我们初步浏览了一下C#的基础知识.这句话的意思就是C#基础知识系列完结了,撒花.当然,并不是因为C#已经讲完了.正是因为我们轻轻地叩开了那扇门,才能看到门后面那瑰丽的世界. ...

  10. STM32 使用st-link调试遇到写保护 Flash Timeout 问题的解决思路

    本文介绍了如何解决STM32芯片Flash写保护导致无法下载程序,无法在线调试的问题:如果您遇到相同的问题,希望本文可以带来一些帮助: 如果本文帮到了您,请帮忙点个赞