All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Berra <bluca@comedia.it>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Problem to remove LVM snaphots
Date: Tue, 20 Apr 2010 07:48:52 +0200	[thread overview]
Message-ID: <20100420054852.GB1371@maude.comedia.it> (raw)
In-Reply-To: <4BCC8925.4090209@tvcablenet.be>

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
  / \

  reply	other threads:[~2010-04-20  5:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-18  8:54 [linux-lvm] Problem to remove LVM snaphots François Valenduc
2010-04-18 23:04 ` Phillip Susi
2010-04-19 16:47   ` François Valenduc
2010-04-20  5:48     ` Luca Berra [this message]
2010-04-26  9:56     ` Zdenek Kabelac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100420054852.GB1371@maude.comedia.it \
    --to=bluca@comedia.it \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.