From: "Tomas Dalebjörk" <tomas.dalebjork@gmail.com>
To: Zdenek Kabelac <zkabelac@redhat.com>
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] exposing snapshot block device
Date: Mon, 7 Sep 2020 23:02:08 +0200 [thread overview]
Message-ID: <B3B1DFAA-80ED-4B8B-91CF-B3F2406A19BB@gmail.com> (raw)
In-Reply-To: <99376C3F-DB70-4917-BA62-3A51A55F6DF5@gmail.com>
it worked
I missed the -Zn flag
Sent from my iPhone
> On 7 Sep 2020, at 21:56, Tomas Dalebjörk <tomas.dalebjork@gmail.com> wrote:
>
> hi
> I tried all these steps
> but when I associated the snapshot cow device back to an empty origin, and typed the lvs command
> the data% output shows 0% instead of 37% ?
> so it looks like that the lvconvert -s vg1/lvsnap vg1/lv0 looses the cow data?
>
> perhaps ypu can guide me how this can be done?
>
> btw, just to emulate s full copy, I executed the
> dd if=/dev/vg0/lv0 of=/dev/vg1/lv0
> before the lvconvert -s, to make sure the last data is there
>
> and than I tried to mount the vg1/lv0 which worked fine
> but the data was not at snapshot view
> even mounting vg1/lvsnap works fine
> but with wrong data
>
> confused over how and why vgmerge should be used as vgsplit does the work?
>
> regards Tomas
>
> Sent from my iPhone
>
>> On 7 Sep 2020, at 18:42, Zdenek Kabelac <zkabelac@redhat.com> wrote:
>>
>> Dne 07. 09. 20 v 18:34 Tomas Dalebjörk napsal(a):
>>> 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
>>
>>
>> Hi
>>
>> Here you would need to use 'vgsplit' rather - otherwise you
>> loose the mapping for whatever was living on /dev/loop1
>>
>>> # vgcreate vg1 /dev/loop2
>>> # lvcreate -n lv0 -l 1 vg1
>>> # vgextend vg1 /dev/loop1
>>
>> And 'vgmerge'
>>
>>
>>> # lvconvert -s vg1/lvsnap vg1/lv0
>>> not sure if the steps are correct?
>>
>>
>> I hope you realize the content of vg1/lv0 must be exactly same
>> as vg0/lv0.
>>
>> As snapshot COW volume contains only 'diff chunks' - so if you
>> would attach snapshot to 'different' lv - you would get only mess.
>>
>>
>> Zdenek
>>
next prev parent reply other threads:[~2020-09-07 21:02 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-22 10:47 [linux-lvm] exposing snapshot block device Dalebjörk, Tomas
2019-10-22 13:57 ` Zdenek Kabelac
2019-10-22 15:29 ` Dalebjörk, Tomas
2019-10-22 15:36 ` Zdenek Kabelac
2019-10-22 16:13 ` Dalebjörk, Tomas
2019-10-23 10:26 ` Zdenek Kabelac
2019-10-23 10:56 ` Tomas Dalebjörk
2019-10-22 16:15 ` Stuart D. Gathman
2019-10-22 17:02 ` Tomas Dalebjörk
2019-10-22 21:38 ` Gionatan Danti
2019-10-22 22:53 ` Stuart D. Gathman
2019-10-23 6:58 ` Gionatan Danti
2019-10-23 10:06 ` Tomas Dalebjörk
2019-10-23 10:12 ` Zdenek Kabelac
2019-10-23 10:46 ` Zdenek Kabelac
2019-10-23 11:08 ` Gionatan Danti
2019-10-23 11:24 ` Tomas Dalebjörk
2019-10-23 11:26 ` Tomas Dalebjörk
2019-10-24 16:01 ` Zdenek Kabelac
2019-10-25 16:31 ` Tomas Dalebjörk
2019-11-04 5:54 ` Tomas Dalebjörk
2019-11-04 10:07 ` Zdenek Kabelac
2019-11-04 14:40 ` Tomas Dalebjörk
2019-11-04 15:04 ` Zdenek Kabelac
2019-11-04 17:28 ` Tomas Dalebjörk
2019-11-05 16:24 ` Zdenek Kabelac
2019-11-05 16:40 ` Mikulas Patocka
2019-11-05 20:56 ` Tomas Dalebjörk
2019-11-06 9:22 ` Zdenek Kabelac
2019-11-07 16:54 ` Mikulas Patocka
2019-11-07 17:29 ` Tomas Dalebjörk
2020-09-04 12:09 ` Tomas Dalebjörk
2020-09-04 12:37 ` Zdenek Kabelac
2020-09-07 13:09 ` Mikulas Patocka
2020-09-07 14:14 ` Dalebjörk, Tomas
2020-09-07 14:17 ` Zdenek Kabelac
2020-09-07 16:34 ` Tomas Dalebjörk
2020-09-07 16:42 ` Zdenek Kabelac
2020-09-07 17:37 ` Tomas Dalebjörk
2020-09-07 17:50 ` Zdenek Kabelac
2020-09-08 12:32 ` Dalebjörk, Tomas
2020-09-07 19:56 ` Tomas Dalebjörk
2020-09-07 20:22 ` Tomas Dalebjörk
2020-09-07 21:02 ` Tomas Dalebjörk [this message]
2019-10-23 12:12 ` Ilia Zykov
2019-10-23 12:20 ` Ilia Zykov
2019-10-23 13:05 ` Zdenek Kabelac
2019-10-23 14:40 ` Gionatan Danti
2019-10-23 15:46 ` Ilia Zykov
2019-10-23 12:59 ` Zdenek Kabelac
2019-10-23 14:37 ` Gionatan Danti
2019-10-23 15:37 ` Zdenek Kabelac
2019-10-23 17:16 ` Gionatan Danti
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=B3B1DFAA-80ED-4B8B-91CF-B3F2406A19BB@gmail.com \
--to=tomas.dalebjork@gmail.com \
--cc=linux-lvm@redhat.com \
--cc=zkabelac@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 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).