master - blkdeactivate: change the way blkdeactivate reports status
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a854398764968fe2847ba6cbfec7650a7ca04b37 Commit: a854398764968fe2847ba6cbfec7650a7ca04b37 Parent: 32148369d12750dbf85cfd5c21a8bc7f9e6b5ec5 Author: Peter Rajnoha <[email protected]> AuthorDate: Tue Aug 13 17:17:25 2013 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Tue Aug 13 17:51:23 2013 +0200
blkdeactivate: change the way blkdeactivate reports status
The blkdeactivate now suppresses error messages from external tools that are called. Instead, only a summary message "done" or "skipped" is issued by blkdeactivate as any error in calling the external tool (e.g. unmounting or deactivating a device) causes the device to be skipped and the blkdeactivate continues with the next device in the tree.
Add new -e/--errors switch to display any error messages from external tools.
Also, suppress any output given by the external tools and add new -v/--verbose switch to display it including the verbose output of the tools called (this will enable error reporting as well).
Also add blkdeactivate -vv for even more debug (the script's debug).
--- WHATS_NEW | 3 + man/blkdeactivate.8.in | 7 +++ scripts/blkdeactivate.sh.in | 102 ++++++++++++++++++++++++++++++++----------- 3 files changed, 86 insertions(+), 26 deletions(-)
WHATS_NEW +3 -0
@@ -1,5 +1,8 @@ Version 2.02.101 - =================================== + Add blkdeactivate -v/--verbose for debug output from external tools used. + Add blkdeactivate -e/--errors for error messages from external tools used. + Suppress messages from external tools called in blkdeactivate by default. Version 2.02.100 - 13th August 2013 ===================================
man/blkdeactivate.8.in +7 -0
@@ -15,11 +15,18 @@ LVM volumes are handled directly using the \fIlvm\fP command. Other device-mapper based devices are handled using the \fIdmsetup\fP command. .SH OPTIONS +.IP "\fB\-e, \-\-errors\fP" +Show errors reported from tools called by blkdeactivate. +Without this option, any error messages from these external tools +are suppressed and the blkdeactivate itself provides only a summary +message about device being skipped or not. .IP "\fB\-h, \-\-help\fP" Display the help text. .IP "\fB\-u, \-\-umount\fP" Unmount a mounted device before trying to deactivate it. Without this option used, a device that is mounted is not deactivated. +.IP "\fB\-v, \-\-verbose\fP" +Run in verbose mode. .IP "\fB\-d, \-\-dmoption\fP \fIdm_options\fP" Comma separated list of device-mapper specific options. .IP "\fB\-l, \-\-lvmoption\fP \fIlvm_options\fP"
scripts/blkdeactivate.sh.in +76 -26
177 lines not on this page · raw message