This command is used to resize a physical volume in the Linux LVM. Which allows you to modify the size of a PV to accommodate changes in disk capacity or to reclaim free space.
- About pvresize: To resize a disk or partition in use by LVM2
- Comes From : lvm2-2.02.72
- Configuration Files:
- Path: /sbin/pvresize
Examples:
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 get the help for pvresize
| # pvresize –help |
4. To set to debug mode
| # pvresize -d # pvresize –debug |
5. To run pvresize in test mode
| # pvresize -t pvresize –test |
6. To set to verbose mode
| # pvresize -v pvresize –verbose |
7. To get the pvresize version
| # pvresize –version |
Related Commands: lvm, pvmove, lvresize, fdisk