Bug 2092349 - Enable zeroing on the thin-pool during creation
Summary: Enable zeroing on the thin-pool during creation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: lvm-operator
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ODF 4.11.0
Assignee: N Balachandran
QA Contact: Shay Rozen
URL:
Whiteboard:
: 2091795 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-01 10:12 UTC by N Balachandran
Modified: 2023-08-09 16:46 UTC (History)
7 users (show)

Fixed In Version: 4.11.0-89
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-24 13:54:12 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github red-hat-storage lvm-operator pull 203 0 None open Bug 2092349: creates the thinpool with the -Z option 2022-06-01 10:31:45 UTC
Red Hat Product Errata RHSA-2022:6156 0 None None None 2022-08-24 13:54:26 UTC

Description N Balachandran 2022-06-01 10:12:33 UTC
Description of problem (please be detailed as possible and provide log
snippets):
The current LVMO behaviour of enabling thin_pool_zero depends on the default value in lvm.conf. The option is currently set to true. The thin_pool creation should enable this explicitly without depending on the currently set value.

Version of all relevant components (if applicable):

4.11

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?


Is there any workaround available to the best of your knowledge?


Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?


Can this issue reproducible?


Can this issue reproduce from the UI?


If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1.
2.
3.


Actual results:


Expected results:


Additional info:

Comment 5 Shay Rozen 2022-06-01 10:21:21 UTC
*** Bug 2091795 has been marked as a duplicate of this bug. ***

Comment 7 Shay Rozen 2022-06-27 20:20:48 UTC
As I remember from the original BZ the problem was that it wasn't set to true in lvmd.conf.
Please elaborate what need to check.

Comment 8 N Balachandran 2022-06-28 06:14:35 UTC
(In reply to Shay Rozen from comment #7)
> As I remember from the original BZ the problem was that it wasn't set to
> true in lvmd.conf.
> Please elaborate what need to check.

The value of zeroing is set to true in the lvmd.conf file by default. Default values are commented out in the lvmd.conf. However, LVMO should not assume that this will be the case and must enable zeroing explicitly when creating the thin pool.


lvs -o name,zero will display if zeroing is enabled on the thinpool.

For example:
sh-4.4# lvs -o name,zero
  LV          Zero
  thin-pool-1 zero


Ideally, what needs to be checked is the following:



1. With the default lvmd.conf settings, create the lvmcluster.
2. Check that zeroing is enabled on the thinpool.

2. Disable thin pool zeroing in the lvmd.conf before creating the lvmcluster.
2. Check that zeroing is enabled on the thinpool.

Comment 9 Shay Rozen 2022-07-11 09:54:53 UTC
I've check 4.11.0.113. There is no lvmd.conf file anywhere. In the past I could also do "lvm dumpconfig" and could see configuration and now:
[root@sno-edge-0 topolvm]# lvm dumpconfig
config {
}
local {
}
dmeventd {
}
activation {
}
global {
}
shell {
}
backup {
}
log {
}
allocation {
}
devices {
}

There is only /etc/lvm/lvm.conf which all the values are commented and also I have /etc/topolvm/lvmd.yaml:

device-classes:
- default: true
  lvcreate-options: null
  name: vg1
  spare-gb: null
  stripe: null
  stripe-size: ""
  thin-pool:
    name: thin-pool-1
    overprovision-ratio: 50
  type: thin
  volume-group: vg1
socket-name: /run/lvmd/lvmd.sock

zeroing is not specified there.
Need some guidance @nibalach

Comment 10 N Balachandran 2022-07-12 05:16:13 UTC
Please see comment#8.

/etc/lvm/lvm.conf is the file in question (not lvmd.conf). The commented values are the default values. Zeroing is enabled by default.

The intention is that even if the lvm.conf is updated to turn off zeroing, the thinpool created by LVMO will have zeroing enabled.

Zeroing is enabled by default in LVMO and cannot be specified by the user. The value for the thin pool can be checked by running the following command on the host :
 
lvs -o name,zero

So the test would be:
1. With the default lvm.conf settings, create the lvmcluster.
2. Check that zeroing is enabled on the thinpool.

2. Disable thin pool zeroing in the lvm.conf before creating the lvmcluster.
2. Check that zeroing is enabled on the thinpool.

Comment 11 N Balachandran 2022-07-12 05:31:56 UTC
lvmconfig --type default 

will display the default values.

Comment 12 Shay Rozen 2022-07-26 14:04:40 UTC
There is nothing to disable, by default zeroing is not enabled by config 
[root@sno-edge-0 core]# lvmconfig --type default | grep zero
	# wipe_signatures_when_zeroing_new_lvs=1
	# thin_pool_zero=1
	# zero_metadata=1
 not in /etc/lvm/lvm.conf and not in /etc/topolvm/lvmd.conf
@nibalach I can't check your scenario unless I enable zeroing myself in the config.

Comment 13 N Balachandran 2022-07-26 14:21:45 UTC
(In reply to Shay Rozen from comment #12)
> There is nothing to disable, by default zeroing is not enabled by config 
> [root@sno-edge-0 core]# lvmconfig --type default | grep zero
> 	# wipe_signatures_when_zeroing_new_lvs=1
> 	# thin_pool_zero=1
> 	# zero_metadata=1
>  not in /etc/lvm/lvm.conf and not in /etc/topolvm/lvmd.conf
> @nibalach I can't check your scenario unless I enable zeroing
> myself in the config.



The commented value is the default value. To disable it you need to uncomment it and set it to 0.

Comment 14 Shay Rozen 2022-07-26 14:42:11 UTC
[root@sno-edge-0 core]# cat /etc/lvm/lvm.conf  | grep "thin_pool_zero = 0"
	thin_pool_zero = 0

default config doesn't show it
[root@sno-edge-0 core]# lvmconfig --type default | grep "thin_pool_zero"
# thin_pool_zero=1

And zeroing is enabled:
[root@sno-edge-0 core]# lvs -o name,zero
  LV                                   Zero
  06a4cd34-13dc-4876-b034-d90c0612d784 zero
  thin-pool-1                          zero

Comment 16 errata-xmlrpc 2022-08-24 13:54:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat OpenShift Data Foundation 4.11.0 security, enhancement, & bugfix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:6156


Note You need to log in before you can comment on or make changes to this bug.