Unix study--aix Deleting a physical volume in a volume group

Source: Internet
Author: User

Unix study--aix Deleting a physical volume in a volume group


System environment:

Operating system: AIX 5300-08


Case Analysis:

To remove the PV (hdisk2) in ROOTVG:


[Email protected]:/]$ 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


Delete via Smit:
[Email protected]:/]$ Smit REDUCEVG

The following error message appears:
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.

Remove by REDUCEVG tool:
[Email protected]:/]$ REDUCEVG

0516-606 Reducevg:volume group name is not entered.
USAGE:REDUCEVG [-d] [-f] vgname pvname ...
Reduces volume group size by removing a physical volume.

[Email protected]:/]$ reducevg-d ROOTVG Hdisk2


Hint: There is a logical volume on the HDISK2 PV


0516-914 rmlv:warning, all data belonging to logical volume
paging00 on physical volume Hdisk2 would be destroyed.
Rmlv:do wish to continue? Y (es) n (o)?
N


0516-914 rmlv:warning, all data belonging to logical volume
PAGING01 on physical volume Hdisk2 would be destroyed.
Rmlv:do wish to continue? Y (es) n (o)?
0516-914 rmlv:warning, all data belonging to logical volume
PAGING02 on physical volume Hdisk2 would be destroyed.
Rmlv:do 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.

To view the system page Swap space:
[Email protected]:/]$ 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 for the later page space, whose logical volume is built on the Hdisk2 PV

Close paging00, 01, the following:

[Email protected]:/]$ swapoff/dev/paging00
[Email protected]:/]$ swapoff/dev/paging01
[Email protected]:/]$ swapoff/dev/paging02

Delete paging00, 01, 23 logical volumes with Smit

[Email protected]:/]$ lsps-a

Page Space physical Volume Volume Group Size%used Active Auto Type
Hd6 hdisk0 ROOTVG 2048MB 1 Yes Yes LV

to delete a volume group's PV through REDUCEVG:
[Email protected]:/]$ 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

[email protected]:/]$ reducevg-d ROOTVG hdisk2


Delete succeeded:
[[ Email protected]:/]$ lsvg-p ROOTVG
ROOTVG:
pv_name           PV State   ;        total pps   free PPS    free distribution
Hdisk0            active            550         222       &NBS P 82..00..00..30..110

[Email protected]:/]$ LSPV
Hdisk0 000bf7bdcd61dd0a ROOTVG Active
Hdisk1 00434bbc952e964d None
Hdisk2 000bf7bd1ed7cab8 None


This article is from the "Tianya blog," Please make sure to keep this source http://tiany.blog.51cto.com/513694/1693822

Unix study--aix Deleting a physical volume in a volume group

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.