From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>,
Vojtech Juranek <vjuranek@redhat.com>
Cc: nsoffer@redhat.com
Subject: Re: [linux-lvm] Removing VG mappings using dmsetup tool
Date: Tue, 23 Jun 2020 22:28:42 +0200 [thread overview]
Message-ID: <dff2c51f-70a9-3339-6fe8-06091608b572@redhat.com> (raw)
In-Reply-To: <1643811.X513TT2pbd@localhost.localdomain>
Dne 23. 06. 20 v 16:26 Vojtech Juranek napsal(a):
> Hi,
> I'm working on storage part of oVirt project [1]. Besides other options, we
> provide iSCSI storage for VMs. We create PV(s) on attached LUN(s), create
> volume group from this PV(s) and then create LVs on this VG as needed (each
> disk on its LV, similar there's dedicated LV for our metadata etc.). VG is
> what we call (block) storage domain.
>
> When we remove storage domain we deactivate all LVs and remove LVs and VG from
> all hosts. However, when this fails (e.g. storage is for some reason
> unavailable), hosts are left with stale LVs and VG which can cause various
> issues for us. What we are going to do is to remove these stale VG mappings
> using dmsetup remove command (first we try to remove LVs using lvm, but if
> there are still some mappings, we will try to remove it using dmsetup).
>
> I'd like to head your opinion on this approach. Is it wise to use dmsetup in
> such case? Or is there any better way how to handle such situations or remove
> stale mappings?
Hi
Of course you can remove 'stale' mapping with 'dmsetup remove' -
(after all lvm2 is doing basically very similar job like
'dmsetup create/remove/load/suspend/resume'....
BUT I'd probably focus rather on fixing your oVirt workflow - you should
not be 'losing' devices while you have activate mappings on them - that's
IMHO major desing flaw - you can very easily cause very SERIOUS damages
to your on disk data consistency - so disk would require serious fsck before
reuse...
Note - you cannot 'remove' mappings 'in-use' (aka open count of a device
is higher then 0 - see 'dmsetup info -c' output for this).
However you can replace such mapping with 'error' target - so the
underlaying device is relaxed - although we do not support this
in lvm2 - you would need to use 'dmsetup' for this (and open lvm2 RFE
if there would be some serious justifaction).
Regards
Zdenek
next prev parent reply other threads:[~2020-06-23 20:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 14:26 [linux-lvm] Removing VG mappings using dmsetup tool Vojtech Juranek
2020-06-23 20:28 ` Zdenek Kabelac [this message]
2020-06-23 20:37 ` Gionatan Danti
2020-06-23 21:02 ` Zdenek Kabelac
2020-06-23 21:34 ` Gionatan Danti
2020-06-23 21:53 ` Zdenek Kabelac
2020-06-24 7:46 ` Vojtech Juranek
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=dff2c51f-70a9-3339-6fe8-06091608b572@redhat.com \
--to=zkabelac@redhat.com \
--cc=linux-lvm@redhat.com \
--cc=nsoffer@redhat.com \
--cc=vjuranek@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).