Skip to contentSkip to conversation

Removing a Bad disk from LVM w/o a new disk

linux-lvm Ow Mun Heng 2 participants 2 messages May 22, 2006

lore
Share & tools
lore
#0 lore raw

Current situation is that I have a bad disk /dev/sdb1 in an existing lvm partition. (sda1/sda4/sdb1)

I would like to remove it from the VG. (There are no free PE anywhere. I've maxed it out.)

I've already reduced the existing VG to the size of sda1+sda4 partition.

I would like to remove entirely the Physical Extents from the volume group. It doesn't seem like there's a way to do this w/o putting another disk inside?

I'm sure that's not true. Doing a

$vgreduce storage /dev/sdb1
Physical volume "/dev/sdb1" still in use

I have no idea what/who is using it. fuser/lsof etc doesn't show up anything.

I actually don't much care about the data, I've already copied it somewhere else. So, instead of just blowing up everything, I rather take this as a learning experience.

Signature · 1 line
Ow Mun Heng <[email protected]>
#1 lore raw
Quoted 11 lines · Ow Mun Heng

Current situation is that I have a bad disk /dev/sdb1 in an existing lvm partition. (sda1/sda4/sdb1)

I would like to remove it from the VG. (There are no free PE anywhere. I've maxed it out.)

I've already reduced the existing VG to the size of sda1+sda4 partition.

$vgreduce storage /dev/sdb1
Physical volume "/dev/sdb1" still in use

You mean you reduced the existing LVs?

Try this:

pvmove -v /dev/sdb1

That will move all the data off sdb1 to the other drives. You need dm-mirror either compiled in your kernel or as a module to use it.

Read the manpage for more information.