• 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

pvresize Command Examples in Linux

by admin

pvresize is a tool to resize Physical Volume which may already be in a volume group and have active logical volumes allocated on it.

Expand the PV on /dev/sda1 after enlarging the partition with fdisk:

# pvresize /dev/sda1

Shrink the PV on /dev/sda1 prior to shrinking the partition with fdisk (ensure that the PV size is appropriate for your intended new partition size):

# pvresize --setphysicalvolumesize 40G /dev/sda1

Examples of pvresize Command

1. To resize a physical volume, by reducing it then reducing the disk size by fdisk:

# pvresize --setphysicalvolumesize 20G /dev/sda2

2. To extend the disk then resize th PV:

# pvresize /dev/sda2

3. To set to debug mode:

# pvresize -d
# pvresize --debug

4. To run pvresize in test mode:

# pvresize -t
# pvresize --test

5. To set to verbose mode:

# pvresize -v
# pvresize --verbose

6. To get the pvresize version:

# pvresize --version

7. To get the help for pvresize:

# pvresize --help

Filed Under: Linux

Some more articles you might also be interested in …

  1. “The requested URL returned error: 403 Forbidden” – yum update error
  2. LVM VG Metadata Corruption with ‘Checksum error’
  3. make: command not found
  4. RHEL 7 – RHCSA Notes – input / output redirection
  5. Backtick (`) symbol in Linux Shell Scripting
  6. CentOS / RHE 7 : How to Prevent Users from Using the Last 10 Passwords
  7. test Command Examples in Linux
  8. YUM command examples to install, remove and upgrade packages
  9. caja: command not found
  10. CentOS / RHEL : How to prioritize the devices used for swap partition

You May Also Like

Primary Sidebar

Recent Posts

  • fprintd-delete Command Examples in Linux
  • fprintd-delete: command not found
  • foreman: command not found
  • foreman Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright