linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Heinz Mauelshagen <mauelshagen@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: hjm@redhat.com
Subject: Re: [linux-lvm] Dumb LVM question
Date: Tue, 6 Dec 2005 11:56:00 +0100	[thread overview]
Message-ID: <20051206105600.GB2778@redhat.com> (raw)
In-Reply-To: <87f94c370512051029uc354fadw1921ec2ff72cbbe5@mail.gmail.com>

On Mon, Dec 05, 2005 at 01:29:23PM -0500, Greg Freemyer wrote:
> All,
> 
> With LVM 2, how do I kill any and all snapshots.
> 
> With LVM 1 it was "vgscan -r".
> 
> I need to be able to do this with a script, so I'm hoping lvm 2 has a
> way to kill all snapshots without knowing their names, etc.  If not, I
> guess I can script up something to do the job.

Yes, you could use something like:

<quick_hacking_mode>
lvs|perl -ne '@a = split /\s+/,$_;if ($a[3] =~ /^s/) {print "/dev/$a[2]/$a[1]\n";}'|xargs lvremove -f
</quick_hacking_mode>


> 
> Greg
> --
> Greg Freemyer
> The Norcross Group
> Forensics for the 21st Century
> 
> 
> --
> Greg Freemyer
> The Norcross Group
> Forensics for the 21st Century
> 
> _______________________________________________
> 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/

-- 

Regards,
Heinz    -- The LVM Guy --

*** Software bugs are stupid.
    Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Cluster and Storage Development                   56242 Marienrachdorf
                                                  Germany
Mauelshagen@RedHat.com                            +49 2626 141200
                                                       FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

      reply	other threads:[~2005-12-06 10:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87f94c370512010752n6f4b311eqe8ff0b2c8bd92f4f@mail.gmail.com>
2005-12-05 18:29 ` [linux-lvm] Dumb LVM question Greg Freemyer
2005-12-06 10:56   ` Heinz Mauelshagen [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=20051206105600.GB2778@redhat.com \
    --to=mauelshagen@redhat.com \
    --cc=hjm@redhat.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 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).