Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-10-2008, 12:53 PM   #1
LQ Newbie
Registered: Sep 2003
Posts: 8

Rep: Reputation: 0
Logical Volume Management "pvmove" Question

Apologies in advance if this is not the right forum, but I can't figure out where else to ask this.

I'm in an argument with another Linux user and we're disagreeing on how PVMOVE works. Say you have a 4 500G disk (linear (non-striped)) volume which currently has 700Gigs of free space. I thought I could run pvmove to remove one of the disks and pvmove would copy that device's contents (if any) to free space anywhere. My friend believes that pvmove moves data to an unassigned disk. So I'd have to first add a new disk then do the pvmove.

One of the disks in my batch of 4 has gone faulty and I'm trying to remove it from the volume before I add a replacement, (I've had problems with this in the past but that's a subject for a diff question) so it's rather hard for me to try both methods. So I'm wondering if someone on this board knows for sure.


Old 02-23-2008, 09:56 AM   #2
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
I have used pvmove (RHEL4 mostly but also RHEL5) at least a dozen times.

You'll need enough storage on disks other than the one you are moving extents off of.

say you have 4 disks each with one partition that is Linux LVM (sd[bcde]1) and sdc is the one going south on you and you have enough free PEs on on the remaining 3 disks to move the extents from sdc1.

NOTE: you can use lvdisplay's "--maps" option to identify where the LogicalVolume's extents are located to confirm before and/or after

pvmove -b /dev/sdc1
In my trials (and i'm glad i tested it a few times on a spare system) i found that if i did not use the -b when starting the pvmove i ended up with head-aches (i'm sure due to user-error). Since then i always start it with -b and have had no outages or problems during the process.

you can view the progress by running pvmove with the -i <seconds> option to see how much longer you have to wait so my typical invocation of this entire process looks something like this

pvmove -b /dev/sdc1
pvmove -i 10
and then i'll detach from screen after watching it out of the corner of my eye for a couple of minutes, checking in on it from time to time just to see how it's doing.

then once the pvmove has been successfully completed, confirm that no LV extents are on sdc1, proceed with vgreduce, pvremove, ...

if you want to move all extents to a specific PV in the VG then you can specify it in your pvmove, otherwise, it'll move to any available extents on any of the other PVs.

Short answer:
If you have enough extents available on other PVs in this VG you may successfully use pvmove without adding another PV to this VG.

If you do not have enough extents available on the other PVs in this VG you will need to either free up extents (deleting/reducing LVs) or create more extents by adding PV(s)

jamida's the winner of the argument, no?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
(URGENT) Fedora Core 6 - Could not find logical volume "VolGroup00" linxnoob Linux - General 3 07-07-2007 05:36 AM
"mythtv-setup" giving "Session management error: Authentication Rejected" Mitchua Ubuntu 0 10-09-2005 04:32 PM
Logical Volume Management 2 XaViaR Linux - General 5 08-20-2005 07:48 AM
Logical volume management question smoker Linux - Software 2 08-17-2005 12:50 AM
Logical Volume Management jatimon Linux - General 0 04-17-2002 02:57 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration