Skip to contentSkip to conversation

pvmove errors

linux-lvm Tom Lanyon 2 participants 4 messages Jan 31, 2006 – Feb 2, 2006

lore
Share & tools
lore

Tom Lanyon

author
#0 lore raw

Hi List,

I need to move all the data off of my external scsi array and remove it from my volume group.
The external array is /dev/cciss/c1d0p0, so I issued a pvmove with the following results:

Quoted 10 lines

/sbin/sh-2.05b# pvmove --version
pvmove: Logical Volume Manager 1.0.8-2
Heinz Mauelshagen, Red Hat 26/05/2004 (IOP 10)

/sbin/sh-2.05b# pvscan
pvscan -- reading all physical volumes (this may take a while...)

pvscan -- ACTIVE    PV  "/dev/cciss/c1d0p1" of VG "Volume0" [99.99 GB / 99.99 GB Free]
pvscan -- ACTIVE    PV  "/dev/cciss/c0d0p2" of VG "Volume0" [136.61 GB / 68.89 GB Free]

pvscan -- total: 2 [236.62 GB] / in use: 2 [236.62 GB] / in no VG: 0 [0]

Quoted 9 lines

/sbin/sh-2.05b# pvmove /dev/cciss/c1d0p1
pvmove -- moving physical extents in active volume group "Volume0"
pvmove -- WARNING: if you lose power during the move you may need to restore your LVM metadata from backup! pvmove -- do you want to continue? [y/n] y
/dev/Volume0/group::/dev/Volume0/root: 6901 8704, 6802 8832
pvmove -- ERROR "Invalid argument" copying extent from "/dev/cciss/c1d0p1"
pvmove -- ERROR "Invalid argument" remapping
pvmove -- ERROR "pv_move(): LE of LV remap" moving physical extents

I've tried a --force but that didn't help.

Any ideas? Need to get this drive out of the VG asap.

Regards,
Tom

Signature · 6 lines
Tom Lanyon
Systems Administrator
NetSpot Pty Ltd
183 Melbourne Street, North Adelaide, 5006
Ph: +618 8361 6800   Fax: +618 8361 6811
Email: [email protected]
#1 lore raw
Quoted 3 lines · Tom Lanyon

I need to move all the data off of my external scsi array and remove it from my volume group.
The external array is /dev/cciss/c1d0p0, so I issued a pvmove with the

Sounds straightforward.

Quoted 7 lines

following results:

Quoted 6 lines

/sbin/sh-2.05b# pvscan
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- ACTIVE PV "/dev/cciss/c1d0p1" of VG "Volume0" [99.99 GB /
99.99 GB Free] pvscan -- ACTIVE PV "/dev/cciss/c0d0p2" of VG
"Volume0" [136.61 GB / 68.89 GB Free] pvscan -- total: 2 [236.62 GB] / in
use: 2 [236.62 GB] / in no VG: 0 [0]

I don't see /dev/cciss/c1d0p0 in the pvscan output. It does show that /dev/cciss/c1d0p1 is unused. Also /dev/cciss/c0d0p2 is much larger than c1d0p1.

Quoted 1 line
Quoted 1 line

/sbin/sh-2.05b# pvmove /dev/cciss/c1d0p1

Is this what you mean? pvmove will remove all extents used on the specified PV off of it.

Quoted 1 line

I've tried a --force but that didn't help.

I'm unclear about what device you are trying to reduce....... A little more clarity please.

--
Zac Slade

author
#2 lore raw
Quoted 35 lines · Zac Slade
Quoted 5 lines · Tom Lanyon

I need to move all the data off of my external scsi array and remove it from my volume group.
The external array is /dev/cciss/c1d0p0, so I issued a pvmove with the

Sounds straightforward.

Quoted 11 lines

following results:

Quoted 8 lines

/sbin/sh-2.05b# pvscan
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- ACTIVE PV "/dev/cciss/c1d0p1" of VG "Volume0" [99.99 GB /
99.99 GB Free] pvscan -- ACTIVE PV "/dev/cciss/c0d0p2" of VG
"Volume0" [136.61 GB / 68.89 GB Free] pvscan -- total: 2 [236.62 GB] / in
use: 2 [236.62 GB] / in no VG: 0 [0]

I don't see /dev/cciss/c1d0p0 in the pvscan output. It does show that /dev/cciss/c1d0p1 is unused. Also /dev/cciss/c0d0p2 is much larger than c1d0p1.

Quoted 3 lines
Quoted 3 lines

/sbin/sh-2.05b# pvmove /dev/cciss/c1d0p1

Is this what you mean? pvmove will remove all extents used on the specified PV off of it.

Quoted 10 lines
Quoted 3 lines

I've tried a --force but that didn't help.

I'm unclear about what device you are trying to reduce....... A little more clarity please.

--
Zac Slade

Heh, Sorry Zac - should've payed more attention to what I was typing...

pvscan -- ACTIVE    PV  "/dev/cciss/c1d0p1" of VG "Volume0" [99.99 GB / 99.99 GB Free]
pvscan -- ACTIVE    PV  "/dev/cciss/c0d0p2" of VG "Volume0" [136.61 GB / 68.89 GB Free] 

I need to remove /dev/cciss/c1d0p1.
pvscan shows that its unused, but a "vgreduce Volume0 /dev/cciss/c1d0p1" tells me it can't reduce because the PV is used.

Any ideas?

Signature · 6 lines
Tom Lanyon
Systems Administrator
NetSpot Pty Ltd
183 Melbourne Street, North Adelaide, 5006
Ph: +618 8361 6800   Fax: +618 8361 6811
Email: [email protected]
#3 lore raw
Quoted 4 lines · Tom Lanyon

pvscan -- ACTIVE PV "/dev/cciss/c1d0p1" of VG "Volume0" [99.99 GB /
99.99 GB Free] pvscan -- ACTIVE PV "/dev/cciss/c0d0p2" of VG "Volume0"
[136.61 GB / 68.89 GB Free]
I need to remove /dev/cciss/c1d0p1.

Okay this is more clear. Yes the pv is unused and should be possible to cleanly remove the pv from the volumegroup.

Quoted 2 lines

pvscan shows that its unused, but a "vgreduce Volume0 /dev/cciss/c1d0p1" tells me it can't reduce because the PV is used.

It's always more helpful to post the output of vgreduce, but I'll take a stab here.

Quoted 1 line

Any ideas?

First you should mark the pv as unallocatable pvchange -x no /dev/cciss/c1d0p1 The next step is to remove the pv from the volume group using vgreduce Volume0 /dev/cciss/c1d0p1 or alternatively vgreduce -a Volume0

If those do not work please post the output of those commands. --
Zac Slade