* [QEUSTION] VG refresh: remove disk and reinsert disk, VG not refresh
@ 2020-11-16 3:15 Wu Guanghao
2020-11-16 16:41 ` David Teigland
0 siblings, 1 reply; 3+ messages in thread
From: Wu Guanghao @ 2020-11-16 3:15 UTC (permalink / raw)
To: lvm-devel
We use LVM2.02.187 to create a logical volume on the disk,
and then remove the disk and reinsert it. When reading and
writing the logical volume, IO error occurred. But LVM2.02.181
version can be used normally.
If remove disk and reinsert disk, drive letter has changed.
Maybe /dev/sda -> /dev/sdc
LVM 2.02.181: (vg autoactivate and refresh)
# lsblk
/dev/sda (8:16) /dev/sdc (8:32)
| ----> |
|----vg-lv |----vg-lv
# dmsetup table
vg-lv: 0 20963328 linear 8:16 2048 -----> vg-lv: 0 20963328 linear 8:32 2048
_pvscan_autoactivate
|
|----_pvscan_autoactivate_single
|
|----vg_refresh_visible
|
|----lv_refresh ( refresh lv table, change dm-target)
LVM 2.02.187 and later (vg autoactivate but not refresh)
#lsblk
/dev/sda (8:16) /dev/sdc (8:32)
| ----> |
|----vg-lv |---- nothing
#dmsetup table
vg-lv: 0 20963328 linear 8:16 2048 (not change, so read/write lv failed.)
_pvscan_autoactivate
|
|----_pvscan_autoactivate_single
|
|---- vg_refresh_visible ( skip, so lv not refresh)
and later version, _pvscan_autoactivate_single has deleted.
So I want to know how to add vg refresh function in the 2.02.187 and later to keep it the same as 2.02.181,
and why delete vg refresh function?
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [QEUSTION] VG refresh: remove disk and reinsert disk, VG not refresh
2020-11-16 3:15 [QEUSTION] VG refresh: remove disk and reinsert disk, VG not refresh Wu Guanghao
@ 2020-11-16 16:41 ` David Teigland
2020-11-17 11:20 ` [QUESTION] " Wu Guanghao
0 siblings, 1 reply; 3+ messages in thread
From: David Teigland @ 2020-11-16 16:41 UTC (permalink / raw)
To: lvm-devel
On Mon, Nov 16, 2020 at 11:15:50AM +0800, Wu Guanghao wrote:
> So I want to know how to add vg refresh function in the 2.02.187 and
> later to keep it the same as 2.02.181, and why delete vg refresh
> function?
Sorry, I don't think I quite knew what a proper use of that looked like
when removing it. All the cases I saw were unnecessary or were causing
problems. The motivation was numerous problems reported about failed
activation during boot, some involving unwanted refreshes. A better fix
might have found a way to preserve it in the stable branch.
If you're compiling your own lvm it would be simple to restore, enable the
if 0 section in pvscan.c.
More generally, refresh didn't fit correctly where it was implemented. It
depended on lvmetad (now removed), and was not really related to
autoactivation. If an automatic refresh feature is warranted, it should
be designed and implemented to stand on its own.
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
* [QUESTION] VG refresh: remove disk and reinsert disk, VG not refresh
2020-11-16 16:41 ` David Teigland
@ 2020-11-17 11:20 ` Wu Guanghao
0 siblings, 0 replies; 3+ messages in thread
From: Wu Guanghao @ 2020-11-17 11:20 UTC (permalink / raw)
To: lvm-devel
Thank you for your answer, we will solve this problem in our own way.
? 2020/11/17 0:41, David Teigland ??:
> On Mon, Nov 16, 2020 at 11:15:50AM +0800, Wu Guanghao wrote:
>> So I want to know how to add vg refresh function in the 2.02.187 and
>> later to keep it the same as 2.02.181, and why delete vg refresh
>> function?
>
> Sorry, I don't think I quite knew what a proper use of that looked like
> when removing it. All the cases I saw were unnecessary or were causing
> problems. The motivation was numerous problems reported about failed
> activation during boot, some involving unwanted refreshes. A better fix
> might have found a way to preserve it in the stable branch.
>
> If you're compiling your own lvm it would be simple to restore, enable the
> if 0 section in pvscan.c.
>
> More generally, refresh didn't fit correctly where it was implemented. It
> depended on lvmetad (now removed), and was not really related to
> autoactivation. If an automatic refresh feature is warranted, it should
> be designed and implemented to stand on its own.
>
> Dave
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-17 11:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-16 3:15 [QEUSTION] VG refresh: remove disk and reinsert disk, VG not refresh Wu Guanghao
2020-11-16 16:41 ` David Teigland
2020-11-17 11:20 ` [QUESTION] " Wu Guanghao
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.