溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

Unix Study之--AIX刪除卷組中物理卷

發(fā)布時(shí)間:2020-02-26 01:52:21 來源:網(wǎng)絡(luò) 閱讀:1528 作者:客居天涯 欄目:系統(tǒng)運(yùn)維

Unix Study之--AIX刪除卷組中物理卷


系統(tǒng)環(huán)境:

   操作系統(tǒng): AIX 5300-08


案例分析:

刪除rootvg中的pv(hdisk2):


[root@aix195: /]$ lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            550         249         109..00..00..30..110
hdisk2            active            319         260         64..64..04..64..64


通過smit刪除:
[root@aix195: /]$ smit reducevg

出現(xiàn)以下錯(cuò)誤提示:
0516-016 ldeletepv: Cannot delete physical volume with allocated
        partitions. Use either migratepv to move the partitions or
        reducevg with the -d option to delete the partitions.
0516-884 reducevg: Unable to remove physical volume hdisk2.


通過reducevg工具刪除:
[root@aix195: /]$ reducevg

0516-606 reducevg: Volume group name not entered.
Usage: reducevg [-d] [-f] VGname PVname...
Reduces volume group size by removing a physical volume.

[root@aix195: /]$ reducevg -d rootvg hdisk2


提示:在hdisk2的pv上有邏輯卷


0516-914 rmlv: Warning, all data belonging to logical volume
        paging00 on physical volume hdisk2 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? 
n


0516-914 rmlv: Warning, all data belonging to logical volume
        paging01 on physical volume hdisk2 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? 
0516-914 rmlv: Warning, all data belonging to logical volume
        paging02 on physical volume hdisk2 will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? 
0516-016 ldeletepv: Cannot delete physical volume with allocated
        partitions. Use either migratepv to move the partitions or
        reducevg with the -d option to delete the partitions.
0516-884 reducevg: Unable to remove physical volume hdisk2.

查看系統(tǒng)頁面交換空間:
[root@aix195: /]$ lsps -a
Page Space      Physical Volume   Volume Group    Size %Used Active  Auto  Type
paging02        hdisk2            rootvg        1792MB     1   yes   yes    lv
paging01        hdisk2            rootvg        1792MB     1   yes   yes    lv
paging00        hdisk2            rootvg         192MB     1   yes   yes    lv
hd6             hdisk0            rootvg         320MB     1   yes   yes    lv


---paging00,01,02為后來增加的page space,其邏輯卷建立在hdisk2的PV上

關(guān)閉paging00、01、02:

[root@aix195: /]$ swapoff /dev/paging00 
[root@aix195: /]$ swapoff /dev/paging01 
[root@aix195: /]$ swapoff /dev/paging02

通過smit刪除paging00、01、02三個(gè)邏輯卷

[root@aix195: /]$ lsps -a

Page Space      Physical Volume   Volume Group    Size %Used Active  Auto  Type
hd6             hdisk0            rootvg        2048MB     1   yes   yes    lv

在通過reducevg刪除卷組的PV:
[root@aix195: /]$ lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            550         222         82..00..00..30..110
hdisk2            active            319         319         64..64..63..64..64

[root@aix195: /]$ reducevg -d rootvg hdisk2


刪除成功:
[root@aix195: /]$ lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            550         222         82..00..00..30..110

[root@aix195: /]$ lspv
hdisk0          000bf7bdcd61dd0a                    rootvg          active
hdisk1          00434bbc952e964d                    None            
hdisk2          000bf7bd1ed7cab8                    None      


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI