Installation fix when /var/log.hdd/journal exists (#4371) (#4382)

* Fix to flush volatile journald to prevent full /var/log at startup

* re-introduce directory / in non-rsync copy, and exclude journal* in this copy
Note: this may need some testing if someone doesn't use rsync

* Fix for non-rsync copy to Disk, since journal cannot be copied onto itself

* Backed up journal files are removed with vacuum, so no need to delete them separately

* Make room at boot by removing old logs, in addition to the removal later
every 15 minutes

* remove old archived journal files modified more than 1 day ago

* make sure volatile logging is used, since journald sometimes turns persistent at boot
remove unused commented lines in ramlog

* Fix check for configured journald volatile logging

* revert #3799, the rsync --delete

* Exclude /var/log/journal from install, and create empty /var/log/journal directory when it exists during install

Co-authored-by: dennis laptop <dennis@smartstatetechnolgy.nl>
Co-authored-by: Igor Pečovnik <igorpecovnik@users.noreply.github.com>

Co-authored-by: Dennis <bijwaard@gmail.com>
Co-authored-by: dennis laptop <dennis@smartstatetechnolgy.nl>
This commit is contained in:
Igor Pečovnik
2022-11-05 08:22:20 +01:00
committed by GitHub
parent 75a3aa7c9a
commit 157b7c56e5
3 changed files with 5 additions and 0 deletions

View File

@@ -7,3 +7,4 @@
/run/*
/tmp/*
/ddbr/*
/var/log/journal

View File

@@ -156,6 +156,8 @@ create_armbian()
rsync -avrltD --delete --exclude-from=$EX_LIST / "${TempDir}"/rootfs | \
nl | awk '{ printf "%.0f\n", 100*$1/"'"$TODO"'" }' \
> "${nsi_conn_progress}" ;
# create empty persistent journal directory if it exists before install
[ -d /var/log.hdd/journal ] && mkdir "${TempDir}"/rootfs/var/log/journal
# save exit code from rsync
echo ${PIPESTATUS[0]} >"${nsi_conn_done}"
} &

View File

@@ -162,6 +162,8 @@ create_armbian()
rsync -avrltD --delete --exclude-from=$EX_LIST / "${TempDir}"/rootfs | \
nl | awk '{ printf "%.0f\n", 100*$1/"'"$TODO"'" }' \
> "${nsi_conn_progress}" ;
# create empty persistent journal directory if it exists before install
[ -d /var/log.hdd/journal ] && mkdir "${TempDir}"/rootfs/var/log/journal
# save exit code from rsync
echo ${PIPESTATUS[0]} >"${nsi_conn_done}"
} &