menuimage

Description

Options

Example

Exit_Codes

Dependencies

License

Download

My_Other_Sites

My_Programs

Comments

lvm-delete-snapshot v3.3 [22 Jul 2016] by Dominic

Description

GNU/Linux script for a machine where LVM (Logical Volume Management) is used. It removes/deletes an LVM snapshot, and can be called by another process or used when a snapshot has been unintentionally left over by another process. It tries various escalating steps to remove the snapshot; in rare cases the removal might not be completed until after a reboot and then a rerun of lvm-delete-snapshot.sh.

For safety reasons, lvm-delete-snapshot.sh will refuse to remove the specified object if it is not an LVM snapshot.

It also removes the mountpoint for the snapshot, if one exists.

You can find the name of your snapshot with the command 'sudo lvs'.

Tested under LVM 2.02.66(2), 2.02.95(2), 2.02.98(2), 2.02.133(2).

Options

-f - don't ask before proceeding - use with care!
-h - show help and exit

Example

sudo ./lvm-delete-snapshot.sh homebackup

Exit Codes

0 indicates success or no action was required (e.g. no such snapshot exists)
1 indicates a problem occurred

Dependencies

awk, basename, bash, fold, grep, lvm, stty, umount

License

Copyright © 2016 Dominic Raferd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Download lvm-delete-snapshot.sh

My Other Sites

My Programs

Here is a selection of some (other) programs I have written, most of which run from the command line (CLI), are freely available and can be obtained by clicking on the links. Dependencies are shown and while in most cases written for a conventional Linux server, they should run even on a Raspberry Pi, and many can run under Windows using Cygwin. Email me if you have problems or questions, or if you think I could help with a programming requirement.

Backup Utilities

Debian/Ubuntu kernel and LVM Utilities

Dellmont / Three / Giffgaff / Vodafone - VoIP and Mobile Phone Account Utilities

Miscellaneous Programs

Comments

No comments yet
*Name:
Email:
Hide my email
*Text:
 
Powered by Scriptsmill Comments Script