[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Problem to remove LVM snaphots



On Mon, Apr 19, 2010 at 06:47:33PM +0200, François Valenduc wrote:
I would really like to know the process which has the snapshot open.The
did you try checking with fuser or /sys/block/dm-*/holders?

script I use to backup my system is the following:
unrelated to problem but:

#!/bin/sh
logrotate -v -f /etc/logrotate.conf
vgcfgbackup
lvcreate -L1G -n backup -s /dev/gentoo/root
if [ $? = 0 ]; then
       if [ ! -e /mnt/backup ]; then
               mkdir /mnt/backup
       fi
       mount -o ro /dev/gentoo/backup /mnt/backup
add error checking here
       cd /mnt/backup
       NAME="/home/francois/Backup/gentoo_64_$(date +%F).tar.bz2"
       tar cvfpj ${NAME} --exclude=tmp/* *
ugly wildcards, quote the first and consider using . instead of second

       cd /
       umount /mnt/backup
       if [ $? = 0 ]; then
               sync
               lvremove -f gentoo/backup
       fi
fi


So, the snaphot is clearly unmounted before I try to remove it. But I
can almost never remove the snaphot. In fact, I have noticed that if I
don't use the "-f" option, I can remove the snapshot but it always fails
if I use it. But, I would like to use my script without any confirmation
message.

François

_______________________________________________
linux-lvm mailing list
linux-lvm redhat com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

--
Luca Berra -- bluca comedia it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]