All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stuart D. Gathman" <stuart@bmsi.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Proper way to delete an active snapshot?
Date: Tue, 30 Aug 2011 14:18:28 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LRH.2.00.1108301415340.9607@bmsred.bmsi.com> (raw)
In-Reply-To: <4E5CCA32.4000000@tlinx.org>

On Tue, 30 Aug 2011, Linda A. Walsh wrote:

> If you have a snapshot of a volume running... how are you supposed to delete
> it?
>
> i.e. after you unmount it... if I just do a lvremove, I get a warning about 
> it being
> an active volume -- so I tried doing a dmsetup remove on it first -- and that
> stops the warning -- but I just noticed, I had a bunch of inactive 'cow'
> volume names under 'dmsetup ls', that referred to the old snapshot names.
>
> so I'm guessing that using dmsetup to remove the dev first, then lvremove is
> NOT the best way to be doing this...(as it results in stuff that needs to be 
> cleaned
> up...)... 
> So how do I remove the volume w/o getting warnings about it being 'active'?

I agree that the warning is broken (when LV is not otherwise mounted or open).

I use

   /usr/sbin/lvremove  -f "$snappath"

in scripts, which suppresses the warning without leaving a mess.  I'm not
sure what happens if the LV is actually open in that case.  Hopefully
you get an error.

I am on Centos-5.6

--
 	      Stuart D. Gathman <stuart@bmsi.com>
     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

  parent reply	other threads:[~2011-08-30 18:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 11:32 [linux-lvm] Proper way to delete an active snapshot? Linda A. Walsh
2011-08-30 11:47 ` Zdenek Kabelac
2011-08-30 12:02   ` Zdenek Kabelac
2011-09-03  7:48     ` Linda A. Walsh
2011-08-30 18:18 ` Stuart D. Gathman [this message]
2011-09-03  8:23   ` Linda A. Walsh

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=alpine.LRH.2.00.1108301415340.9607@bmsred.bmsi.com \
    --to=stuart@bmsi.com \
    --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.