RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2150109 - Metadata requirements for snapshots can be underpredicted by thin_metadata_size
Summary: Metadata requirements for snapshots can be underpredicted by thin_metadata_size
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: stratisd
Version: 9.2
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: 9.2
Assignee: Bryan Gurney
QA Contact: Filip Suba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-01 20:54 UTC by Bryan Gurney
Modified: 2023-05-09 08:49 UTC (History)
4 users (show)

Fixed In Version: stratisd-3.4.2-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:41:19 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-141083 0 None None None 2022-12-01 21:02:54 UTC
Red Hat Product Errata RHBA-2023:2272 0 None None None 2023-05-09 07:41:26 UTC

Description Bryan Gurney 2022-12-01 20:54:55 UTC
Description of problem:

It is possible for the metadata space of a Stratis pool to become full under certain conditions.

Version-Release number of selected component (if applicable):
stratisd-3.4.0-1.el9
(Upstream issue, originally opened August 10, 2022: https://github.com/stratis-storage/project/issues/495 )


How reproducible:
This issue was originally difficult to reproduce, but the procedure below should be able to reproduce 100% of the time.
It seems to be more reproducible with a smaller block device, and a larger data file written to the initial filesystem.


Steps to Reproduce:
1. Create a Stratis pool on a device partition of 8 GiB in size, as "spool1".
# stratis pool create spool1 <device>

2. Create a filesystem on the pool with the following command:
# stratis fs create spool1 sfs1 --size 2GiB

3. Create a mount directory, "/mnt/sfs1", and mount the filesystem:
# mount /dev/stratis/spool1/sfs1 /mnt/sfs1

4. Using the fio program, write a data file to the mountpoint /mnt/sfs1.

---(contents of fio config file: 800M_randwrite_sfs1.ini)---
[globals]

bs=4096
rw=randwrite
name=800M_randwrite_sfs1
numjobs=1
size=800M
group_reporting
direct=1
iodepth=1

[thread1]
filename=/mnt/sfs1/testfile
---(end of fio config)---

# fio 800M_randwrite_sfs1.ini


5. After the file has been written, start creating multiple snapshots of the filesystem sfs1:

# stratis fs snapshot spool1 sfs1 sfs1snap1

6. Repeat the "fs snapshot" command from "sfs1" to new snapshot names.

Additionally, use the "dmsetup status" command to monitor the thin pool metadata usage:
# dmsetup status --target=thin-pool



Actual results:

The thin pool of the Stratis pool reports "No free metadata blocks"

(Example, with an 8 GiB block device holding a pool with a 2 GiB initial filesystem:)

(18 snapshots: 123/165)

(19 snapshots: 128/165)
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.

(20 snapshots: 133/165)
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.

(21 snapshots: 138/165)
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.

(22 snapshots: 143/165)
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.
kernel: device-mapper: thin: 253:4: reached low water mark for metadata device: sending event.

(23 snapshots: 148/165)

(24 snapshots: 153/165)

(25 snapshots: 158/165)

(26 snapshots: 163/165)

(27 snapshots: 165/165; thin-pool in "ro" mode)
kernel: device-mapper: thin: No free metadata blocks
kernel: device-mapper: thin: 253:4: switching pool to read-only mode



Expected results:

The thin pool of the Stratis pool does not run out of metadata space.

Comment 6 Filip Suba 2023-01-02 09:22:17 UTC
Verified with stratisd-3.4.2-1.el9.

Comment 8 errata-xmlrpc 2023-05-09 07:41:19 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 (stratisd bug fix and enhancement 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/RHBA-2023:2272


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