Failed during pvmove, howto: set up software raid 1 on running LVM system

Discussion in 'HOWTO-Related Questions' started by sbh77, Oct 7, 2010.

  1. sbh77

    sbh77 New Member


    After succesfully following the guide on installing software RAID 1 on a running ubuntu 10.04 system (no LVM), I decided to do the same on a server machine with LVM installed:

    The configuration as shown in the howto is identical to our server except for the server name. Of course I used our server name whenever it was written server1.

    After the command
    $ pvmove -i 2 /dev/sda5 /dev/md1
    reached 100%, it displayed:
    ABORTING: Can't find mirror LV in servername for /dev/sda5

    After this I couldn't do anything anymore. all LVM commands resulted with: "Command failed with status code 5."
    And the system became read-only.

    I had to reboot, and of course, changing the grub and fstab resulted in an unbootable system.

    So now I need to either continue the process, or restore the system.

    Is there a way to restore the previous state? I assume I need to load the live CD, install mdm, mount sda through lvm and somehow restore the system from the command line, but I have no idea how to do all this... anyone?

    Last edited: Oct 7, 2010
  2. sbh77

    sbh77 New Member

    meanwhile... loading live CD

    Still no luck. I'm trying to restore the system to its former state, I need to mount sda in the live cd environment:
    The unknown device is the RAID md0 that was installed during the guide steps.

    Trying to activate the VG:
    Using Partial:
    Trying to mount:
    Okay, so I decided to try to remove the PV of the RAID from the LG.
    Trying to remove the physical unknown device:
    Here I stopped. Should I use the --force directive or not? How can I repair the LV root afterwards?

    Do all the read fails and i/o errors mean that the pvmove command which finished with ABORTING after 100% actually corrupted the original /dev/sda?
    Last edited: Oct 7, 2010
  3. sbh77

    sbh77 New Member

    last update...

    Having a backup of the system, I did a vgcfgrestore of the backup inside /etc/lvm/backup.
    It seemed to restore the LVM system to its previous definitions, but when trying to mount, I get:


    trying to mount again hangs with no output...

    Restarting shows again the same situation after following the guide until the pvmove command.
    Last edited: Oct 8, 2010

Share This Page