* Re: [linux-lvm] Dumb LVM question
2005-12-05 18:29 ` [linux-lvm] Dumb LVM question Greg Freemyer
@ 2005-12-06 10:56 ` Heinz Mauelshagen
0 siblings, 0 replies; 2+ messages in thread
From: Heinz Mauelshagen @ 2005-12-06 10:56 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: hjm
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 2+ messages in thread