Header RSS Feed
If you only want to see the articles of a certain category, please click on the desired category below:
ALL Android Backup BSD Database Hacks Hardware Internet Linux Mail MySQL Monitoring Network Personal PHP Proxy Shell Solaris Unix Virtualization VMware Windows Wyse

Rsnapshot does not remove LV snapshot when mount failed
Thursday - Sep 11th 2014 - by - (0 comments)

On a system running rsnapshot as local backup method, the rsnapshot process failed and the backup didn't run correctly.

After analyzing the logs, it appears that rsnapshot does not remove a logical volume snapshot if the snapshot could not be mounted successfully:

[10/Sep/2014:02:07:43] /sbin/lvcreate --snapshot --size 200M --name rsnapshot /dev/vgdata/mylv
[10/Sep/2014:02:07:44] /bin/mount /dev/vgdata/rsnapshot /mnt/lvm-snapshot
[10/Sep/2014:02:07:44] /usr/bin/rsnapshot -c /etc/rsnapshot.backup.conf daily: ERROR: Mount LVM snapshot failed: 8192
[10/Sep/2014:02:07:44] rm -f /var/run/rsnapshot.pid

Reason for the mount error was, that the defined mountpoint (/mnt/lvm-snapshot) did not exist. However, after the mount failed, the LV snapshot was not removed...

On the next run of,  the creation of the LV snapshot failed, because (obviously) it already existed (from the previous run):

[10/Sep/2014:09:30:08] /sbin/lvcreate --snapshot --size 200M --name rsnapshot /dev/vgdata/mylv
[10/Sep/2014:09:30:08] /usr/bin/rsnapshot -c /etc/rsnapshot.backup.conf daily: ERROR: Create LVM snapshot failed: 1280
[10/Sep/2014:09:30:08] rm -f /var/run/rsnapshot.pid

To solve this issue, the mountpoint must be created and the logical volume snapshot must be deleted manually. Afterwards, rsnapshot runs correctly again.

This seems to be a bug of rsnapshot, so I opened an issue in the github repository of rsnapshot.


Add a comment

Show form to leave a comment

Comments (newest first):

No comments yet.

Go to Homepage home
Linux Howtos how to's
Monitoring Plugins monitoring plugins
Links links

Valid HTML 4.01 Transitional
Valid CSS!
[Valid RSS]

6938 Days
until Death of Computers