-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding 640_verify_lvm_conf.sh script #2107
Conversation
Signed-off-by: Gratien D'haese <gratien.dhaese@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current sed
command does nothing
if use_lvmetad =
is in a comment like
# Set 'use_lvmetad = 1' to cache metadata
e.g.
$ echo "# Set 'use_lvmetad = 1' to cache metadata" | sed 's/use_lvmetad =.*/use_lvmetad = 0/'
# Set 'use_lvmetad = 0
cf. #2070
so I suggest to change the sed
command similar as in
https://github.com/rear/rear/pull/2070/files
to enforce use_lvmetad = 0
is actually active
in $ROOTFS_DIR/etc/lvm/lvm.conf
The problem with /etc/lvm/lvm.conf is that use_lvmetad = 0
cannot be simply appended to the end of the file as in
https://github.com/rear/rear/pull/2070/files
because use_lvmetad = 0
must be set within the global
section in /etc/lvm/lvm.conf so that I suggest to append
use_lvmetad = 0
after the global {
line like
sed -e 's/.*use_lvmetad =.*/\t#&/' -e '/global {/ a \\tuse_lvmetad = 0'
which intends to even keep the tabs as in my /etc/lvm/lvm.conf
but because man lvm.conf
reads on my SLES systems (even down to SLES11)
SYNTAX
This section describes the configuration file syntax.
Whitespace is not significant unless it is within quotes.
This provides a wide choice of acceptable indentation styles.
Comments begin with # and continue to the end of the line.
They are treated as whitespace.
we can use a simpler (and hopefully more robust and fail-safe)
sed
command for example like
sed -e 's/.*use_lvmetad =.*/# &/' -e '/global {/ a use_lvmetad = 0'
A remaining possible point of failure is that a global {
line must exist
with exactly that syntax but it could be different like
global {
because whitespace is not significant in /etc/lvm/lvm.conf
I think enforcing |
On my SLES15-like openSUSE Leap 15.0 system I have
but on my SLES11 system I do not have
which also works on my SLES15-like openSUSE Leap 15.0 system
but according to
at some later time
|
Signed-off-by: Gratien D'haese <gratien.dhaese@gmail.com>
Signed-off-by: Gratien D'haese gratien.dhaese@gmail.com
Type: Enhancement
Impact: Low
Reference to related issue (URL): WARNING: Failed to connect to lvmetad. Falling back to device scanning #2044
How was this pull request tested? via automated testing
Brief description of the changes in this pull request: