Who moved my PEs (or why does pvmove sucks on linux) ?

Yesterday I wanted to extend an existing LVM VG with some central storage disks. In the process, I notice the VG is built upon local & external disk, which isn’t according to my standards.

So I decided to extend the VG with the external disks, and then use pvmove command to move all the PE from the internal disk before reducing the VG. The problem is, that on RHEL 4.4, the pvmove command hangs during it’s work, never returns to the prompt, and locks all the other LVM commands.

Seems that for little amounts of PEs the command works, but for 10G disks it hangs. As nothing else helped, I was forced to hard boot the server using to power button. Running the command in single user also doesn’t effect the result, although non other user/services are running.

RHEL 4.4 has LVM2 version 2.02.06, RHEL 4.5 has version 2.02.21 and RHEL 4.6 has version 2.02.27. Reading upstream’s changelog seems there isn’t any change regarding pvmove, although it’s still worth testing if upgrade helps.

Version 2.02.29 has “Refactor pvmove allocation code” in its changelog, but it will take time before this version will be officially available for RHEL (fedora 8 only has 2.02.28). Hoepfully it will solve the problem, as my HP-UX colleagues are laughing on my expense… And that I have to invest more time in mimicking pvmove work manually.

12 Comments

Filed under Red Hat Enterprise Linux

12 responses to “Who moved my PEs (or why does pvmove sucks on linux) ?

  1. Not only HP-UX. On AIX one can move filesystems while they are mounted and actively used.

  2. bllkaos

    Are you aware that pvmove reportely can take *weeks* to finish?

  3. Daniel Burrows

    I recently moved a 100G logical volume using pvmove (on Debian/lenny) in the face of a flaky IDE cable that caused the operation to hang twice partway through, without losing any data. So it is possible, although my experience was that it took a *long* time, and you certainly may have run into some bug I didn’t hit.

    IIRC, the –verbose flag produces some useful progress information. Maybe that will give you some indication of what’s going wrong?

  4. And maybe you could check with the kernel version, it may help? RHEL4 has 2.6.8 or 9 iirc.

    One other thing is that, iirc, RHEL4 can’t online-resize ext3 so if your dealing with your /, take care of that🙂

  5. Lior Kaplan

    RHEL 4 *can* resize ext3 FS online. That wasn’t possible in RHEL 3.

  6. Hi,
    which kernel version do you use? Some years ago I had similar problems, that I reported to the linux bug tracking system:

    http://bugzilla.kernel.org/show_bug.cgi?id=5238

    Best regards, Hans-Peter

  7. Lior Kaplan

    2.6.9 which comes with RHEL 4.

  8. Pingback: מעבר ל-LVM « תוכנה חופשית בעברית

  9. Heinz

    Hello, i experienced the same with RHEL4 Update3.
    pvmove worked a while then hang everything associated with the VG i was used on. HardReboot. Anybody did find a workaround or solution? Read about using “-b” (backgrounding) and another one mentioned using “-n lvolname” to move PEs for *each* lvol separatley. Didn’t test that out yet…

  10. Bena

    Hello,

    pvmove crash when a LV is on many PV.

    It works if you move each PE separately.

  11. markus

    use the -n option to specify the lv you want to move and move every lv seperatly helped for me…

  12. Alvaro

    I have many troubles with pvmove with RHEL 5.3, but only when it was doing over filesystems that was having i/o activity like a DB. If you do it with unmounted filesystems its works perfect. I doesnt probe it with later update of RHEL but it version have many fixes to pvmove. Please notice me if anybody probe it on new versions.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s