Skip to contentSkip to conversation

Rename physical volume

linux-lvm Turbo Fredriksson 2 participants 2 messages Sep 12, 2007

lore
Share & tools
lore
#0 lore raw

I made a little mistake a few months ago
when I added a disk to my VG:

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

celia:~# pvdisplay | egrep 'PV Name|Allocatable'
  PV Name               /dev/md0
  Allocatable           yes (but full)
  PV Name               /dev/hdc
  Allocatable           yes (but full)
  PV Name               /dev/sdd1
  Allocatable           yes (but full)
  PV Name               /dev/md2
  Allocatable           yes (but full)
  PV Name               /dev/md3
  Allocatable           yes
----- s n i p -----

What id like to do is move all data from sdd1
(372Gb) to the new md3 (just added - empty 465Gb)
and then remove sdd1 and create it as md1 and
move the data back.

But I'm afraid of holes in the FS (XFS)...

Also, hdc is just a 80Gb disk which I forgot
to remove when I added sdd1 (I had a 80Gb disk
laying around and not enough money) so I'd
like to remove it completely (move the physical
data to some other PV - md3 because of free
space on that).

Any advice in which procedure I should use
to accomplish this?

Signature · 5 lines
arrangements Uzi SDI Waco, Texas Saddam Hussein Noriega KGB security
tritium colonel FSF NORAD FBI Qaddafi domestic disruption
[See http://www.echelonwatch.org/ for more about this]
http://www.theregister.co.uk/2001/09/06/eu_releases_echelon_spying_report/
http://www.aclu.org/safefree/nsaspying/23989res20060131.html#echelon
#1 lore raw
Quoted 10 lines · Turbo Fredriksson

I made a little mistake a few months ago when I added a disk to my VG:

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

What id like to do is move all data from sdd1 (372Gb) to the new md3 (just added - empty 465Gb) and then remove sdd1 and create it as md1 and move the data back.

Use pvmove. You should provide kernel and lvm versions to see if any experts here know of bugs or caveats.

Quoted 1 line

But I'm afraid of holes in the FS (XFS)...

Moving one LV at a time should keep the PEs contiguous. I think that is what you are talking about. XFS should work with non-contiguous PEs, but will lose performance since it is optimized for contiguous extents.

Quoted 2 lines

Any advice in which procedure I should use to accomplish this?

pvmove one LV at a time.

Signature · 4 lines
	      Stuart D. Gathman <[email protected]>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.