All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Papik <mp6058@gmail.com>
To: linux-lvm@redhat.com
Subject: [linux-lvm] pvmove
Date: Fri, 19 Jul 2013 21:14:07 +0300	[thread overview]
Message-ID: <51E981EF.3020007@gmail.com> (raw)

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#

             reply	other threads:[~2013-07-19 18:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19 18:14 Martin Papik [this message]
2013-07-19 19:59 ` [linux-lvm] pvmove 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51E981EF.3020007@gmail.com \
    --to=mp6058@gmail.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.