summaryrefslogtreecommitdiffstats
path: root/tools/pvremove.c
Commit message (Collapse)AuthorAgeFilesLines
* config: add silent modeAlasdair G Kergon2012-08-251-2/+2
| | | | | | | | | | | | | | | | Accept -q as the short form of --quiet. Suppress non-essential standard output if -q is given twice. Treat log/silent in lvm.conf as equivalent to -qq. Review all log_print messages and change some to log_print_unless_silent. When silent, the following commands still produce output: dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay, pvs, version, vgcfgrestore -l, vgdisplay, vgs. [Needs checking.] Non-essential messages are shifted from log level 4 to log level 5 for syslog and lvm2_log_fn purposes.
* activate: add autoactivation hooksPeter Rajnoha2012-06-281-1/+1
| | | | | | | | | | | | | | | | Define an 'activation_handler' that gets called automatically on PV appearance/disappearance while processing the lvmetad_pv_found and lvmetad_pv_gone functions that are supposed to update the lvmetad state based on PV availability state. For now, the actual support is for PV appearance only, leaving room for PV disappearance support as well (which is a more complex problem to solve as this needs to count with possible device stack). Add a new activation change mode - CHANGE_AAY exposed as '--activate ay/-aay' argument ('activate automatically'). Factor out the vgchange activation functionality for use in other tools (like pvscan...).
* Scan all devices for lvmetad if 'pvscan --cache' used without device list.Alasdair Kergon2012-03-031-2/+1
|
* Allow multiple device names with pvscan --lvmetad.Alasdair Kergon2012-03-021-1/+1
| | | | | | Hold global lock in pvscan --lvmetad. (This might need refinement.) Add PV name to "PV gone" messages. Adjust some log message severities. (More changes needed.)
* Reinstate error if e.g. daemon comms fails.Alasdair Kergon2012-03-021-1/+2
|
* Replace goto with just log_debugZdenek Kabelac2012-03-011-1/+1
| | | | | FIXME: temporal quick hack to make things green There might be a better reaction.
* Check return values after calling new lvmetad fnsAlasdair Kergon2012-02-281-6/+7
| | | | (Haven't checked error path handling though)
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-231-0/+2
| | | | lvm.conf *and* lvmetad is running.
* Move the core of the lib/config/config.c functionality into libdevmapper,Petr Rockai2011-08-301-1/+1
| | | | | | | leaving behind the LVM-specific parts of the code (convenience wrappers that handle `struct device` and `struct cmd_context`, basically). A number of functions have been renamed (in addition to getting a dm_ prefix) -- namely, all of the config interface now has a dm_config_ prefix.
* Defer writing PV labels to vg_write.Alasdair Kergon2011-06-011-2/+2
| | | | Store label_sector only in struct physical_volume.
* Add new free_pv_fid fn and use it throughout to free all attached fids.Peter Rajnoha2011-03-111-5/+13
| | | | | | | | Since format instances will use own memory pool, it's necessary to properly deallocate it. For now, only fid is deallocated. The PV structure itself still uses cmd mempool mostly, but anytime we'd like to add a mempool in the struct physical_volume, we can just rename this fn to free_pv and add the code (like we have free_vg fn for VGs).
* Improve pvremove error message when PV belongs to a VG.Alasdair Kergon2011-02-281-2/+2
|
* Remove useless mdas parameter for pv_read (from now on, we store mdas in aPeter Rajnoha2011-02-211-6/+4
| | | | format instance)
* Suppress 'No PV label' message when removing several PVs without mdas.Alasdair Kergon2010-11-231-1/+1
|
* Add escape sequence for ':' and '@' found in device names used as PVs.Peter Rajnoha2010-09-231-0/+1
|
* Remove assumption that --yes must be used only in --force modeMilan Broz2010-08-191-5/+0
| | | | | | | | This is not only undocumented but is is also in violation with --help documentation. Using --yes without --force is useful in pvcreate when it detects old signature.
* Use __attribute__ consistently throughout.Alasdair Kergon2010-07-091-1/+1
|
* Fix tools to report error when stopped by user.Milan Broz2009-12-031-1/+1
| | | | (And do not produce internal error message.)
* Try to avoid full rescan if label scan is enough.Milan Broz2009-02-251-2/+2
|
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-031-3/+3
|
* fix pvremove for pvs without mdasAlasdair Kergon2008-07-311-1/+23
|
* reinstate lost FIXMEAlasdair Kergon2008-07-241-0/+2
| | | | | - only if kernel gives the info, not to be worked out in userspace - with lvm.conf option to enable/disable the check
* Remove dead code, is_lvm_partition() - no functional change.Dave Wysochanski2008-07-231-7/+0
| | | | | This code does nothing. The function is #defined to 1 which ensures the only two if statements referencing it will never be true.
* FIXMEs for case where dm itself has device openAlasdair Kergon2007-11-221-0/+1
|
* Fix orphan-related locking in pvdisplay and pvs.Alasdair Kergon2007-11-021-5/+6
| | | | | | | | Fix missing VG unlocks in some pvchange error paths. Add some missing validation of VG names. Rename validate_vg_name() to validate_new_vg_name(). Change orphan lock to VG_ORPHANS. Change format1 to use ORPHAN as orphan VG name.
* Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.Alasdair Kergon2007-08-201-3/+3
|
* Make warnings go to stderr. Change log_warn to that effect, log_printPetr Rockai2007-06-281-1/+1
| | | | continues to send messages to stdout.
* Remove get_ prefix from get_pv_* functionsDave Wysochanski2007-06-151-3/+3
|
* Fix inverted logic on last checkin for pvremoveDave Wysochanski2007-06-141-1/+1
|
* convert pv->vg_name[0] to \!is_orphan(pv)Dave Wysochanski2007-06-141-4/+4
|
* Convert pv->vg_name to get_pv_vg_nameDave Wysochanski2007-06-141-1/+1
|
* Convert pv->vg_name to get_pv_vg_nameDave Wysochanski2007-06-131-2/+2
|
* Add missing pvremove error message when device doesn't exist.Alasdair Kergon2006-12-131-2/+2
|
* Fix pvremove error path for case when PV is in use.Alasdair Kergon2006-11-171-3/+3
|
* Make SIZE_SHORT the default for display_size().Alasdair Kergon2006-05-091-1/+1
| | | | | | | Fix some memory leaks in error paths found by coverity. Use C99 struct initialisers. Move DEFS into configure.h. Clean-ups to remove miscellaneous compiler warnings.
* pvremove without -f now fails if there's no PV label.Alasdair Kergon2006-04-051-3/+8
|
* Refuse to run pvcreate/pvremove on devices we can't open exclusively.Alasdair Kergon2005-10-031-0/+6
|
* Use ORPHAN lock definition throughout.Alasdair Kergon2005-10-031-3/+3
|
* Improve pvcreate/remove device not found error message.Alasdair Kergon2004-09-141-1/+2
|
* Display all filtered devices, not just PVs, with pvs -a.Alasdair Kergon2004-06-191-1/+1
|
* Update copyright notices.Alasdair Kergon2004-03-301-13/+8
|
* More consistent error code usage.Alasdair Kergon2003-10-211-8/+13
|
* Default stripesize 64k & config file setting for it;Alasdair Kergon2002-12-191-1/+0
| | | | | | Clear many compiler warnings (i386) & associated bugs - hopefully without introducing too many new bugs:-) (Same exercise required for other archs.) Default compilation has optimisation - or else use ./configure --enable-debug
* Some new features.Alasdair Kergon2002-11-181-0/+128