LVM: Reduce an existing Volume Group by removing one of its disks

LVM: Reduce an existing Volume Group by removing one of its disks

# Tested on RHEL 5, 6 & 7

VG=testvg

# Check disks owned by volume group

vgdisplay -v $VG | grep "PV Name"
   PV Name               /dev/sde1
   PV Name               /dev/sde2
   PV Name               /dev/sde3
   PV Name               /dev/sde4    <---

# Remove desired disk from VG (Verify first disk is not in use)

DISK=/dev/sde4

pvdisplay $DISK | egrep "Total|Free"
   Total PE              129          <--- Total Physical Extents
   Free PE               129          <--- Free Physical Extents

# Disk is not being used (no PE in use) so we can remove it from volume group

vgreduce $VG $DISK


# Check

vgdisplay -v $VG | grep "PV Name"
   PV Name               /dev/sde1
   PV Name               /dev/sde2
   PV Name               /dev/sde3



# We can remove ALL empty (no physical extents in use) disks from VG by running 'vgreduce'
# command with '-a' option:

vgreduce -a $VG
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
RHEL: Force system to prompt for password in Single User mode
Viewed 9236 times since Sat, Jun 2, 2018
ZFS: Grow/Shrink an existing zfs filesystem
Viewed 7502 times since Sun, Jun 3, 2018
ZFS: Snapshots and clones on zfs filesystems
Viewed 4061 times since Sun, Jun 3, 2018
RHEL: XFS basic operations
Viewed 18306 times since Sat, Jun 2, 2018
RHEL: Displaying system info (firmware, serial numbers... )
Viewed 13791 times since Sun, May 27, 2018
Linux Linux Network Statistics Tools / Commands
Viewed 10753 times since Mon, Sep 21, 2020
How to do a Filesystem Resize (ext3/ext4) on Redhat running on VMware
Viewed 11991 times since Wed, Jul 25, 2018
Setup SSL Tunnel Using Stunnel on Ubuntu
Viewed 4127 times since Fri, Sep 28, 2018
How To Find Largest Top 10 Files and Directories On Linux / UNIX / BSD find
Viewed 5161 times since Mon, Oct 29, 2018
Linux - How to get IP and MAC address of ethernet adapter in Linux
Viewed 3711 times since Fri, Jun 8, 2018