• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL : How to resize (extend) existing Physical Volume (PV)

by admin

To resize or extend a Volume group you can either add a new Physical Volume or extend an existing Physical volume. In the latter case, VG automatically recognizes the new increase size whereas in the former case you have to extend the VG using vgextend. Let’s see an example of resizing the existing PV to grow VG size.

Resize (extend) the Physical Volume

Resize (extend) the Physical Volume (currently 10Gb) to utilise all available space on the device e.g.:

# pvresize /dev/sdb1
Physical volume "/dev/sdb1" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
Note: when running pvresize(), if no size is specified, the PV will be extended to utilise all available/remaining space on the device.

Verify Physical Volume resize

Verify the increased size of the Physical Volume e.g.:

# pvs
PV         VG           Fmt  Attr PSize  PFree
/dev/sdb1  VolGroupData lvm2 a-   20.00G 10.00G

Verify Volume Group resize

Verify the increased available space within the Volume Group e.g.:

# vgs
VG           #PV #LV #SN Attr   VSize   VFree
VolGroupData   1   1   0 wz--n- 20.00G  10.00G

Filed Under: Linux

Some more articles you might also be interested in …

  1. Firewalld Command line Reference (Cheat Sheet)
  2. CentOS / RHEL : How to configure iptable rules to allow FTP ports 20/21
  3. CentOS / RHEL : How to add iptable rules
  4. Maintaining Linux filesystems using “fsck” and “tune2fs”
  5. CIFS Share Filesystem Is Not Mounted after Reboot on CentOS/RHEL 7
  6. How to Uninstall/Remove GNOME from CentOS/RHEL 7
  7. mt: command not found
  8. check-language-support: command not found
  9. pkgmk Command Examples in Linux
  10. semanage Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright