* [linux-lvm] merge two lvms on same VG
@ 2012-09-05 12:16 tariq wali
2012-09-10 10:32 ` Fran Garcia
2012-09-10 15:49 ` flavio-redhat
0 siblings, 2 replies; 5+ messages in thread
From: tariq wali @ 2012-09-05 12:16 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
Hi, I had a situation to combine two LVM's on the same VG , other than
wiping the existing ones and recreating a new one is there a way to merge
the two on same VG ?
--
*Tariq Wali.*
[-- Attachment #2: Type: text/html, Size: 402 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] merge two lvms on same VG
2012-09-05 12:16 [linux-lvm] merge two lvms on same VG tariq wali
@ 2012-09-10 10:32 ` Fran Garcia
2012-09-10 11:29 ` tariq wali
2012-09-10 15:49 ` flavio-redhat
1 sibling, 1 reply; 5+ messages in thread
From: Fran Garcia @ 2012-09-10 10:32 UTC (permalink / raw)
To: LVM general discussion and development
On Wed, Sep 5, 2012 at 1:16 PM, tariq wali <ganaiwali@gmail.com> wrote:
> Hi, I had a situation to combine two LVM's on the same VG , other than
> wiping the existing ones and recreating a new one is there a way to merge
> the two on same VG ?
vgmerge. You need to have the source VG with all your LVs inactive
and the PE size must be the same in both VGs.
Basically this would be:
lvchange -a n /dev/vg02/lv01
lvchange -a n /dev/vg02/lv02
lvchange -a n /dev/vg02/lv03
...
vgmerge vg01 vg02
vgchange -ay
this would put all the LVs from vg02 into the vg01 VG.
HTH
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] merge two lvms on same VG
2012-09-10 10:32 ` Fran Garcia
@ 2012-09-10 11:29 ` tariq wali
2012-09-10 21:17 ` Scott Merrilees
0 siblings, 1 reply; 5+ messages in thread
From: tariq wali @ 2012-09-10 11:29 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]
thanks for the reply , but wouldn't that merge LV's from two different
volume groups and for some weird requirement I wanted to merge LV's from
the same VG , say
merge /dev/vg0/data and /dev/vg0/data1 into a merged volume without any
data loss .
On Mon, Sep 10, 2012 at 4:02 PM, Fran Garcia <franchu.garcia@gmail.com>wrote:
> On Wed, Sep 5, 2012 at 1:16 PM, tariq wali <ganaiwali@gmail.com> wrote:
> > Hi, I had a situation to combine two LVM's on the same VG , other than
> > wiping the existing ones and recreating a new one is there a way to merge
> > the two on same VG ?
>
> vgmerge. You need to have the source VG with all your LVs inactive
> and the PE size must be the same in both VGs.
>
>
> Basically this would be:
>
> lvchange -a n /dev/vg02/lv01
> lvchange -a n /dev/vg02/lv02
> lvchange -a n /dev/vg02/lv03
> ...
> vgmerge vg01 vg02
> vgchange -ay
>
>
> this would put all the LVs from vg02 into the vg01 VG.
>
> HTH
>
> _______________________________________________
> 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/
>
--
*Tariq Wali.*
[-- Attachment #2: Type: text/html, Size: 2059 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] merge two lvms on same VG
2012-09-05 12:16 [linux-lvm] merge two lvms on same VG tariq wali
2012-09-10 10:32 ` Fran Garcia
@ 2012-09-10 15:49 ` flavio-redhat
1 sibling, 0 replies; 5+ messages in thread
From: flavio-redhat @ 2012-09-10 15:49 UTC (permalink / raw)
To: linux-lvm
On 09/05/2012 02:16 PM, tariq wali wrote:
> Hi, I had a situation to combine two LVM's on the same VG , other than
> wiping the existing ones and recreating a new one is there a way to
> merge the two on same VG ?
No. You must delete one of the 2 and extend the remaining one.
If you don't have enough space to save all the data in the LV that you
want to delete, you can manually shrink the filesystem on it, shrink the
LV, extend the other LV, extend the filesystem and move data. Then
restart shrinking and extending until all the data is moved.
--
Flavio Visentin
A computer is like an air conditioner,
it stops working when you open Windows
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] merge two lvms on same VG
2012-09-10 11:29 ` tariq wali
@ 2012-09-10 21:17 ` Scott Merrilees
0 siblings, 0 replies; 5+ messages in thread
From: Scott Merrilees @ 2012-09-10 21:17 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]
Use vgcfgbackup then edit the backup, then restore the edited backup. You
might have to create a test lv with similar geometry to see how the lv is
represented in the config file.
On Sep 10, 2012 11:40 PM, "tariq wali" <ganaiwali@gmail.com> wrote:
> thanks for the reply , but wouldn't that merge LV's from two different
> volume groups and for some weird requirement I wanted to merge LV's from
> the same VG , say
>
> merge /dev/vg0/data and /dev/vg0/data1 into a merged volume without any
> data loss .
>
> On Mon, Sep 10, 2012 at 4:02 PM, Fran Garcia <franchu.garcia@gmail.com>wrote:
>
>> On Wed, Sep 5, 2012 at 1:16 PM, tariq wali <ganaiwali@gmail.com> wrote:
>> > Hi, I had a situation to combine two LVM's on the same VG , other than
>> > wiping the existing ones and recreating a new one is there a way to
>> merge
>> > the two on same VG ?
>>
>> vgmerge. You need to have the source VG with all your LVs inactive
>> and the PE size must be the same in both VGs.
>>
>>
>> Basically this would be:
>>
>> lvchange -a n /dev/vg02/lv01
>> lvchange -a n /dev/vg02/lv02
>> lvchange -a n /dev/vg02/lv03
>> ...
>> vgmerge vg01 vg02
>> vgchange -ay
>>
>>
>> this would put all the LVs from vg02 into the vg01 VG.
>>
>> HTH
>>
>> _______________________________________________
>> 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/
>>
>
>
>
> --
> *Tariq Wali.*
>
>
> _______________________________________________
> 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: 2966 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-10 21:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 12:16 [linux-lvm] merge two lvms on same VG tariq wali
2012-09-10 10:32 ` Fran Garcia
2012-09-10 11:29 ` tariq wali
2012-09-10 21:17 ` Scott Merrilees
2012-09-10 15:49 ` flavio-redhat
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.