XD刷機中執行reclaimdisks.sh的作用

之前刷機提到在使用OEDA進行一鍵部署前,需先在所有DB節點上運行reclaimdisks.sh,也提到觀察會釋放pvs/vgs/lvs相對應的剩餘空間。
本文以一套X8環境爲例,來看下具體的表現,以加深理解。

1.reclaim的相關命令

查看當前的分區信息:
# /opt/oracle.SupportTools/reclaimdisks.sh -check

在一鍵部署前,需先在所有DB節點上運行reclaim:
# /opt/oracle.SupportTools/reclaimdisks.sh -free -reclaim   

2.運行reclaim之前的情況

查看當前的分區信息:
# /opt/oracle.SupportTools/reclaimdisks.sh -check
Model is ORACLE SERVER X8-2
Number of LSI controllers: 1
Physical disks found: 4 (252:0 252:1 252:2 252:3)
Logical drives found: 1
Linux logical drive: 0
RAID Level for the Linux logical drive: 5
Physical disks in the Linux logical drive: 4 (252:0 252:1 252:2 252:3)
Dedicated Hot Spares for the Linux logical drive: 0
Global Hot Spares: 0
Valid. Disks configuration: RAID5 from 4 disks with no global and dedicated hot spare disks.
Valid. Booted: Linux. Layout: Linux + DOM0.

可以看到最後有個DOM0。
此時查詢vgs/pvs/lvs信息,會發現vg中已經沒有可用空間了:

# vgs
  VG      #PV #LV #SN Attr   VSize VFree
  VGExaDb   1   7   0 wz--n- 3.27t    0 
# pvs
  PV         VG      Fmt  Attr PSize PFree
  /dev/sda3  VGExaDb lvm2 a--  3.27t    0 
# lvs
  LV                 VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  LVDbExaVMImages    VGExaDb -wi-a-----   3.06t                                                    
  LVDbOra1           VGExaDb -wi-ao---- 100.00g                                                    
  LVDbSwap1          VGExaDb -wi-ao----  24.00g                                                    
  LVDbSys1           VGExaDb -wi-ao----  30.00g                                                    
  LVDbSys2           VGExaDb -wi-a-----  30.00g                                                    
  LVDbSys3           VGExaDb -wi-a-----  30.00g                                                    
  LVDoNotRemoveOrUse VGExaDb -wi-a-----   1.00g           

3.運行reclaim之後的情況

執行reclaim:

# /opt/oracle.SupportTools/reclaimdisks.sh -free -reclaim   

之後再次查詢vgs/pvs/lvs信息,會發現vg中已經有3T+可用空間:

# pvs
  PV         VG      Fmt  Attr PSize PFree
  /dev/sda3  VGExaDb lvm2 a--  3.27t 3.09t
# vgs
  VG      #PV #LV #SN Attr   VSize VFree
  VGExaDb   1   5   0 wz--n- 3.27t 3.09t
# lvs
  LV                 VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  LVDbOra1           VGExaDb -wi-ao---- 100.00g                                                    
  LVDbSwap1          VGExaDb -wi-ao----  24.00g                                                    
  LVDbSys1           VGExaDb -wi-ao----  30.00g                                                    
  LVDbSys2           VGExaDb -wi-a-----  30.00g                                                    
  LVDoNotRemoveOrUse VGExaDb -wi-a-----   1.00g      

此時再去做check:

# /opt/oracle.SupportTools/reclaimdisks.sh -check
Model is ORACLE SERVER X8-2
Number of LSI controllers: 1
Physical disks found: 4 (252:0 252:1 252:2 252:3)
Logical drives found: 1
Linux logical drive: 0
RAID Level for the Linux logical drive: 5
Physical disks in the Linux logical drive: 4 (252:0 252:1 252:2 252:3)
Dedicated Hot Spares for the Linux logical drive: 0
Global Hot Spares: 0
Valid. Disks configuration: RAID5 from 4 disks with no global and dedicated hot spare disks.
Valid. Booted: Linux. Layout: Linux.

不難發現:lv裏面的那個3.06T的LVDbExaVMImages被回收了,同時check結果中的DOM0也隨之不見了。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章