1

I am trying to remove a corrupt drive from a LVM volume group but when I try to pvmove data I get

# pvmove -v /dev/sda1
    Cluster mirror log daemon not included in build.
    Found same device /dev/sdb2 with same pvid Mt38n1dMPmmKmTgf7XdIMAhBBIkWjj6X
    Found same device /dev/sda1 with same pvid LeQOQ8b10YXpZbBLJT0hGvniqk9eQCAO
    Finding volume group "arch_SSD"
    Found same device /dev/sdb2 with same pvid Mt38n1dMPmmKmTgf7XdIMAhBBIkWjj6X
    Found same device /dev/sda1 with same pvid LeQOQ8b10YXpZbBLJT0hGvniqk9eQCAO
    No extents available for allocation

How is that possible? Are the id's displayed not the pvid of the physical volume? If not, how can I get the pvid?

Also how are there no extents available when I have over 300 GiBs of free space?

  • I had no extents available because while I had 300 GiB of free space in the file system, the file system occupies all extents on the volume. I used resize2fs to reduce the size of the file system. – cheezsteak Mar 2 '16 at 16:37
1

It looks like you have previously created physical volume with same volume name /dev/sda1 and some how it is not there anymore. Resulting in different pvid for same physical volume. In order to solve it you can simply recreate physical volume with following command:

 $ sudo pvcreate /dev/sda1 -ff

This will do two things:

  • It INITIALIZES physical volume /dev/sda1 and

  • Replaces old pvid with a new one

Then try pvmove /dev/sda1 (to move physical extents) or pvremove /dev/sda1 (to remove your physical volume)

If this do not work please post your error message. Also provide me the result of pvs, lvs and vgs.

  • I appreciate the help but I have long since removed the drive. I just backed up the contents and rebuilt the LVM. I can't verify if your method would work. – cheezsteak Mar 2 '16 at 16:42
  • By the way, if you're getting a #  prompt, that suggests that you're running with UID 0 (having done su or equivalent) and therefore you don't need to use sudo on subsequent commands. – G-Man Mar 4 '16 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.