• 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. mkpasswd Command Examples in Linux
  2. How to enable CUPS Debugging on CentOS/RHEL
  3. How to Run DNS and FTP services in a chroot Jail
  4. How to Schedule Tasks Using at in Linux
  5. CentOS / RHEL 7 : How to disable Transparent Huge pages (THP)
  6. How to remove the noatime mount option from root mount point without reboot (CentOS/RHEL)
  7. How to Disable NUMA in CentOS / RHEL 6,7
  8. How to enable NFS debug logging using rpcdebug
  9. man Command Examples in Linux
  10. “yum update” fails with “[package version 1] is a duplicate with [package version 2]”

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright