Skip to content

41_snapshots-btrfs script does not work if target is btrfs raid #426

@alexanioa

Description

@alexanioa

41_snapshots-btrfs cannot detect the uuid of the target if btrfs raid is enabled. This is because the grub-probe command outputs two lines, but the script excepts only one.

I've managed to make it work with the following changes on the script:

## Probe information of Root and Boot devices
# -----------------------------------------------------------

# ---------- Root partition ----------
root_device_search="$(${grub_probe} --target=device /)"           # e.g. /dev/mapper/enc
root_device=${root_device_search%[$'\n']*}
root_uuid="$(${grub_probe} --device "${root_device}" --target=fs_uuid 2>/dev/null)" || true

and

# ---------- Boot partition ----------
boot_device_search="$(${grub_probe} --target=device "${boot_directory}")"   # e.g. /dev/sdb1
boot_device=${boot_device_search%[$'\n']*}
boot_uuid="$(${grub_probe} --device "${boot_device}" --target=fs_uuid 2>/dev/null)" || true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions