From 1ced65b6b4d862c51f77fc4cde18e014884e19a1 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Wed, 14 Aug 2024 15:09:50 +0200 Subject: [PATCH] tools: vgscan: accept --refresh option --- man/vgscan.8_pregen | 14 ++++++++++++++ tools/args.h | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/man/vgscan.8_pregen b/man/vgscan.8_pregen index 7b4ffb615..7c6be1255 100644 --- a/man/vgscan.8_pregen +++ b/man/vgscan.8_pregen @@ -27,6 +27,8 @@ vgscan scans all supported LVM block devices in the system for VGs. .br [ \fB--notifydbus\fP ] .br +[ \fB--refresh\fP ] +.br [ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ] .br [ COMMON_OPTIONS ] @@ -158,6 +160,7 @@ Display long help text. .br Also checks the LVM special files in /dev that are needed for active LVs and creates any missing ones and removes unused ones. +See also additional --refresh option for use in udev environment. . .HP \fB--nohints\fP @@ -192,6 +195,17 @@ Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress any prompts with answer 'no'. . .HP +\fB--refresh\fP +.br +If the LV is active, reload its metadata. +In an environment where udev is used to manage the /dev content, +usage of this option is highly recommended. This is because refresh +also regenerates udev events for an LV based on which existing udev +rules are applied to set the /dev content and permissions. +Also, this operation may be useful if something has gone wrong, +or if some form of manual LV sharing is being used. +. +.HP \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP .br Overrides current output format for reports which is defined globally by diff --git a/tools/args.h b/tools/args.h index 6b4192400..754079e71 100644 --- a/tools/args.h +++ b/tools/args.h @@ -523,7 +523,8 @@ arg(mirrorsonly_ARG, '\0', "mirrorsonly", 0, 0, 0, arg(mknodes_ARG, '\0', "mknodes", 0, 0, 0, "Also checks the LVM special files in /dev that are needed for active\n" - "LVs and creates any missing ones and removes unused ones.\n") + "LVs and creates any missing ones and removes unused ones.\n" + "See also additional --refresh option for use in udev environment.\n") arg(monitor_ARG, '\0', "monitor", bool_VAL, 0, 0, "Start (yes) or stop (no) monitoring an LV with dmeventd.\n" @@ -688,6 +689,7 @@ arg(refresh_ARG, '\0', "refresh", 0, 0, 0, "#vgchange\n" "#lvchange\n" "#vgmknodes\n" + "#vgscan\n" "If the LV is active, reload its metadata.\n" "In an environment where udev is used to manage the /dev content,\n" "usage of this option is highly recommended. This is because refresh\n"