linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] The logical volume cannot be activated
@ 2023-07-10  6:47 wangzhiqiang (Q)
  2023-07-10 17:04 ` David Teigland
  0 siblings, 1 reply; 3+ messages in thread
From: wangzhiqiang (Q) @ 2023-07-10  6:47 UTC (permalink / raw)
  To: linux-lvm; +Cc: linfeilong, lixiaokeng, louhongxiang, wuguanghao3

Dear all

I have a environment that disk online after switch root, link in /dev/disk/by-id is not generated when 69-dm-lvm.rules is executed,
but i set link to filter in lvm.conf, so that pvscan failed to scan physical volumes and set environment variable LVM_VG_NAME_COMPLETE,
finally, the logical volume is not activated.

69-dm-lvm.rules
IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"

There are any ways to activate logical volume in this scenario?

Looking forward to your reply, Thanks!

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] The logical volume cannot be activated
  2023-07-10  6:47 [linux-lvm] The logical volume cannot be activated wangzhiqiang (Q)
@ 2023-07-10 17:04 ` David Teigland
  2023-07-12  9:17   ` [linux-lvm] 答复: " wangzhiqiang (Q)
  0 siblings, 1 reply; 3+ messages in thread
From: David Teigland @ 2023-07-10 17:04 UTC (permalink / raw)
  To: wangzhiqiang (Q)
  Cc: linfeilong, lixiaokeng, wuguanghao3, louhongxiang, linux-lvm

On Mon, Jul 10, 2023 at 02:47:07PM +0800, wangzhiqiang (Q) wrote:
> Dear all
> 
> I have a environment that disk online after switch root, link in /dev/disk/by-id is not generated when 69-dm-lvm.rules is executed,
> but i set link to filter in lvm.conf, so that pvscan failed to scan physical volumes and set environment variable LVM_VG_NAME_COMPLETE,
> finally, the logical volume is not activated.

Hi, using /dev/disk/ links in the filter was fixed here:
https://sourceware.org/git/?p=lvm2.git;a=commit;h=17a3585cbb55d9a15ced9775a18b50c53a50ee8e

Dave
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [linux-lvm] 答复:  The logical volume cannot be activated
  2023-07-10 17:04 ` David Teigland
@ 2023-07-12  9:17   ` wangzhiqiang (Q)
  0 siblings, 0 replies; 3+ messages in thread
From: wangzhiqiang (Q) @ 2023-07-12  9:17 UTC (permalink / raw)
  To: David Teigland
  Cc: linfeilong, lixiaokeng, wuguanghao, Louhongxiang, linux-lvm

Thank you for your reply, this commit is nice.

-----邮件原件-----
发件人: David Teigland <teigland@redhat.com> 
发送时间: 2023年7月11日 1:04
收件人: wangzhiqiang (Q) <wangzhiqiang95@huawei.com>
抄送: linux-lvm@redhat.com; linfeilong <linfeilong@huawei.com>; lixiaokeng <lixiaokeng@huawei.com>; Louhongxiang <louhongxiang@huawei.com>; wuguanghao <wuguanghao3@huawei.com>
主题: Re: [linux-lvm] The logical volume cannot be activated

On Mon, Jul 10, 2023 at 02:47:07PM +0800, wangzhiqiang (Q) wrote:
> Dear all
> 
> I have a environment that disk online after switch root, link in 
> /dev/disk/by-id is not generated when 69-dm-lvm.rules is executed, but 
> i set link to filter in lvm.conf, so that pvscan failed to scan physical volumes and set environment variable LVM_VG_NAME_COMPLETE, finally, the logical volume is not activated.

Hi, using /dev/disk/ links in the filter was fixed here:
https://sourceware.org/git/?p=lvm2.git;a=commit;h=17a3585cbb55d9a15ced9775a18b50c53a50ee8e

Dave

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-12  9:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10  6:47 [linux-lvm] The logical volume cannot be activated wangzhiqiang (Q)
2023-07-10 17:04 ` David Teigland
2023-07-12  9:17   ` [linux-lvm] 答复: " wangzhiqiang (Q)

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).