From: Bernd Broermann <bernd@broermann.com>
To: "Bryn M. Reeves" <bmr@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: DM inconsistent after disk migration
Date: Fri, 28 Oct 2011 16:06:46 +0200 [thread overview]
Message-ID: <4EAAB6F6.7080505@broermann.com> (raw)
In-Reply-To: <4EA0398D.4020207@redhat.com>
Am 20.10.2011 17:09, schrieb Bryn M. Reeves:
> On 10/20/2011 03:47 PM, Bernd Broermann wrote:
>> CODE "move" script
>> # mirror
>> pvcreate /dev/disk2
>> vgextend vg01 /dev/disk2
>> lvconvert -m1 --mirrorlog core /dev/vg01/lvdata /dev/disk2
>> # split
>> lvconvert -m0 --mirrorlog core /dev/vg01/lvdata /dev/disk1
>> vgreduce vg01 /dev/disk1
>> pvremove /dev/disk1
>
> If you just want to move the logical extents in vg01/lvdata from disk1 -> disk2 why not use pvmove?
>
> Internally it will construct a corelog mirror in a very similar way but it saves you from having to manually split things and supports transactional updates allowing the move to be automatically
> resumed if it is interrupted for any reason.
>
> E.g.:
>
> pvcreate /dev/disk2
> pvmove /dev/disk1 /dev/disk2 (you can ommit disk2 here if it's the
> only free space in the VG and pvmove will
> chose it automatically)
> vgreduce /dev/disk1
> pvremove /dev/disk1
>
>> My assumption is that SLAVE reconfigures the device-mapper not correct,
>> when doing the "move" operations on MASTER.
>
> Nothing told the SLAVE host that vg01/lvdata had changed so it still has the original PV device open (from its point of view on that side of the SRDF replication).
>
> If the LV is not in use you can just de-activate/re-activate to have it see the changes to the VG metadata:
>
> vgchange -an vg01; vgchange -ay vg01
Thank you,
you gave me the right advice.
I did a vgchange --refresh , as senn in the man page.
Other dead entries of LVs on SLAVE , I could remove with "dmsetup remove <LV device>".
Bernd
>
> Unless you're using a clustered environment with clvmd hosts that have a common view of shared storage will not be aware of on-disk changes made by another host. This is hazardous if both hosts can
> write to the storage at the same time as it's possible for simultaneous updates to the VG metadata to corrupt one another (SRDF should prevent this since only one side of the replicated device can be
> writable at a time but some care is still needed to ensure all hosts have a coherent view of the VG).
>
> Regards,
> Bryn.
>
>
prev parent reply other threads:[~2011-10-28 14:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-20 14:47 DM inconsistent after disk migration Bernd Broermann
2011-10-20 15:09 ` Bryn M. Reeves
2011-10-28 14:06 ` Bernd Broermann [this message]
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=4EAAB6F6.7080505@broermann.com \
--to=bernd@broermann.com \
--cc=bmr@redhat.com \
--cc=dm-devel@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.