Skip to content

BCF-7096: Activate swap partition for BMR needs#94

Open
Kyrylo Vorobiov (kiru6a) wants to merge 1 commit into
developfrom
feature/BCF-7096-activate-swap-partitions
Open

BCF-7096: Activate swap partition for BMR needs#94
Kyrylo Vorobiov (kiru6a) wants to merge 1 commit into
developfrom
feature/BCF-7096-activate-swap-partitions

Conversation

@kiru6a
Copy link
Copy Markdown

@kiru6a Kyrylo Vorobiov (kiru6a) commented May 21, 2026

  • activate swap partition(s) before starting restore with Backup Manager

BCF-7096: Activate swap partition for BMR needs

Copilot AI review requested due to automatic review settings May 21, 2026 15:33
@kiru6a Kyrylo Vorobiov (kiru6a) force-pushed the feature/BCF-7096-activate-swap-partitions branch from aec6634 to affe8eb Compare May 21, 2026 15:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FILE and attempt to activate them.
  • Added a new COVE_ACTIVATE_SWAP_PARTITIONS default 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.

Comment thread usr/share/rear/restore/COVE/default/300_activate_swap_partitions.sh Outdated
Comment thread usr/share/rear/restore/COVE/default/300_activate_swap_partitions.sh
Comment thread usr/share/rear/restore/COVE/default/300_activate_swap_partitions.sh
Comment thread usr/share/rear/conf/default.conf
… Backup Manager

Jira-Ref: BCF-7096: Activate swap partition for BMR needs
Copy link
Copy Markdown

@svlv Andrus Suvalau (svlv) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants