Skip to content

snapshot-resync-target-lvm.sh not compatible with 9.x #37

Description

@jsalatiel

The snapshot-resync-target-lvm.sh script is not compatible with drbd9x.
First the snippet

                OUT_OF_SYNC=$(sed -ne "/^ *$DRBD_MINOR:/ "'{
                                n;
                                s/^.* oos:\([0-9]*\).*$/\1/;
                                s/^$/0/; # default if not found
                                p;
                                q; }' < /proc/drbd) # unit KiB

will always return zero (default if not found)

Second, if you have more than one volume configured for the same resource it will also fail:

Dec 21 21:44:38 pcs03 snapshot-resync-target-lvm.sh[22355]: Cannot determine lower level device of resource exports/0 1, sorry.
Dec 21 21:44:47 pcs03 unsnapshot-resync-target-lvm.sh[22373]: invoked for exports/0 1 (drbd0 1)
Dec 21 21:44:47 pcs03 unsnapshot-resync-target-lvm.sh[22373]: 0 1 is not a valid number
Dec 21 21:44:47 pcs03 unsnapshot-resync-target-lvm.sh[22373]: 0 1 is not a valid number
Dec 21 21:44:47 pcs03 unsnapshot-resync-target-lvm.sh[22373]: Cannot determine lower level device of resource exports/0 1, sorry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions