From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: "François Valenduc" <francois.valenduc@tvcablenet.be>
Subject: Re: [linux-lvm] Problem to remove LVM snaphots
Date: Mon, 26 Apr 2010 11:56:53 +0200 [thread overview]
Message-ID: <4BD56365.7020007@redhat.com> (raw)
In-Reply-To: <4BCC8925.4090209@tvcablenet.be>
Dne 19.4.2010 18:47, Fran�ois Valenduc napsal(a):
> Le 19/04/10 01:04, Phillip Susi a �crit :
>> On 04/18/2010 04:54 AM, Fran�ois Valenduc wrote:
>>> Hello everybody,
>>>
>>> I am using gentoo and I use LVM snapshots to make backups of my system.
>>> Unfortunately, I always have a problem to remove these. LVM always
>>> complains that it can't remove an open logical volume. However, the
>>> snapshot is unmounted when I try to remove it. It seems it's only
>>> possible to remove the snapshot if the corresponding volume is
>>> deactivated. So, I am forced to boot on a live cd to remove the snapshot
>>> of my root partition. Is this really normal ?
>>
>> No, it is not normal. Obviously something on your system has the
>> snapshot open. Perhaps it is being auto mounted?
>>
>> _______________________________________________
>> 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/
>>
> I would really like to know the process which has the snapshot open.The
> script I use to backup my system is the following:
>
> #!/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
> cd /mnt/backup
> NAME="/home/francois/Backup/gentoo_64_$(date +%F).tar.bz2"
> tar cvfpj ${NAME} --exclude=tmp/* *
> 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.
Sounds like udev problem. Most probably gentoo stepped into the udev
mine-field. It's hard to give a good advice - udev currently has its problems.
You may try to experiment - try to disable udev to see whether it helps in
this script case and renable after the script...
Zdenek
prev parent reply other threads:[~2010-04-26 9:56 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
2010-04-26 9:56 ` Zdenek Kabelac [this message]
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=4BD56365.7020007@redhat.com \
--to=zkabelac@redhat.com \
--cc=francois.valenduc@tvcablenet.be \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).