7 year old bug in rsnapshot fixed (LVM snapshot missing mount point)

Written by - 0 comments

Published on - Listed in Linux Unix Backup


Back in September 2014, I discovered a bug in rsnapshot (see Rsnapshot does not remove LV snapshot when mount failed). It turns out that this bug was in rsnapshot for almost 7 years - the currently available stable version is 1.3.1 which was released in September 2008. 

A few days ago, the issue I opened in Github, received a pull request which finally solves the bug.

Now when rsnapshot runs and the LVM mount point was not found, the meanwhile created LVM snapshot is correctly removed again:

# /usr/local/bin/rsnapshot alpha
[...]
/sbin/lvcreate --snapshot --size 100M --name rsnapshot \
    /dev/rsnapshotubuntu-vg/test
/bin/mount /dev/rsnapshotubuntu-vg/rsnapshot /mnt/lvm-snapshot
mount: mount point /mnt/lvm-snapshot does not exist
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/local/bin/rsnapshot alpha
----------------------------------------------------------------------------
ERROR: Mount LVM snapshot failed: 8192
/usr/bin/logger -p user.err -t rsnapshot[19677] /usr/local/bin/rsnapshot \
    alpha: ERROR: Mount LVM snapshot failed: 8192
/sbin/lvremove --force /dev/rsnapshotubuntu-vg/rsnapshot
rm -f /var/run/rsnapshot.pid

Before the bug fix, the LV snapshot was taken but not removed when the mount failed (again see Rsnapshot does not remove LV snapshot when mount failed).

Kudos to Benedikt Heine, who solved the bug with his pull request!


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.