• 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. loadkeys Command Examples in Linux
  2. Time to live exceeded ping error
  3. mkpasswd Command Examples in Linux
  4. mycli Command Examples in Linux
  5. lsblk: command not found
  6. nsnake: command not found
  7. How to install and configure Samba in CentOS / RHEL
  8. How to Migrate CentOS/RHEL 6 iptables Rules to CentOS/RHEL 7 firewalld
  9. fakeroot Command Examples in Linux
  10. “aws s3” Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • “az storage blob” Command Examples (Manage blob storage containers and objects in Azure)
  • “az storage account” Command Examples (Manage storage accounts in Azure)
  • “az sshkey” Command Examples (Manage ssh public keys with virtual machines)
  • “az redis” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright