Bug 1802670 - If all content of a mount point is excluded, the device is marked as todo anyway
Summary: If all content of a mount point is excluded, the device is marked as todo anyway
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rear
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Vaclav Dolezal
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-13 16:54 UTC by Welterlen Benoit
Modified: 2020-02-28 08:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-28 08:37:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


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