View Full Version : lvm-snapshot.pl fails to umount

March 2nd, 2015, 07:24 AM
Hi guys,

I have the latest version running, everything works fine except zrm will not umount the mounted snapshot after its done copying data over.

ZRM run log:

dailyrun:backup:INFO: Mounting snapshot
dailyrun:backup:INFO: /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action mount --dev /dev/VolGroup00/zrmHOOQMIqyZI --directory /backup/mysql/dailyrun/20150302105307/ZRM_MOUNTS/zrmHOOQMIqyZI --fstype ext3 --host db

dailyrun:backup:INFO: Start copying data from remote.
dailyrun:backup:INFO: Unmounting
dailyrun:backup:INFO: /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action umount --directory /backup/mysql/dailyrun/20150302105307/ZRM_MOUNTS/zrmHOOQMIqyZI --host db
copy-plugin returned error

dailyrun:backup:WARNING: umount failed. Command used is /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action umount --directory /backup/mysql/dailyrun/20150302105307/ZRM_MOUNTS/zrmHOOQMIqyZI --host db

mount on "db" server:

/dev/mapper/VolGroup00-zrmHOOQMIqyZI 59G 50G 5.7G 90% /backup/mysql/dailyrun/20150302105307/ZRM_MOUNTS/zrmHOOQMIqyZI

sudoers on "db" server:

mysql ALL = NOPASSWD:/bin/mount, NOPASSWD:/bin/umount, NOPASSWD:/bin/df, NOPASSWD:/usr/sbin/lvdisplay, NOPASSWD:/usr/sbin/lvcreate, NOPASSWD:/usr/sbin/lvremove

This backup runs nightly and it happens every time, I have to manually logon to db server umount and remove the snapshot.

CentOS 5.x

Thanks :)

July 14th, 2015, 11:19 PM
I face the same error. This happens with bigger backups ~8Gb. Smaller backups are working.

Another system with the same settings is working fine.


BACKUP SUMMARY:Backup Type = CopyBackup Level = 0
MySQL Version = 5.5.30-log
Host = sitecu
Databases backed up in raw mode using snapshot = kpi
Retention policy = 10D
Compress = No
Encrypted = No
STATISTICS:Size of backup = 8.41 GB
Time taken for backup = 00:19:33
Time duration for which read locks were held = 00:00:02
Time taken for flushing database pages to disk = 00:00:00
WARNINGS:umount failed. Command used is /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action umount --directory /var/lib/mysql-zrm/sitecu-kpi_full/20140821080001/ZRM_MOUNTS/zrmRVyhQGXO1d --host sitecuOutput of command: 'remove-snapshot' is [ - Permission denied (publickey,keyboard-interactive).
- Could not create directory /tmp/XEZ4LuoDVj on host sitecu at /usr/share/mysql-zrm/plugins/ssh-copy.pl line 430. - copy-plugin returned error - ] remove snapshot failed. Command used is /usr/share/mysql-zrm/plugins/lvm-snapshot.pl --action remove-snapshot --host sitecu --dev \"/dev/vg1/zrmRVyhQGXO1d\" --directory \"/var/lib/mysql-zrm/sitecu-kpi_full/20140821080001/ZRM_MOUNTS/zrmRVyhQGXO1d\" > /tmp/6uduz6N3vp 2>&1