Bug 1988420 - ReaR builds images by default in /tmp which often lacks space if it is on tmpfs
Summary: ReaR builds images by default in /tmp which often lacks space if it is on tmpfs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rear
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 9.0 Beta
Assignee: Pavel Cahyna
QA Contact: David Jež
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-30 13:59 UTC by Pavel Cahyna
Modified: 2021-12-07 21:32 UTC (History)
2 users (show)

Fixed In Version: rear-2.6-9.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-07 21:30:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rear rear pull 2664 0 None None None 2021-08-03 08:01:33 UTC

Description Pavel Cahyna 2021-07-30 13:59:28 UTC
ReaR creates a temporary directory using mktemp(1) and uses it among others for building its images, which can take quite a lot of space in some cases. It seems that in RHEL 9 /tmp started to be on tmpfs by default (although it could optionally be this way even in earlier versions, at least since RHEL 7 : https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/migration_planning_guide/chap-red_hat_enterprise_linux-migration_planning_guide-major_changes_and_migration_considerations#sect-Red_Hat_Enterprise_Linux-Migration_Planning_Guide-File_System_Layout-Temporary_storage_space ). Quite often tmpfs does not have enough capacity for ReaR and image creation fails. As the linked document says: "Processes that store a large amount of data, or require temporary data to persist across reboots, should use /var/tmp." And as file-hiearachy(7) says, 
"/tmp ... This directory (...) should hence not be used for larger files." "/var/tmp (...) can thus accept larger files. (...) If applications find the environment variable $TMPDIR set, they should prefer using the directory specified in it over directly referencing /var/tmp/".

So, the default for ReaR should be /var/tmp, but TMPDIR explicitly set by users should take precedence. I will implement it by setting TMPDIR to /var/tmp in /usr/share/rear/conf.default.conf if unset, as discussed under https://github.com/rear/rear/issues/2654#issuecomment-881609874


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