Unix Study之--AIX删除卷组中物理卷

Unix Study之--AIX删除卷组中物理卷

系统环境:
   操作系统: 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

出现以下错误提示:
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.

查看系统页面交换空间:
[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上

关闭paging00、01、02:

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

通过smit删除paging00、01、02三个逻辑卷

[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      



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值