Mirror 操作
首先,將新的 PV 加入 VG 。 新的 PV 大小要大於現有的資料量。
extendvg hissp1_v2 hdisk2
extendvg hissp1_v2 hdisk15
extendvg hissp1_v2 hdisk16
extendvg hissp1_v2 hdisk17
extendvg hissp1_v2 hdisk18
extendvg hissp1_v2 hdisk47
smitty vg
選 "Mirror a Volume Group"
sync mode 選 Background
VOLUME names 選剛剛加入的那些 pv
然後 enter 開始
[Entry Fields]
* VOLUME GROUP name hissp1_v2
Mirror sync mode [Background]
PHYSICAL VOLUME names [hdisk2 hdisk15 hdisk16 hdisk17 hdisk18 hdisk47]
Number of COPIES of each logical 2
partition
Keep Quorum Checking On? no
Create Exact LV Mapping? no
COMMAND STATUS
Command: running stdout: yes stderr: no
Before command completion, additional instructions may appear below.
0516-1804 chvg: The quorum change takes effect immediately.
COMMAND STATUS
Command: OK stdout: yes stderr: no
Before command completion, additional instructions may appear below.
0516-1804 chvg: The quorum change takes effect immediately.
確認是否搬完的方式
mirror vg 指令還在跑的時候 vg 會被鎖住不能動也不能看
f6n1:/> lsvg -l hissp1_v2
0516-1201 lsvg: Warning: Volume group hissp1_v2 is locked. This command
will continue retries until lock is free. If lock is inadvertent
and needs to be removed, execute 'chvg -u hissp1_v2'.
f6n1:/>
然後因為剛剛是 background sync 所以 mirror vg 指令跑完就可以回到交談式輸入
用 lsvg -l 看 lv 的狀態。正常時應該是 open/syncd 在抄寫時會變成 open/stale
狀態都回到 open/syncd 代表抄完了
另一個方式
lsvg hissp1_v2
看 STALE PPs 降到 0 代表抄完了
UNMIRROR
smitty vg -> Unmirror a Volume Group
> smitty vg
Unmirror a Volume Group
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* VOLUME GROUP name hissp1_v2
PHYSICAL VOLUME names [hdisk19 hdisk20 hdisk21 hdisk22 hdisk2> +
Number of COPIES of each logical 1 +
partition
COMMAND STATUS
Command: running stdout: yes stderr: no
Before command completion, additional instructions may appear below.
0516-1804 chvg: The quorum change takes effect immediately.
COMMAND STATUS
Command: OK stdout: yes stderr: no
Before command completion, additional instructions may appear below.
0516-1804 chvg: The quorum change takes effect immediately.
用 lspv -l {HDISK} 看看還有沒有 LV 在要移掉的這些 PV 上面
沒有的話 就可以 reducevg 然後 rmdev 了
--------
補充
要強制斷開的話
直接從來源端把 volumn mapping 抽掉
然後再unmirror
然後再砍
--------
選 UnMirror VG 的時候,選擇 PV 那邊選的是"要移掉的"PV
---------
/usr/sbin/mirrorvg '-S' {VGName} hdisk46 <--要加進去的
/usr/sbin/unmirrorvg {VGName} hdisk7 <--要拿出來的