How to delete a disk from a LVM group while keeping the data

This is the scenario:

I want to remove a old hard disk which is a LVM PV and contains data. There is free space available on other PVs in the VG. It should move the data from the disk to be removed to other PVs and then remove the disk.

asked Jan 2, 2014 by anonymous

1 Answer

Best answer

Refer to Removing an Old Disk in LVM HOWTO.

The process to remove sdb from VG vg is as follows.

First, distribute old extends from sdb to other PV

# pvmove /dev/sdb

it will take much time.

Second, delete sdb

# vgreduce vg /dev/sdb

Now, you can physically remove the sdb disk.

Then you can add new disks and extend the VGs.

answered Jan 2, 2014 by anonymous

After vgreduce, you may wipe the labels on the disk by

# pvremove /dev/sdb
commented Oct 22, 2014 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost