summaryrefslogtreecommitdiffstats
path: root/tools/pvcreate.c
Commit message (Collapse)AuthorAgeFilesLines
* Using enum types for enumsZdenek Kabelac2012-02-281-1/+1
| | | | alloc_policy_t, dm_string_mangling_t, percent_range_t, sign_t
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-231-0/+1
| | | | lvm.conf *and* lvmetad is running.
* Add free_orphan_vgZdenek Kabelac2012-02-131-1/+0
| | | | | | | Move commod code to destroy orphan VG into free_orphan_vg() function. Use orphan vgmem for creation of PV lists. Remove some free_pv_fid() calls (FIXME: check all of them) FIXME: Check whether we could merge release_vg back again for all VGs.
* 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.
* Replace free_vg with release_vgZdenek Kabelac2011-08-101-1/+1
| | | | | | | | Move the free_vg() to vg.c and replace free_vg with release_vg and make the _free_vg internal. Patch is needed for sharing VG in vginfo cache so the release_vg function name is a better fit here.
* Defer writing PV labels to vg_write.Alasdair Kergon2011-06-011-1/+1
| | | | 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-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).
* Rename vg_release to free_vg.Alasdair Kergon2010-12-081-1/+1
|
* Add escape sequence for ':' and '@' found in device names used as PVs.Peter Rajnoha2010-09-231-0/+2
|
* Require --restorefile when using pvcreate --uuid.Mike Snitzer2010-08-121-0/+10
| | | | | | | | | Introduce --norestorefile to allow user to override the new requirement. This can also be overridden with "devices/require_restorefile_with_uuid" in lvm.conf -- however the default is 1. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* replace existing_pv with existing_pvlAlasdair Kergon2010-03-161-5/+5
|
* Look up missing PVs by uuid not dev_name in _pvs_single to avoid invalid stat.Alasdair Kergon2010-03-161-1/+1
| | | | Make find_pv_in_vg_by_uuid() return same type as related functions.
* Rename pvcreate_params processing functions to better match <object><action>.Dave Wysochanski2009-11-011-4/+4
| | | | | | Rename fill_default_pvcreate_params to pvcreate_params_set_defaults. Rename pvcreate_validate_restore_params to pvcreate_restore_params_validate. Rename pvcreate_validate_params to pvcreate_params_validate.
* Move pvcreate_validate_params into toollib to allow calling from mutiple tools.Dave Wysochanski2009-10-051-108/+0
| | | | | For implicit pvcreate support, we need to call this from vgcreate and vgextend, so move it into toollib.
* Refactor pvcreate - split pvcreate_validate_params into recovery/non-recovery.Dave Wysochanski2009-10-051-25/+37
| | | | | | | | | Split pvcreate_validate_params into recovery and non-recovery parameters. This is necessary so we can call the non-recovery validate function from vgextend / vgcreate. Note in the pvcreate tool case, we must call the recovery validation function first (see treatment of pe_start and --zero), and that we add a call to fill_default_pvcreate_params before the validation functions.
* Add lots of missing stack debug messages to tools.Alasdair Kergon2009-09-141-1/+3
| | | | | Make readonly locking available as locking type 4. Fix readonly locking to permit writeable global locks (for vgscan). (2.02.49)
* Add --dataalignmentoffset to pvcreate to shift start of aligned data areaMike Snitzer2009-07-301-1/+20
| | | | | | | | Adds pe_align_offset to 'struct physical_volume'; is initialized with set_pe_align_offset(). After pe_start is established pe_align_offset is added to it. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Move ORPHAN_VG lock outside pvcreate_single.Dave Wysochanski2009-07-261-0/+6
| | | | | | | | | The implicit pvcreate require either moving the ORPHAN_VG lock outside pvcreate_single or somehow having the function know or detect whether the ORPHAN_VG lock is already held. Author: Dave Wysochanski <dwysocha@redhat.com>
* Move bulk of pvcreate logic into library.Dave Wysochanski2009-07-261-238/+1
| | | | | | | | | | In preparation for implicit pvcreate during vgcreate / vgextend, move bulk of pvcreate logic inside library. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Author: Dave Wysochanski <dwysocha@redhat.com>
* Properly release VG memory pool in all CLI tools.Milan Broz2009-04-101-0/+1
|
* Some extra (paranoid) checks on dev_is_{md,swap} result.Petr Rockai2009-03-171-2/+15
|
* Detect and wipe swap signatures in pvcreate.Petr Rockai2009-03-171-1/+12
|
* Try to avoid full rescan if label scan is enough.Milan Broz2009-02-251-2/+2
|
* Add --dataalignment to pvcreate to specify alignment of data area. (mbroz)Alasdair Kergon2009-02-221-4/+26
| | | | | | | | | | | | | | | | | | This patch is not fully tested and leaves some related bugs unfixed. Intended behaviour of the code now: pe_start in the lvm2 format PV label header is set only by pvcreate (or vgconvert -M2) and then preserved in *all* operations thereafter. In some specialist cases, after the PV is added to a VG, the pe_start field in the VG metadata may hold a different value and if so, it overrides the other one for as long as the PV is in such a VG. Currently, the field storing the size of the data area in the PV label header always holds 0. As it only has meaning in the context of a volume group, it is calculated whenever the PV is added to a VG (and can be derived from extent_size and pe_count in the VG metadata).
* Right, a simple build (without options) is working again.Alasdair Kergon2008-11-031-2/+2
|
* Improve the way VGs with PVs missing are handled so manual interventionAlasdair Kergon2008-09-191-3/+0
| | | | is required in fewer circumstances. (mornfall)
* Add pvcreate tests to verify failure on md array detection.Dave Wysochanski2008-07-291-0/+3
|
* Refactor pvcreate - simplify return codes.Dave Wysochanski2008-07-251-8/+8
|
* Refactor pvcreate - --yes argumentDave Wysochanski2008-07-251-4/+4
|
* Refactor pvcreate - --force parameter.Dave Wysochanski2008-07-251-2/+5
|
* Refactor pvcreate - use '0' for no --uuid or --restorefile options.Dave Wysochanski2008-07-251-6/+7
|
* Refactor pvcreate - move uuid and restorefile options.Dave Wysochanski2008-07-251-37/+46
|
* 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.
* Refactor pvcreate - move labelsector parameter parsing & validation.Dave Wysochanski2008-07-231-2/+5
|
* Refactor pvcreate - divide parameter parsing & validation from create logic.Dave Wysochanski2008-07-211-44/+39
| | | | | Move size (setphysicalvolumesize option), metadatacopies and metadatasize validation.
* Refactor pvcreate to divide parameter parsing & validation from create logic.Dave Wysochanski2008-07-211-15/+42
|
* Refactor pv_create() to take cmd_context - no functional change.Dave Wysochanski2008-06-241-1/+1
|
* 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-5/+5
|
* use scan_vgs_for_pvs to detect non-orphans without MDAsAlasdair Kergon2008-01-161-1/+2
|
* Prevent pvcreate from overwriting MDA-less PVs belonging to active VGs.Petr Rockai2008-01-091-0/+12
|
* FIXMEs for case where dm itself has device openAlasdair Kergon2007-11-221-0/+1
|
* Accept sizes with --readahead argument.Alasdair Kergon2007-11-141-3/+2
| | | | Store size arguments as sectors internally.
* Fix orphan-related locking in pvdisplay and pvs.Alasdair Kergon2007-11-021-5/+5
| | | | | | | | 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-8/+8
|
* Allow keyboard interrupts in yes_no_prompt(). Add code to toollib.cPetr Rockai2007-06-151-0/+11
| | | | | loops and to pvcreate.c, lvchange.c and lvresize.c to handle interrupted prompts.
* convert pv->vg_name[0] to \!is_orphan(pv)Dave Wysochanski2007-06-141-6/+6
|