0
0
mirror of https://github.com/openwrt/packages.git synced 2025-02-12 03:28:07 +00:00
packages/utils/lvm2/files/lvm2.hotplug
Daniel Golle f32236e542 lvm2: add hotplug script to scan and enable PVs on hotplug
Automatically scan and activate physical volumes when added at runtime.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-08 15:49:20 +01:00

7 lines
180 B
Plaintext

[ "$ACTION" = "add" ] || return 0
[ -e "/dev/$DEVNAME" ] || return 0
/sbin/lvm vgscan --mknodes --devices /dev/$DEVNAME || :
/sbin/lvm vgchange -aly --devices /dev/$DEVNAME || :