BCF-7096: Activate swap partition for BMR needs#94
Open
Kyrylo Vorobiov (kiru6a) wants to merge 1 commit into
Open
BCF-7096: Activate swap partition for BMR needs#94Kyrylo Vorobiov (kiru6a) wants to merge 1 commit into
Kyrylo Vorobiov (kiru6a) wants to merge 1 commit into
Conversation
aec6634 to
affe8eb
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds an optional pre-restore step for BACKUP=COVE to enable swap devices (from LAYOUT_FILE) before the Cove/Backup Manager restore starts, to increase available virtual memory during BMR restores.
Changes:
- Added a new restore-stage script to locate swap entries in
LAYOUT_FILEand attempt to activate them. - Added a new
COVE_ACTIVATE_SWAP_PARTITIONSdefault setting to control whether swap activation runs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| usr/share/rear/restore/COVE/default/300_activate_swap_partitions.sh | New restore hook that collects swap devices from LAYOUT_FILE, deactivates existing swap, and activates swap devices before restore. |
| usr/share/rear/conf/default.conf | Introduces COVE_ACTIVATE_SWAP_PARTITIONS default config flag for the new restore hook. |
Comments suppressed due to low confidence (1)
usr/share/rear/restore/COVE/default/300_activate_swap_partitions.sh:9
- LAYOUT_FILE “swap” entries can refer to swap files as well as partitions. Because this script checks -b, swap files will always be treated as errors (“not a block device”) even though they may be valid in the source system. Consider filtering to actual block devices when building swap_devices, or handling regular files separately (or downgrading the log level for non-block entries).
while read -r _ device _; do
swap_devices+=("$device")
done < <( grep "^swap " "$LAYOUT_FILE" )
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… Backup Manager Jira-Ref: BCF-7096: Activate swap partition for BMR needs
affe8eb to
255638f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BCF-7096: Activate swap partition for BMR needs