linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Prepend LV
@ 2018-09-03  9:04 Oleksandr Panchuk
  2018-09-03 10:40 ` Daniel Etter
  2018-09-03 14:52 ` Zdenek Kabelac
  0 siblings, 2 replies; 6+ messages in thread
From: Oleksandr Panchuk @ 2018-09-03  9:04 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

Hello, All

I have not found any documentation about how to prepend LV with some free
space
.
Possible use case - we have LV with filesystem and data on it. But to
migrate this LV to KVM virtual machine we need to craft partition inside
this LV with already existing data.

I know it is possible to create new LV and copy data here, but it could be
time consuming for big LVs.

So, Is there any way to prepend LV with some free space ?

Thanks in advance,
Alex

[-- Attachment #2: Type: text/html, Size: 609 bytes --]

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

* Re: [linux-lvm] Prepend LV
  2018-09-03  9:04 [linux-lvm] Prepend LV Oleksandr Panchuk
@ 2018-09-03 10:40 ` Daniel Etter
  2018-09-03 11:02   ` Oleksandr Panchuk
  2018-09-03 14:52 ` Zdenek Kabelac
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Etter @ 2018-09-03 10:40 UTC (permalink / raw)
  To: LVM general discussion and development

Hello

> Oleksandr Panchuk <panolex@gmail.com> hat am 3. September 2018 um 11:04 geschrieben:
> 
> So, Is there any way to prepend LV with some free space ?

I don't know what a LV with free space should be good for,
but you can achieve this by lvextend.

#lvs  /dev/mapper/system-home
 LV   VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
 home system -wi-ao---- 25.00g

# df -h /home
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/system-home   25G  8.0G   16G  34% /home

# lvextend -L +20G /dev/mapper/system-home
  Size of logical volume system/home changed from 25.00 GiB (6400 extents) to 45.00 GiB (11520 extents).
  Logical volume home successfully resized

# df -h /home
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/system-home   25G  8.0G   16G  34% /home

# lvs /dev/mapper/system-home
  LV   VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home system -wi-ao---- 45.00g                                                    


Daniel

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

* Re: [linux-lvm] Prepend LV
  2018-09-03 10:40 ` Daniel Etter
@ 2018-09-03 11:02   ` Oleksandr Panchuk
  0 siblings, 0 replies; 6+ messages in thread
From: Oleksandr Panchuk @ 2018-09-03 11:02 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1755 bytes --]

Daniel,

Thanks for fast reply. But I looks like lvextend appends space after LV.

And after running lvextend we will get following:

[25GB LV] + [20 GB free space]

free space added after original LV.

But we need to prepend free space before original LV:

[20 GB free space] + [25GB LV]

free space added before original LV.

Thanks,
Alex

пн, 3 вер. 2018 о 13:43 Daniel Etter <daniel@obastrlx.ch> пише:

> Hello
>
> > Oleksandr Panchuk <panolex@gmail.com> hat am 3. September 2018 um 11:04
> geschrieben:
> >
> > So, Is there any way to prepend LV with some free space ?
>
> I don't know what a LV with free space should be good for,
> but you can achieve this by lvextend.
>
> #lvs  /dev/mapper/system-home
>  LV   VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync
> Convert
>  home system -wi-ao---- 25.00g
>
> # df -h /home
> Filesystem               Size  Used Avail Use% Mounted on
> /dev/mapper/system-home   25G  8.0G   16G  34% /home
>
> # lvextend -L +20G /dev/mapper/system-home
>   Size of logical volume system/home changed from 25.00 GiB (6400 extents)
> to 45.00 GiB (11520 extents).
>   Logical volume home successfully resized
>
> # df -h /home
> Filesystem               Size  Used Avail Use% Mounted on
> /dev/mapper/system-home   25G  8.0G   16G  34% /home
>
> # lvs /dev/mapper/system-home
>   LV   VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log
> Cpy%Sync Convert
>   home system -wi-ao---- 45.00g
>
>
>
> Daniel
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

[-- Attachment #2: Type: text/html, Size: 2778 bytes --]

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

* Re: [linux-lvm] Prepend LV
  2018-09-03  9:04 [linux-lvm] Prepend LV Oleksandr Panchuk
  2018-09-03 10:40 ` Daniel Etter
@ 2018-09-03 14:52 ` Zdenek Kabelac
  2018-09-10 16:09   ` Ondrej Kozina
  1 sibling, 1 reply; 6+ messages in thread
From: Zdenek Kabelac @ 2018-09-03 14:52 UTC (permalink / raw)
  To: LVM general discussion and development, Oleksandr Panchuk

Dne 3.9.2018 v 11:04 Oleksandr Panchuk napsal(a):
> Hello, All
> 
> I have not found any documentation about how to prepend LV with some free space
> .
> Possible use case - we have LV with filesystem and data on it. But to migrate 
> this LV to KVM virtual machine we need to craft partition inside this LV with 
> already existing data.
> 
> I know it is possible to create new LV and copy data here, but it could be 
> time consuming for big LVs.
> 
> So, Is there any way to prepend LV with some free space ?
> 

Hi

Lvm2 does NOT support prepend ATM - as there was no big need for such operation.

On the other hand - experienced user can  with really low 'math-skill' 
requirements  for a manual  extension on the 'ASCII VG metadata' file in 'vi' 
editor -  the format is quite easy to follow.

I assume there is already some RFE to provide such support - in terms of 
existing limitation that you need to always prepend whole 'extent'  (so i.e. 
with 4MiB  extent size - you need to prepend at least 4MiB)

Regards


Zdenek

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

* Re: [linux-lvm] Prepend LV
  2018-09-03 14:52 ` Zdenek Kabelac
@ 2018-09-10 16:09   ` Ondrej Kozina
  2018-09-21 13:07     ` Oleksandr Panchuk
  0 siblings, 1 reply; 6+ messages in thread
From: Ondrej Kozina @ 2018-09-10 16:09 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Oleksandr Panchuk, Zdenek Kabelac

On 09/03/2018 04:52 PM, Zdenek Kabelac wrote:
> 
> I assume there is already some RFE to provide such support - in terms of
> existing limitation that you need to always prepend whole 'extent'  (so i.e.
> with 4MiB  extent size - you need to prepend at least 4MiB)

Here it goes: https://bugzilla.redhat.com/show_bug.cgi?id=1609189

Regards
O.

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

* Re: [linux-lvm] Prepend LV
  2018-09-10 16:09   ` Ondrej Kozina
@ 2018-09-21 13:07     ` Oleksandr Panchuk
  0 siblings, 0 replies; 6+ messages in thread
From: Oleksandr Panchuk @ 2018-09-21 13:07 UTC (permalink / raw)
  To: okozina; +Cc: zkabelac, linux-lvm

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]

Hi, Ondrej

Thanks for link.
 I'm looking forward for this feature in nearest LVM releases.

Thanks,
Alex

пн, 10 вер. 2018 о 19:09 Ondrej Kozina <okozina@redhat.com> пише:

> On 09/03/2018 04:52 PM, Zdenek Kabelac wrote:
> >
> > I assume there is already some RFE to provide such support - in terms of
> > existing limitation that you need to always prepend whole 'extent'  (so
> i.e.
> > with 4MiB  extent size - you need to prepend at least 4MiB)
>
> Here it goes: https://bugzilla.redhat.com/show_bug.cgi?id=1609189
>
> Regards
> O.
>

[-- Attachment #2: Type: text/html, Size: 1012 bytes --]

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

end of thread, other threads:[~2018-09-21 13:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03  9:04 [linux-lvm] Prepend LV Oleksandr Panchuk
2018-09-03 10:40 ` Daniel Etter
2018-09-03 11:02   ` Oleksandr Panchuk
2018-09-03 14:52 ` Zdenek Kabelac
2018-09-10 16:09   ` Ondrej Kozina
2018-09-21 13:07     ` Oleksandr Panchuk

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).