Skip to contentSkip to conversation

Forcibly remove broken disk from LV

linux-lvm Turbo Fredriksson 2 participants 3 messages Jun 29, 2007

lore
Share & tools
lore
#0 lore raw

I have a disk that only gives SCSI errors etc which I want to remove from the VG. But vgreduce only hangs and so does pvremove...

If I physically remove the disk, the vg/pv/lv etc isn't accessible so the vgreduce won't work (claims that it can't find any PV's etc).

So how do I remove the disk?

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · Turbo Fredriksson

I have a disk that only gives SCSI errors etc which I want to remove from the VG. But vgreduce only hangs and so does pvremove...

If I physically remove the disk, the vg/pv/lv etc isn't accessible so the vgreduce won't work (claims that it can't find any PV's etc).

So how do I remove the disk?

You can activate what's left of the volume group with:

vgchange --partial -ay <VolGroup>

You can remove the missing PV from the VG with:

vgreduce --removemissing <VolGroup>

Note that this will also remove any logical volumes that were using the missing physical volume. You can run it with --test first to see what effect it will have.

Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGhNyj6YSQoMYUY94RAj1/AKC5MV2UOwX1H9fJDEPB29gAzAwLXQCg1c6b fd0Tnpn1dInlwx5TnH8G2fM=
=WGy8
-----END PGP SIGNATURE-----

#2 lore raw

Quoting "Bryn M. Reeves" <[email protected]>:

Quoted 2 lines

You can activate what's left of the volume group with:
vgchange --partial -ay <VolGroup>

Tried that but it didn't seem to be working:

----- s n i p -----

root@pegasos:~# vgchange --partial -ay movies
  Partial mode. Incomplete volume groups will be activated read-only.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Device /dev/ioerror not found.
  device-mapper: reload ioctl failed: Invalid argument
  device-mapper: reload ioctl failed: Invalid argument
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Device /dev/ioerror not found.
  device-mapper: reload ioctl failed: Invalid argument
  1 logical volume(s) in volume group "movies" now active
root@pegasos:~# vgdisplay
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find all physical volumes for volume group movies.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find all physical volumes for volume group movies.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find all physical volumes for volume group movies.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find all physical volumes for volume group movies.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find all physical volumes for volume group movies.
  Couldn't find device with uuid 'nqj4V1-CxT3-At8I-Vc0h-E6iu-6jY3-a6z0A3'.
  Couldn't find all physical volumes for volume group movies.
  Volume group "movies" not found
----- s n i p -----

I was supposed to do this after physically removing/disconnecting the broken disk, right?

Also, i noticed that I had the /dev/mapper/movies-pvmove0 block device. How do i cancel the pvmove I initiated a couple of days ago (tried to move hdb to availible space on VG - this availible space is/was on the - now - broken disk)? The command 'pvmove --abort' won't work - it also hangs...