linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] pvmove
@ 2013-07-19 18:14 Martin Papik
  2013-07-19 19:59 ` Zdenek Kabelac
  0 siblings, 1 reply; 11+ messages in thread
From: Martin Papik @ 2013-07-19 18:14 UTC (permalink / raw)
  To: linux-lvm

Hi everyone

I'm new to the mailing list but not to LVM, until now everything was 
crystal clear and working fine. Now I'm either stuck or found a minor 
issue. I'm trying to move move extents on a physical volume. Not from 
one physical volume to another.

root@myhost# pvmove  /dev/md127:151808-152063 /dev/md127:152064-152319
   No extents available for allocation
root@myhost#

I also tried pvmove /dev/md127:151808-152063 /dev/md127:152064 and a few 
other combination. There are enough free extents. The volume I've 
created is 1G. There's 800 GB free. I made sure the destination blocks 
are available, I've tried different ranges.  Way below is the output of 
vgdisplay and a list of volumes and their extents.

Is this functionality (extent shuffling) supported? I mean is this a 
feature, bug or ignorance on my part?

PS, if you're wondering why would anyone want to move extents from a 
device to the very same device, you may notice in the output below that 
I have a few volumes spilt into pieces and I want to de-fragment it. I 
know it won't affect performance too much, probably at all. But it is 
going to help when (if?) I'm in dire need of dd if=/dev/xxx from the 
physical volume. Wouldn't be the first time (not the fault of LVM, 
disk+heat=bad blocks).

Thanks in advance for any ideas or scolding :-)

Martin

root@myhost# vgdisplay
   --- Volume group ---
   VG Name               volume
   System ID
   Format                lvm2
   Metadata Areas        1
   Metadata Sequence No  147
   VG Access             read/write
   VG Status             resizable
   MAX LV                0
   Cur LV                12
   Open LV               9
   Max PV                0
   Cur PV                1
   Act PV                1
   VG Size               3.35 TiB
   PE Size               4.00 MiB
   Total PE              878905
   Alloc PE / Size       666880 / 2.54 TiB
   Free  PE / Size       212025 / 828.22 GiB
   VG UUID Gv2rC8-sMgQ-xGGK-5swv-9Gck-QA1G-k50ABy

root@myhost# vgs --all -o 
+lv_name,lv_size,snap_percent,seg_pe_ranges,segtype,seg_size
   VG     #PV #LV #SN Attr   VSize VFree   LV      LSize Snap%  PE 
Ranges                Type   SSize
   volume   1  12   0 wz--n- 3.35t 828.22g home 150.00g        
/dev/md127:0-25599       linear 100.00g
   volume   1  12   0 wz--n- 3.35t 828.22g home 150.00g        
/dev/md127:72085-74495   linear   9.42g
   volume   1  12   0 wz--n- 3.35t 828.22g home 150.00g        
/dev/md127:309248-319636 linear  40.58g
   volume   1  12   0 wz--n- 3.35t 828.22g var 20.00g        
/dev/md127:25600-30719   linear  20.00g
   volume   1  12   0 wz--n- 3.35t 828.22g usr 20.00g        
/dev/md127:30720-35839   linear  20.00g
   volume   1  12   0 wz--n- 3.35t 828.22g tmp 2.00g        
/dev/md127:35840-36351   linear   2.00g
   volume   1  12   0 wz--n- 3.35t 828.22g p2p 300.00g        
/dev/md127:74496-151295  linear 300.00g
   volume   1  12   0 wz--n- 3.35t 828.22g boot 1.00g        
/dev/md127:151296-151551 linear   1.00g
   volume   1  12   0 wz--n- 3.35t 828.22g root 4.00g        
/dev/md127:152320-153343 linear   4.00g
   volume   1  12   0 wz--n- 3.35t 828.22g copy 2.00t        
/dev/md127:181248-309247 linear 500.00g
   volume   1  12   0 wz--n- 3.35t 828.22g copy 2.00t        
/dev/md127:606208-712298 linear 414.42g
   volume   1  12   0 wz--n- 3.35t 828.22g copy 2.00t        
/dev/md127:156672-181247 linear  96.00g
   volume   1  12   0 wz--n- 3.35t 828.22g copy 2.00t        
/dev/md127:36352-72084   linear 139.58g
   volume   1  12   0 wz--n- 3.35t 828.22g copy 2.00t        
/dev/md127:319637-549524 linear 898.00g
   volume   1  12   0 wz--n- 3.35t 828.22g swap 8.00g        
/dev/md127:153344-155391 linear   8.00g
   volume   1  12   0 wz--n- 3.35t 828.22g emulate 50.00g        
/dev/md127:549525-562324 linear  50.00g
   volume   1  12   0 wz--n- 3.35t 828.22g test 1.00g        
/dev/md127:151552-151807 linear   1.00g
   volume   1  12   0 wz--n- 3.35t 828.22g test2 1.00g        
/dev/md127:151808-152063 linear   1.00g
root@myhost#

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [linux-lvm] pvmove
@ 2003-07-12  7:44 Juan Pablo Giménez
  2003-07-12  8:29 ` Joe Thornber
  0 siblings, 1 reply; 11+ messages in thread
From: Juan Pablo Giménez @ 2003-07-12  7:44 UTC (permalink / raw)
  To: linux-lvm


[-- Attachment #1.1: Type: text/plain, Size: 897 bytes --]

What's more secure, the Redhat patched pvmove or the original one?

BTW, I have a little patch to fix RedHat patched pvmove and make it work
with unpatched kernels...


        --- lib/pv_move.c	2003-07-11 19:10:26.000000000 -0300
        +++ lib/pv_move.c.rcom	2003-07-11 19:09:35.000000000 -0300
        @@ -916,7 +916,7 @@
         	ret = ioctl(group, PE_LOCKED_COPY, &pe_copy_req);
         	if (ret < 0)
         		ret = -errno;
        -	if (ret == -EINVAL)
        +	if (ret == -EINVAL || ret == -ENOTTY)
         		ret = -LVM_EPV_LOCKED_COPY_EINVAL;
         	
         	close(group);
        




Juan Pablo Giménez 

http://www.rcom.com.ar/
http://www.rcom.com.ar/comunidad/
Llave GnuPG:
MIT keyserver 
Web Rcom 

GnuPG fingerprint: ED97 6FB8 A9BE
26A6 789B 6657 0A15 EC2B D3D8 FD2B 

http://www.greenpeace.org.ar/secciones/cyberactivismo/nuclear.php3

[-- Attachment #1.2: Type: text/html, Size: 2027 bytes --]

[-- Attachment #2: Esta parte del mensaje está firmada digitalmente --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-09-23 21:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-19 18:14 [linux-lvm] pvmove Martin Papik
2013-07-19 19:59 ` Zdenek Kabelac
2013-07-19 22:27   ` Martin Papik
2013-07-19 23:20     ` Alasdair G Kergon
2013-07-23  2:45       ` Martin Papik
2013-07-24  3:33         ` [linux-lvm] pvmove ==> segfault: pvs --all -o +vg_fmt Martin Papik
2013-09-23 20:38         ` [linux-lvm] pvmove Alasdair G Kergon
2013-09-23 20:56         ` Alasdair G Kergon
2013-09-23 21:10         ` Alasdair G Kergon
  -- strict thread matches above, loose matches on Subject: below --
2003-07-12  7:44 Juan Pablo Giménez
2003-07-12  8:29 ` Joe Thornber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).