rsnapshot LVM无法删除快照卷

rsnapshot LVM无法删除快照卷,第1张

概述我在Debian Wheezy服务器上使用rsnapshot.这是最近从挤压升级.自升级以来,我从小时cron作业中收到以下错误: remote rm -rf /share/HDA_DATA/backup/rsnapshot/hourly.3 p1=-rf p2=/backup/rsnapshot/hourly.3/remote cp -al /share/HDA_DATA/backup/rsn 我在Debian Wheezy服务器上使用rsnapshot.这是最近从挤压升级.自升级以来,我从小时cron作业中收到以下错误:
remote rm -rf /share/HDA_DATA/backup/rsnapshot/hourly.3 p1=-rf p2=/backup/rsnapshot/hourly.3/remote cp -al /share/HDA_DATA/backup/rsnapshot/hourly.0 /share/HDA_DATA/backup/rsnapshot/hourly.1 p1=-al p2=/backup/rsnapshot/hourly.0  Logical volume "rsnapshot" successfully removed  Logical volume "rsnapshot" successfully removed  Unable to deactivate open raID5-dl-real (254:4)  Failed to resume dl.----------------------------------------------------------------------------rsnapshot encountered an error! The program was invoked with these options:/usr/bin/rsnapshot hourly ----------------------------------------------------------------------------ERROR: Removal of LVM snapshot Failed: 1280

正确备份了两个LVM卷并成功删除了逻辑卷“rsnapshot”,但随后它在lvm VG raID5中达到卷dl并看到无法停用raID5-dl-real.

我的lvm快照的名称叫做raID5 / rsnapshot. raID5-dl-real与卷名不对应 – 真实设备是/ dev / mapper / raID5-dl.

因此,如果这是dl卷本身,为什么lvm会尝试停用它?

请注意,这最初发生在一个完全不同的卷上,所以我从备份中删除了它.现在它已转移到这一个.

rsnapshot日志也不是很有启发性:

[16/Jul/2013:17:26:26] /sbin/lvcreate --snapshot --size 512M --name rsnapshot /dev/raID5/dl[16/Jul/2013:17:26:29] /bin/mount /dev/raID5/rsnapshot /mnt/lvm-snapshot[16/Jul/2013:17:26:32] chdir(/mnt/lvm-snapshot)[16/Jul/2013:17:26:32] /usr/bin/rsync -a --delete --numeric-IDs --relative --delete-excluded . /backup/rsnapshot/hourly.0/dl/[16/Jul/2013:17:27:57] rsync succeeded[16/Jul/2013:17:27:57] chdir(/root)[16/Jul/2013:17:27:57] /bin/umount /mnt/lvm-snapshot[16/Jul/2013:17:27:58] /home/share/scripts/rsnapshot_lvremove --force /dev/raID5/rsnapshot[16/Jul/2013:17:29:02] /usr/bin/rsnapshot hourly: ERROR: Removal of LVM snapshot Failed: 1280[16/Jul/2013:17:29:02] rm -f /var/run/rsnapshot.pID

有任何想法吗?

更新 – 这刚刚开始在一个完全不同的服务器上发生.相同的LVM问题.

我尝试过的一件事是将lvremove命令重定向到脚本:

#!/bin/bashsyncsleep 600ls /dev/mapper/raID5-*-realfor i in /dev/mapper/raID5-*-real; do /sbin/dmsetup remove $i ; done/sbin/lvremove --deBUG "$@"

所以这个同步,睡了一会儿,然后在尝试lvremove之前删除任何-real设备映射.

即便在所有这些之后,删除通常也会失败.这是rsnapshot的输出.请忽略错误的一部分,虽然其中一个卷上存在问题,但直到稍后lvremove失败:

remote cp -al /share/HDA_DATA/backup/rsnapshot/hourly.0 /share/HDA_DATA/backup/rsnapshot/hourly.1 p1=-al p2=/backup/rsnapshot/hourly.0  One or more specifIEd logical volume(s) not found./dev/mapper/raID5-crypt-real/dev/mapper/raID5-db-realdevice-mapper: remove ioctl on raID5-crypt-real Failed: No such device or addressCommand Faileddevice-mapper: remove ioctl on raID5-db-real Failed: Device or resource busyCommand Failed  Logical volume "rsnapshot" successfully removed  One or more specifIEd logical volume(s) not found./dev/mapper/raID5-crypt-real/dev/mapper/raID5-db-real/dev/mapper/raID5-db--var-realdevice-mapper: remove ioctl on raID5-crypt-real Failed: No such device or addressCommand Faileddevice-mapper: remove ioctl on raID5-db-real Failed: No such device or addressCommand Faileddevice-mapper: remove ioctl on raID5-db--var-real Failed: Device or resource busyCommand Failed  Logical volume "rsnapshot" successfully removed  One or more specifIEd logical volume(s) not found./dev/mapper/raID5-crypt-real/dev/mapper/raID5-db-real/dev/mapper/raID5-db--var-realdevice-mapper: remove ioctl on raID5-crypt-real Failed: Device or resource busyCommand Faileddevice-mapper: remove ioctl on raID5-db-real Failed: No such device or addressCommand Faileddevice-mapper: remove ioctl on raID5-db--var-real Failed: No such device or addressCommand Failed  /dev/raID5/rsnapshot: read Failed after 0 of 4096 at 42949607424: input/output error  /dev/raID5/rsnapshot: read Failed after 0 of 4096 at 42949664768: input/output error  /dev/raID5/rsnapshot: read Failed after 0 of 4096 at 0: input/output error  /dev/raID5/rsnapshot: read Failed after 0 of 4096 at 4096: input/output error  Logical volume "rsnapshot" successfully removed  One or more specifIEd logical volume(s) not found./dev/mapper/raID5-crypt-real/dev/mapper/raID5-db-real/dev/mapper/raID5-db--var-real/dev/mapper/raID5-dl-realdevice-mapper: remove ioctl on raID5-crypt-real Failed: No such device or addressCommand Faileddevice-mapper: remove ioctl on raID5-db-real Failed: No such device or addressCommand Faileddevice-mapper: remove ioctl on raID5-db--var-real Failed: No such device or addressCommand Faileddevice-mapper: remove ioctl on raID5-dl-real Failed: Device or resource busyCommand Failed  Unable to deactivate open raID5-dl-real (254:25)  Failed to resume dl.----------------------------------------------------------------------------rsnapshot encountered an error! The program was invoked with these options:/usr/bin/rsnapshot hourly ----------------------------------------------------------------------------ERROR: Removal of LVM snapshot Failed: 1280
解决方法 在这可以帮助任何人的情况下,我遇到了 Debian bug id 659762 report中描述的问题.

我使用dmsetup信息确定了处于挂起状态的卷,并使用dmsetup resume重新激活它这解锁了LVM系统.

总结

以上是内存溢出为你收集整理的rsnapshot LVM无法删除快照卷全部内容,希望文章能够帮你解决rsnapshot LVM无法删除快照卷所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1042907.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存