summaryrefslogtreecommitdiffstats
path: root/tools/pvscan.c
Commit message (Collapse)AuthorAgeFilesLines
* config: add silent modeAlasdair G Kergon2012-08-251-32/+26
| | | | | | | | | | | | | | | | 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.
* cleanup: use proper activation_change_tZdenek Kabelac2012-08-231-1/+2
|
* cleanup: keep MKNOD type cast cleanZdenek Kabelac2012-08-231-1/+1
| | | | Setup major already a dev_t type before it gets shifted.
* pvscan: add --activate ay option (autoactivate)Peter Rajnoha2012-06-281-0/+27
| | | | | | | | | | | Define auto_activation_handler that activates VGs/LVs automatically based on the activation/auto_activation_volume_list (activating all volumes by default if the list is not defined). The autoactivation is done within the pvscan call in 69-dm-lvmetad.rules that watches for udev events (device appearance/removal). For now, this works for non-clustered and complete VGs only.
* activate: add autoactivation hooksPeter Rajnoha2012-06-281-6/+7
| | | | | | | | | | | | | | | | 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...).
* cleanup: replace memset with struct initilizationZdenek Kabelac2012-06-221-5/+3
| | | | | Simplifies the code, properly detects too long socket paths, drops unused parameter.
* Switch pvscan --cache major:minor to --major --minor.Alasdair Kergon2012-03-061-51/+57
|
* Scan all devices for lvmetad if 'pvscan --cache' used without device list.Alasdair Kergon2012-03-031-7/+102
|
* Obtain VG list from lvmetad before relying on get_vgs, otherwise PVs in VGsAlasdair Kergon2012-03-031-2/+6
| | | | don't appear.
* Reinstate accidentally-deleted line.Alasdair Kergon2012-03-031-0/+1
|
* Change pvscan --lvmetad to pvscan --cache.Alasdair Kergon2012-03-021-2/+2
|
* Allow multiple device names with pvscan --lvmetad.Alasdair Kergon2012-03-021-8/+31
| | | | | | 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.)
* Check return values after calling new lvmetad fnsAlasdair Kergon2012-02-281-1/+3
| | | | (Haven't checked error path handling though)
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-231-4/+12
| | | | lvm.conf *and* lvmetad is running.
* Add new free_pv_fid fn and use it throughout to free all attached fids.Peter Rajnoha2011-03-111-1/+3
| | | | | | | | 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).
* Use __attribute__ consistently throughout.Alasdair Kergon2010-07-091-4/+4
|
* Fix truncated total size displayed by pvscan.Alasdair Kergon2010-05-071-1/+1
|
* Change most remaining log_error WARNING messages to log_warn.Alasdair Kergon2010-04-011-1/+1
|
* Cleanup returns for void functions.Zdenek Kabelac2009-12-111-1/+0
|
* Add lots of missing stack debug messages to tools.Alasdair Kergon2009-09-141-0/+1
| | | | | Make readonly locking available as locking type 4. Fix readonly locking to permit writeable global locks (for vgscan). (2.02.49)
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-031-5/+5
|
* Fix vgreduce to use vg_split_mdas to check sufficient mdas remain.Alasdair Kergon2008-04-081-1/+1
| | | | | Add (empty) orphan VGs to lvmcache during initialisation. Fix orphan VG name used for format_pool.
* Some whitespace tidy-ups.Alasdair Kergon2008-01-301-2/+2
|
* Convert pvchange, pvdisplay, pvscan to use is_orphan()Bryn M. Reeves2007-11-021-3/+3
|
* Add pv_dev_name() to access PV device name.Dave Wysochanski2007-10-121-4/+4
| | | | Patch by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
* Introduce VG_GLOBAL lock type for vgscan/pvscan to trigger clvmd -R.Alasdair Kergon2007-08-231-1/+11
|
* 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-27/+27
|
* 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-6/+6
|
* Convert pv->status to get_pv_statusDave Wysochanski2007-06-131-2/+2
|
* Convert pv->dev to get_pv_devDave Wysochanski2007-06-131-4/+4
|
* Convert pv->size to get_pv_sizeDave Wysochanski2007-06-131-3/+3
|
* Convert pv->pe_size to get_pv_pe_sizeDave Wysochanski2007-06-131-9/+10
|
* Convert pv->pe_count to get_pv_pe_countDave Wysochanski2007-06-131-3/+3
|
* Convert pv->pe_alloc_count to get_pv_pe_alloc_countDave Wysochanski2007-06-131-1/+1
|
* Adjust some alignments for ia64 and sparc.Alasdair Kergon2006-11-301-1/+1
| | | | (Some of the changes are probably unnecessary.)
* Make SIZE_SHORT the default for display_size().Alasdair Kergon2006-05-091-13/+13
| | | | | | | 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.
* Improve detection of external changes affecting internal cache.Alasdair Kergon2005-03-211-3/+0
|
* Fix rounding of large displayed sizes.Alasdair Kergon2004-06-071-16/+15
|
* Update copyright notices.Alasdair Kergon2004-03-301-13/+8
|
* Change pvscan to show total of usable device size (instead of free data space).Alasdair Kergon2003-12-091-2/+1
|
* More consistent error code usage.Alasdair Kergon2003-10-211-2/+2
|
* macro changesAlasdair Kergon2003-10-151-8/+5
|
* Another sync point - numerous fixes & clean ups.Alasdair Kergon2003-07-041-1/+1
|
* Default stripesize 64k & config file setting for it;Alasdair Kergon2002-12-191-18/+20
| | | | | | 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
* New column-based reporting tools: lvs, pvs & vgs.Alasdair Kergon2002-12-121-27/+14
|
* Some new features.Alasdair Kergon2002-11-181-87/+91
|
* Merge with text format branch.Alasdair Kergon2002-04-241-9/+9
| | | | | | | | | | | | | | | | | | | Lots of changes/very little testing so far => there'll be bugs! Use 'vgcreate -M text' to create a volume group with its metadata stored in text files. Text format metadata changes should be reasonably atomic, with a (basic) automatic recovery mechanism if the system crashes while a change is in progress. Add a metadata section to lvm.conf to specify multiple directories if you want (recommended) to keep multiple copies of the metadata (eg on different filesystems). e.g. metadata { dirs = ["/etc/lvm/metadata1","/usr/local/lvm/metadata2"] } Plenty of refinements still in the pipeline.