| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
alloc_policy_t, dm_string_mangling_t, percent_range_t, sign_t
|
|
|
|
| |
lvm.conf *and* lvmetad is running.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Store label_sector only in struct physical_volume.
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Make find_pv_in_vg_by_uuid() return same type as related functions.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
For implicit pvcreate support, we need to call this from vgcreate and vgextend,
so move it into toollib.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Make readonly locking available as locking type 4.
Fix readonly locking to permit writeable global locks (for vgscan). (2.02.49)
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
is required in fewer circumstances. (mornfall)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- only if kernel gives the info, not to be worked out in userspace
- with lvm.conf option to enable/disable the check
|
|
|
|
|
| |
This code does nothing. The function is #defined to 1 which ensures the only
two if statements referencing it will never be true.
|
| |
|
|
|
|
|
| |
Move size (setphysicalvolumesize option), metadatacopies and metadatasize
validation.
|
| |
|
| |
|
|
|
|
|
| |
Add (empty) orphan VGs to lvmcache during initialisation.
Fix orphan VG name used for format_pool.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Store size arguments as sectors internally.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
continues to send messages to stdout.
|
| |
|
|
|
|
|
| |
loops and to pvcreate.c, lvchange.c and lvresize.c to handle
interrupted prompts.
|
| |
|