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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • 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. lvchange Command Examples in Linux
  2. git hash-object: Computes the unique hash key of content and optionally creates an object with specified type
  3. Using iostat to monitor system performance in Linux (Examples included)
  4. cd: Change the current working directory
  5. rpi-eeprom-update Command Examples in Linux
  6. in-toto-sign Command Examples
  7. CentOS / RHEL : How to get the date and time of executed command in the history command output
  8. bzgrep: Find patterns in bzip2 compressed files using grep
  9. du Command Examples in Linux
  10. findfs Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright