From: Heming Zhao <firstname.lastname@example.org>
To: "email@example.com" <firstname.lastname@example.org>
Subject: [linux-lvm] Question about vgreduce on raid lvm cache
Date: Fri, 29 Nov 2019 08:35:12 +0000 [thread overview]
Message-ID: <email@example.com> (raw)
I met a lvm cache issue recently.
The machine had an LVM VG configured with:
dev1 + dev2 -> data_lv with raid 1 mirror
dev3 + dev4 -> data_cache_lv with raid 1 mirror and type cache
These were assembled to a cached volume with:
"lvconvert --type cache --cachemode writeback --cachepool data/data_cache_lv data/data_lv"
The device dev4 then died and was removed from the system.
When attempting to remove the device using "vgreduce --removemissing", lvm removed both data_cache_lv and data_lv from the data vg.
This is unexpected behaviour, as dev1, dev2, dev3 were all still present.
The expected behaviour should:
lvconvert -m0 system/lv
When it's a non-cached type, and you performe vgreduce, lvs are NOT removed.
the (reproduced) command list:
pvcreate /dev/mapper/dev1 /dev/mapper/dev2 /dev/mapper/dev3 /dev/mapper/dev4
vgcreate VG /dev/mapper/dev1 /dev/mapper/dev2 /dev/mapper/dev3 /dev/mapper/dev4
lvcreate --type raid1 -m 1 -L150 -n data_lv VG /dev/mapper/dev1 /dev/mapper/dev2
lvcreate --type raid1 -m 1 -L150 -n data_cache_lv VG /dev/mapper/dev3 /dev/mapper/dev4
lvconvert --type cache --cachemode writeback --cachepool VG/data_cache_lv VG/data_lv
dmsetup remove -f dev4
vgreduce --removemissing --force VG
next reply other threads:[~2019-11-29 8:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-29 8:35 Heming Zhao [this message]
2020-01-03 3:10 ` [linux-lvm] Question about vgreduce on raid lvm cache Heming Zhao
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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).