Re: exposing snapshot block device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thanks for feedback 

so if I understand this correctly
# fallocate -l 100M /tmp/pv1
# fallocate -l 100M /tmp/pv2
# fallocate -l 100M /tmp/pv3

# losetup —find —show /tmp/pv1
# losetup —find —show /tmp/pv2
# losetup —find —show /tmp/pv3

# vgcreate vg0 /dev/loop0
# lvcreate -n lv0 -l 1 vg0
# vgextend vg0 /dev/loop1
# lvcreate -s -l 1 -n lvsnap /dev/loop1
# vgchange -a n vg0

# lvconvert —splitsnapshot vg0/lvsnap

# vgreduce vg0 /dev/loop1

# vgcreate vg1 /dev/loop2
# lvcreate -n lv0 -l 1 vg1
# vgextend vg1 /dev/loop1 
# lvconvert -s vg1/lvsnap vg1/lv0

not sure if the steps are correct?

regards Tomas

Sent from my iPhone

> On 7 Sep 2020, at 16:17, Zdenek Kabelac <zkabelac@xxxxxxxxxx> wrote:
> 
> Dne 07. 09. 20 v 16:14 Dalebjörk, Tomas napsal(a):
>> Hi Mikulas,
>> Thanks for the replies
>> I am confused now with the last message?
>> LVM doesn't support taking existing cow device and attaching it to an existing volume?
>> Isn't that what "lvconvert --splitsnapshot" & "lvconvert -s" is ment to be doing?
>> lets say that I create the snapshot on a different device using these steps:
>> root@src# lvcreate -s -L 10GB -n lvsnap vg/lv /dev/sdh
>> root@src# lvconvert ---splitsnapshot vg/lvsnap
>> root@src# echo "I now move /dev/sdb to another server"
>> root@tgt# lvconvert -s newvg/newlv vg/lvsnap
> 
> Hi
> 
> This is only supported as long as you stay within VG.
> So newlv & lvsnap must be in a single VG.
> 
> Note - you can 'vgreduce' PV from VG1 and vgextend to VG2.
> But it always work on whole PV base - you can't mix
> LV between VGs.
> 
> Zdenek
> 


_______________________________________________
linux-lvm mailing list
linux-lvm@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux