Dumb LVM question
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.
Greg
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
--
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
Quoted 9 lines · Greg Freemyer
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>
Quoted 18 lines
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
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Signature · 15 lines
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
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-