Skip to content
Snippets Groups Projects

Don't try to save partition tables for /dev/mapper devices

Right now backupninja shows Warnings when it tries to save the partition tables of my lvm devices.

As it's usual to have them under /dev/mapper/ I think it's safe to avoid those devices when doing backup of the partition table.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Hi @lyz, thank you for your contribution.

    I ran some tests on a system with LVM partitions, and I wasn't able to reproduce the problem. LVM-related paths under /dev/mapper show up as lvm type in the lsblk command output. Since backupninja greps for disk types, those paths shouldn't be examined for partition tables by the sys handler.

    It would be helpful if you could provide the output of lsblk --output NAME,TYPE --list --paths on your system.

  • Author Developer

    Hi @lavamind, here is the output of the log

    Apr 30 11:28:35 Info: >>>> starting action /etc/backup.d/10.sys (because of --now)
    Apr 30 11:28:37 Warning: The partition table for /dev/mapper/nvme0n1p2_crypt could not be saved.
    Apr 30 11:28:37 Warning: The partition table for /dev/mapper/main-swap could not be saved.
    Apr 30 11:28:37 Warning: The partition table for /dev/mapper/main-main could not be saved.
    Apr 30 11:28:38 Info: successfully created /var/backups/lvm
    Apr 30 11:28:38 Info: LVM metadata was saved to /var/backups/lvm for volume groups: main 
    Apr 30 11:28:38 Warning: <<<< finished action /etc/backup.d/10.sys: WARNING

    And here is the output of lsblk --output NAME,TYPE --list --paths

    NAME                        TYPE
    /dev/mapper/nvme0n1p2_crypt crypt
    /dev/mapper/main-swap       lvm
    /dev/mapper/main-main       lvm
    ...
  • closed

  • Author Developer

    The problem was that in the version of Debian 9 the sys line is:

    devices=`LC_ALL=C $SFDISK -l 2>/dev/null | grep "^Disk /dev" | /usr/bin/awk '{print $2}' | cut -d: -f1`

    Therefore it's an already fixed bug, sorry

Please register or sign in to reply
Loading