Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1802670

Summary: If all content of a mount point is excluded, the device is marked as todo anyway
Product: Red Hat Enterprise Linux 8 Reporter: Welterlen Benoit <bwelterl>
Component: rearAssignee: Vaclav Dolezal <vdolezal>
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.2CC: pcahyna, vdolezal
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-28 08:37:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Welterlen Benoit 2020-02-13 16:54:52 UTC
Description of problem:
If we exclude the content of a mount point with 
BACKUP_PROG_EXCLUDE=( "${BACKUP_PROG_EXCLUDE[@]}" '/test' ) or '/test/*
the device mounted in /test is included in the layout anyway.

From the default.conf file, I understand it should be excluded:
---
# You cannot exclude a device (e.g. /dev/sdg) directly. Instead you have to exclude everything
# ON that device and then the dependency tracker will automatically exclude the device from the
# recovery (because there won't be any recovery information for that "unnecessary" device).
---

It works effectively with EXCLUDE_MOUNTPOINTS=( /test )

Version-Release number of selected component (if applicable):
rear-2.4-10.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1.mount | grep sdb
/dev/sdb on /test type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
2.test /etc/rear/local.conf 
BACKUP_PROG_EXCLUDE=( "${BACKUP_PROG_EXCLUDE[@]}" '/test' )
3. grep sdb /var/lib/rear/layout/disktodo.conf 
todo /dev/sdb disk


Actual results:
Device will be rebuilt even if no data will be restored on it

Expected results:
device excluded if not required, as for mount exclusion

Additional info:
Thanks

Comment 1 Vaclav Dolezal 2020-02-19 11:27:54 UTC
I think it is intended for ReaR to behave that way. The quoted comment are written next to the EXCLUDE_MOUNTPOINTS variable after all. If I look at EXCLUDE_{BACKUP,RECREATE,RESTORE}, they work in a similar pattern.

I suppose use case for this is to allow restoration of filesystems used for caching, temporary files etc.

Comment 2 Vaclav Dolezal 2020-02-28 08:37:16 UTC
Closing as NOTABUG. See comment 1 for reasoning.

Comment 3 Welterlen Benoit 2020-02-28 08:45:06 UTC
Thanks a lot for the explanation.
The root cause of the issue on customer side were somewhere else.
I will open another BZ for that.

Best regards,

Benoit