]> sourceware.org Git - lvm2.git/log
lvm2.git
15 years agopost-release
Alasdair Kergon [Thu, 6 Aug 2009 19:32:26 +0000 (19:32 +0000)]
post-release

15 years agopre-release
Alasdair Kergon [Thu, 6 Aug 2009 17:08:01 +0000 (17:08 +0000)]
pre-release

15 years agopre-release
Alasdair Kergon [Thu, 6 Aug 2009 16:30:34 +0000 (16:30 +0000)]
pre-release

15 years agoFix semaphore includes in dmsetup for udev sync.
Peter Rajnoha [Thu, 6 Aug 2009 15:56:50 +0000 (15:56 +0000)]
Fix semaphore includes in dmsetup for udev sync.

15 years agoRemove 11-dm-permissions.rules (is now in 12-dm-permissions.rules).
Peter Rajnoha [Thu, 6 Aug 2009 15:28:05 +0000 (15:28 +0000)]
Remove 11-dm-permissions.rules (is now in 12-dm-permissions.rules).

15 years agoRename template rule file 11-dm-permissions.rules to 12-dm-permissions.rules.
Peter Rajnoha [Thu, 6 Aug 2009 15:10:58 +0000 (15:10 +0000)]
Rename template rule file 11-dm-permissions.rules to 12-dm-permissions.rules.

15 years agoAdd 'udevcookies' command for dmsetup.
Peter Rajnoha [Thu, 6 Aug 2009 15:05:10 +0000 (15:05 +0000)]
Add 'udevcookies' command for dmsetup.

15 years agoAdd 'udevcomplete_all' command for dmsetup. Export DM_COOKIE_MAGIC in libdevmapper.h.
Peter Rajnoha [Thu, 6 Aug 2009 15:04:30 +0000 (15:04 +0000)]
Add 'udevcomplete_all' command for dmsetup. Export DM_COOKIE_MAGIC in libdevmapper.h.

15 years agoFix failure situations in dm_task_run for udev sync.
Peter Rajnoha [Thu, 6 Aug 2009 15:02:01 +0000 (15:02 +0000)]
Fix failure situations in dm_task_run for udev sync.

15 years agoDetect udev problems in _rename_dev_node.
Peter Rajnoha [Thu, 6 Aug 2009 15:00:25 +0000 (15:00 +0000)]
Detect udev problems in _rename_dev_node.

15 years agoAdditional logging
Alasdair Kergon [Wed, 5 Aug 2009 19:50:08 +0000 (19:50 +0000)]
Additional logging

15 years agoFix locking in clvmd
Christine Caulfield [Wed, 5 Aug 2009 14:18:35 +0000 (14:18 +0000)]
Fix locking in clvmd

The changes to remove LCK_NONBLOCK from the LVM locks broke clvmd because the
code was clearly wrong but working anyway! The constant was being masked rather
than the variable that was supposed to match against it.

15 years agoForgotten '%s' in one of _mk_link warning messages.
Peter Rajnoha [Wed, 5 Aug 2009 09:12:44 +0000 (09:12 +0000)]
Forgotten '%s' in one of _mk_link warning messages.

15 years agodetect udev mk_link problems
Alasdair Kergon [Tue, 4 Aug 2009 21:44:20 +0000 (21:44 +0000)]
detect udev mk_link problems

15 years agoAdded basic pvcreate --dataalignmentoffset testing to t-pvcreate-usage.sh
Mike Snitzer [Tue, 4 Aug 2009 16:02:39 +0000 (16:02 +0000)]
Added basic pvcreate --dataalignmentoffset testing to t-pvcreate-usage.sh
Added topology testing via new test/t-pvcreate-operation-md.sh
- requires mdadm and rawhide kernel for full test coverage

15 years agoAdd --noudevsync option for relevant LVM tools.
Peter Rajnoha [Tue, 4 Aug 2009 15:55:43 +0000 (15:55 +0000)]
Add --noudevsync option for relevant LVM tools.

15 years agoAdd --noudevsync option for relevant LVM tools.
Peter Rajnoha [Tue, 4 Aug 2009 15:53:04 +0000 (15:53 +0000)]
Add --noudevsync option for relevant LVM tools.

15 years agoAdd activation/udev_sync to lvm.conf.
Alasdair Kergon [Tue, 4 Aug 2009 15:36:13 +0000 (15:36 +0000)]
Add activation/udev_sync to lvm.conf.

15 years ago'--noudevsync' -- update relevant man pages
Peter Rajnoha [Tue, 4 Aug 2009 08:09:52 +0000 (08:09 +0000)]
'--noudevsync' -- update relevant man pages

15 years agoFix a typo in udev rule (splitname, NOT namesplit)
Peter Rajnoha [Tue, 4 Aug 2009 08:05:06 +0000 (08:05 +0000)]
Fix a typo in udev rule (splitname, NOT namesplit)

15 years agoAdd default udev rules.
Alasdair Kergon [Mon, 3 Aug 2009 18:44:54 +0000 (18:44 +0000)]
Add default udev rules.
Update dm-ioctl.h comments.

15 years agoAdd udev checks.
Alasdair Kergon [Mon, 3 Aug 2009 18:33:08 +0000 (18:33 +0000)]
Add udev checks.

15 years agoAdd warnings to check udev did what it was meant to.
Alasdair Kergon [Mon, 3 Aug 2009 18:31:53 +0000 (18:31 +0000)]
Add warnings to check udev did what it was meant to.

15 years agoOnly create LV symlinks on ACTIVATE not PRELOAD.
Alasdair Kergon [Mon, 3 Aug 2009 18:09:25 +0000 (18:09 +0000)]
Only create LV symlinks on ACTIVATE not PRELOAD.
(This is the udev behaviour - but does this change break anything?)

15 years agoManage without dm_udev_cleanup?
Alasdair Kergon [Mon, 3 Aug 2009 18:01:45 +0000 (18:01 +0000)]
Manage without dm_udev_cleanup?

15 years agoMove FIXME from user visible lvm2app.h to lvm_vg.c
Dave Wysochanski [Mon, 3 Aug 2009 12:11:45 +0000 (12:11 +0000)]
Move FIXME from user visible lvm2app.h to lvm_vg.c

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agocleanup some ignored return values & 'stack's
Alasdair Kergon [Mon, 3 Aug 2009 11:20:15 +0000 (11:20 +0000)]
cleanup some ignored return values & 'stack's

15 years agodeal with error-related FIXMEs
Alasdair Kergon [Mon, 3 Aug 2009 11:01:26 +0000 (11:01 +0000)]
deal with error-related FIXMEs

15 years agolvchange --noudevsync
Alasdair Kergon [Mon, 3 Aug 2009 10:58:40 +0000 (10:58 +0000)]
lvchange --noudevsync

15 years agoMake lvconvert honour log mirror options combined with downconversion.
Petr Rockai [Sun, 2 Aug 2009 21:59:21 +0000 (21:59 +0000)]
Make lvconvert honour log mirror options combined with downconversion.
(RHBZ 463272)

15 years agoSlightly refactor mirror log conversions in lvconvert.
Petr Rockai [Sun, 2 Aug 2009 21:56:29 +0000 (21:56 +0000)]
Slightly refactor mirror log conversions in lvconvert.

15 years agoAdd test for RHBZ 481793 (passing, thanks to vg_read changes checked in
Petr Rockai [Sun, 2 Aug 2009 21:45:45 +0000 (21:45 +0000)]
Add test for RHBZ 481793 (passing, thanks to vg_read changes checked in
previously).

15 years agoAllow LV suspend while --ignorelockingfailure is in force.
Petr Rockai [Sun, 2 Aug 2009 21:03:09 +0000 (21:03 +0000)]
Allow LV suspend while --ignorelockingfailure is in force.

15 years agoUpdate synopsis in lvconvert manpage to mention --repair.
Petr Rockai [Sun, 2 Aug 2009 21:01:51 +0000 (21:01 +0000)]
Update synopsis in lvconvert manpage to mention --repair.

15 years agoFix error handling of device-related stat() calls to be ENOENT aware.
Mike Snitzer [Sat, 1 Aug 2009 17:14:52 +0000 (17:14 +0000)]
Fix error handling of device-related stat() calls to be ENOENT aware.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoRetrieve MD sysfs attributes for MD partitions
Mike Snitzer [Sat, 1 Aug 2009 17:11:02 +0000 (17:11 +0000)]
Retrieve MD sysfs attributes for MD partitions

Rename private _primary_dev() to a public get_primary_dev() and reuse it
to allow retrieval of the MD sysfs attributes (raid level, etc) for MD
partitions.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoImprove ability to lookup primary device associated with a partition
Mike Snitzer [Sat, 1 Aug 2009 17:09:48 +0000 (17:09 +0000)]
Improve ability to lookup primary device associated with a partition

Improve lib/device/device.c:_primary_dev()'s ability to look up the
primary device associated with all partitions; including blkext
(e.g. partitions directly on MD).  The same will also work for obscure
sysfs paths; e.g.: paths with mangled names like the HP cciss driver
uses: /sys/block/cciss!c0d0/cciss!c0d0p1/

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoAdd devices/data_alignment_detection to lvm.conf.
Mike Snitzer [Sat, 1 Aug 2009 17:08:43 +0000 (17:08 +0000)]
Add devices/data_alignment_detection to lvm.conf.

Adds 'data_alignment_detection' config option to the devices section of
lvm.conf.  If your kernel provides topology information in sysfs (linux
>= 2.6.31) for the Physical Volume, the start of data area will be
aligned on a multiple of the ’minimum_io_size’ or ’optimal_io_size’
exposed in sysfs.

minimum_io_size is used if optimal_io_size is undefined (0).  If both
md_chunk_alignment and data_alignment_detection are enabled the result
of data_alignment_detection is used.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoAdd devices/data_alignment_offset_detection to lvm.conf.
Mike Snitzer [Sat, 1 Aug 2009 17:07:36 +0000 (17:07 +0000)]
Add devices/data_alignment_offset_detection to lvm.conf.

If the pvcreate --dataalignmentoffset option is not specified the start
of a PV's aligned data area will be shifted by the associated
'alignment_offset' exposed in sysfs (unless
devices/data_alignment_offset_detection is disabled in lvm.conf).

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agodummy makefile for now to keep builds happy
Alasdair Kergon [Fri, 31 Jul 2009 18:41:19 +0000 (18:41 +0000)]
dummy makefile for now to keep builds happy

15 years agoSet cookies in activation code and wait for udev to complete processing.
Alasdair Kergon [Fri, 31 Jul 2009 18:30:31 +0000 (18:30 +0000)]
Set cookies in activation code and wait for udev to complete processing.

15 years agoAdd udevcomplete and --noudevwait to dmsetup.
Alasdair Kergon [Fri, 31 Jul 2009 17:51:45 +0000 (17:51 +0000)]
Add udevcomplete and --noudevwait to dmsetup.

15 years agoanother fixme
Alasdair Kergon [Fri, 31 Jul 2009 16:57:06 +0000 (16:57 +0000)]
another fixme

15 years ago Add libdevmapper functions to support synchronisation with udev.
Alasdair Kergon [Fri, 31 Jul 2009 15:53:11 +0000 (15:53 +0000)]
  Add libdevmapper functions to support synchronisation with udev.

15 years agoFix compile warnings from recently added log_very_verbose() in _text_pv_write()
Mike Snitzer [Fri, 31 Jul 2009 14:23:06 +0000 (14:23 +0000)]
Fix compile warnings from recently added log_very_verbose() in _text_pv_write()

15 years agoconfigure --udevdir
Alasdair Kergon [Fri, 31 Jul 2009 13:31:53 +0000 (13:31 +0000)]
configure --udevdir

15 years agoadd not-yet-working udev options
Alasdair Kergon [Fri, 31 Jul 2009 11:51:23 +0000 (11:51 +0000)]
add not-yet-working udev options

15 years agoPrepare for udev synchronisation code. (options don't work yet)
Alasdair Kergon [Fri, 31 Jul 2009 11:49:53 +0000 (11:49 +0000)]
Prepare for udev synchronisation code.  (options don't work yet)

15 years agoDisable the "new pe_start policy"
Mike Snitzer [Thu, 30 Jul 2009 21:15:17 +0000 (21:15 +0000)]
Disable the "new pe_start policy"

Documented which use-cases force the reinstatement of the nuanced
handling of pe_start.  As soon as orphan PVs are eliminated much of this
will no longer be a concern ('preserve_pe_start' can be reenabled in
.pv_setup).

Added defensive 'if (pv->pe_align)' check in _text_pv_write()'s pe_start
loop.

15 years agoRevert 'preserve_pe_start' related code in _text_pv_setup
Mike Snitzer [Thu, 30 Jul 2009 18:40:22 +0000 (18:40 +0000)]
Revert 'preserve_pe_start' related code in _text_pv_setup

If pv_setup was given a non-zero pe_start it would short-circuit
establishing a default pv->pe_align.  pv->pe_align=0 would result
in a divide by zero in _mda_setup().  'vgconvert -M2 $vgname' hit this.

.pv_write still properly preserves pe_start if it was supplied.

15 years agoAdd --dataalignmentoffset to pvcreate to shift start of aligned data area
Mike Snitzer [Thu, 30 Jul 2009 17:45:28 +0000 (17:45 +0000)]
Add --dataalignmentoffset to pvcreate to shift start of aligned data area

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>
15 years agoPreserve pe_start in .pv_setup and .pv_write if pe_start was supplied.
Mike Snitzer [Thu, 30 Jul 2009 17:42:33 +0000 (17:42 +0000)]
Preserve pe_start in .pv_setup and .pv_write if pe_start was supplied.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoRemove legacy support for preserving pe_start if a PV already has data
Mike Snitzer [Thu, 30 Jul 2009 17:41:01 +0000 (17:41 +0000)]
Remove legacy support for preserving pe_start if a PV already has data
areas.

This preserved pe_start would quickly be readjusted to follow the first
mda anyway.  An example use-case that hit this code path is: running
pvcreate on an already existing PV _without_ a preceeding pvremove.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoFix _mda_setup() to not check first mda's size before pe_align rounding.
Mike Snitzer [Thu, 30 Jul 2009 17:19:31 +0000 (17:19 +0000)]
Fix _mda_setup() to not check first mda's size before pe_align rounding.

Without this fix rounding the end of the first mda to a pe_align
boundary could silently exceed the disk_size.

Final 'if (start1 + mda_size1 > disk_size)' block serves as a safety
net.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoFormalize pe_start policy as split between .pv_setup and .pv_write.
Mike Snitzer [Thu, 30 Jul 2009 17:18:03 +0000 (17:18 +0000)]
Formalize pe_start policy as split between .pv_setup and .pv_write.

Document existing pe_start policy.
Fix issue in _text_pv_setup() where existing pe_start case could have
the pv->pe_start set to pv->pe_align even though pe_start shouldn't ever
change.

vgconvert and pvcreate have a facility to preserve the existing start
of the on-disk data extents, known as pe_start.
They indicate this by passing the existing value to the pvsetup function
which must preserve it.

This patch avoids one particular case where the value could get
changed incorrectly now that the alignment settings are configurable.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
15 years agoDocument the -I option to clvmd
Christine Caulfield [Thu, 30 Jul 2009 13:32:38 +0000 (13:32 +0000)]
Document the -I option to clvmd

15 years agocorosync not cman...
Alasdair Kergon [Thu, 30 Jul 2009 12:31:45 +0000 (12:31 +0000)]
corosync not cman...

15 years agoFix configure script to handle multiple clvmd selections.
Alasdair Kergon [Thu, 30 Jul 2009 12:25:42 +0000 (12:25 +0000)]
Fix configure script to handle multiple clvmd selections.

15 years ago Fix lvm2app.pc installation filename.
Alasdair Kergon [Wed, 29 Jul 2009 19:24:11 +0000 (19:24 +0000)]
  Fix lvm2app.pc installation filename.

15 years agoDon't include lvm-version.h in exported liblvm file!
Dave Wysochanski [Wed, 29 Jul 2009 18:38:27 +0000 (18:38 +0000)]
Don't include lvm-version.h in exported liblvm file!

Move include of lvm-version.h into lvm_base.c where it belongs.

15 years agoRemove unneeded struct on return from lvm_lv_create_linear.
Dave Wysochanski [Wed, 29 Jul 2009 16:47:53 +0000 (16:47 +0000)]
Remove unneeded struct on return from lvm_lv_create_linear.

Results in compile warning.

15 years agorenamed include files
Alasdair Kergon [Wed, 29 Jul 2009 14:06:31 +0000 (14:06 +0000)]
renamed include files

15 years agoRemove pv_t, vg_t & lv_t handles from lib. Only liblvm uses them.
Alasdair Kergon [Wed, 29 Jul 2009 13:26:01 +0000 (13:26 +0000)]
Remove pv_t, vg_t & lv_t handles from lib.  Only liblvm uses them.
Rename lvm.h to lvm2app.h for now.

15 years agoRemove old custom list macros and replace with libdevmapper list
Jonathan Earl Brassow [Tue, 28 Jul 2009 21:14:12 +0000 (21:14 +0000)]
Remove old custom list macros and replace with libdevmapper list
macros.

15 years agopost-release
Alasdair Kergon [Tue, 28 Jul 2009 20:47:40 +0000 (20:47 +0000)]
post-release

15 years ago\n
Alasdair Kergon [Tue, 28 Jul 2009 20:41:41 +0000 (20:41 +0000)]
\n

15 years agoclean up a bit for release
Alasdair Kergon [Tue, 28 Jul 2009 19:32:26 +0000 (19:32 +0000)]
clean up a bit for release

15 years agopre-release
Alasdair Kergon [Tue, 28 Jul 2009 17:22:07 +0000 (17:22 +0000)]
pre-release

15 years agopre-release
Alasdair Kergon [Tue, 28 Jul 2009 17:07:48 +0000 (17:07 +0000)]
pre-release

15 years agoMaking adjustments to go along with the changes to the kernel.
Jonathan Earl Brassow [Tue, 28 Jul 2009 15:55:50 +0000 (15:55 +0000)]
Making adjustments to go along with the changes to the kernel.
A patch to the kernel, adding the 'luid' field to dm_ulog_request,
will allow us to properly identify log instances.  We will now
be able to definitively identify which logs are to be removed/
suspended/resumed.  This replaces the old faulty behavior of
assuming the logs were the same if they had the same UUID and
incrementing/decrementing a reference count.

15 years agoAdd doxygen mainpage tag to lvm.h
Dave Wysochanski [Tue, 28 Jul 2009 15:33:59 +0000 (15:33 +0000)]
Add doxygen mainpage tag to lvm.h

15 years agoAdd an open_mode to the vg struct for liblvm - enforce read / write semantics.
Dave Wysochanski [Tue, 28 Jul 2009 15:14:56 +0000 (15:14 +0000)]
Add an open_mode to the vg struct for liblvm - enforce read / write semantics.

For now, a simple way to enforce the read/write semantics is to just save the
open mode of the VG.  If the caller uses lvm_vg_create, the mode is write.
The caller using lvm_vg_open can use either read or write to open the VG.
Once we have this, we enforce the permissions on each API call and don't allow
a caller to modify a VG that has not been opened properly.

This may be better combined with the locking mode, but I view that as future
cleanup, past this initial release.  The intial release should enforce the
basic object semantics though, as described in the lvm.h file.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
15 years agoUpdate interactive unit test - fix silly vg_close error.
Dave Wysochanski [Tue, 28 Jul 2009 14:12:29 +0000 (14:12 +0000)]
Update interactive unit test - fix silly vg_close error.

15 years agoUpdate interactive unit test for liblvm - add vg_write, general cleanup.
Dave Wysochanski [Tue, 28 Jul 2009 13:49:28 +0000 (13:49 +0000)]
Update interactive unit test for liblvm - add vg_write, general cleanup.

15 years agoAdd lvm_vg_get_seqno, updating lvm.h and unit test.
Dave Wysochanski [Tue, 28 Jul 2009 13:17:04 +0000 (13:17 +0000)]
Add lvm_vg_get_seqno, updating lvm.h and unit test.

Adding the ability to get the seqno is important for an application to
determine if something has changed in a VG.  Otherwise, the only way to
know is to open the VG with write permission and hold the handle.

15 years agoUpdate lvm.h - remove remaining FIXMEs, note limitations of a few functions.
Dave Wysochanski [Tue, 28 Jul 2009 13:16:40 +0000 (13:16 +0000)]
Update lvm.h - remove remaining FIXMEs, note limitations of a few functions.

Almost done...

15 years agoFix lvm.h formatting.
Dave Wysochanski [Tue, 28 Jul 2009 12:19:58 +0000 (12:19 +0000)]
Fix lvm.h formatting.

15 years agoAdd lvm_library_get_version() and update unit tests to display version.
Dave Wysochanski [Tue, 28 Jul 2009 11:03:28 +0000 (11:03 +0000)]
Add lvm_library_get_version() and update unit tests to display version.

15 years agoUse dm_malloc and dm_free in liblvm instead of malloc/free.
Dave Wysochanski [Tue, 28 Jul 2009 09:56:48 +0000 (09:56 +0000)]
Use dm_malloc and dm_free in liblvm instead of malloc/free.

15 years agoRename lvm_create to lvm_init and lvm_destroy to lvm_quit.
Dave Wysochanski [Tue, 28 Jul 2009 09:16:18 +0000 (09:16 +0000)]
Rename lvm_create to lvm_init and lvm_destroy to lvm_quit.

15 years agoUpdate lvm.h to address feeback.
Dave Wysochanski [Tue, 28 Jul 2009 00:36:58 +0000 (00:36 +0000)]
Update lvm.h to address feeback.

This addresses a a large amount of Alasdair's review.  Subsequent patches
will address remaining issues.
Addressed:
// FIXME Mention that's also required on error.
// FIXME Be consistent in terminology.  It's called "system_dir" then last sentence says "system directory setting".  Is it referring to "system_dir" there or something else?
// FIXME Mention it frees all resources and cannot be used subsequently?
// FIXME What does "any system configuration" mean?
// FIXME Expand on that explanation a bit, now that we know what the other fns look like.
// FIXME Not sure about that - it needs to scan sometimes.  "will not" or "might not" ?
// FIXME: That's a FIXME in the code!!!
// FIXME What does "copied" mean in this context???
// FIXME Say what struct the returned struct dm_list is a list of...
// FIXME "This API" ?  This function creates an object in memory?
// FIXME This function commits the Volume Group object referenced by the VG handle to disk?
// FIXME Where is "Name" defined?  Absolute pathname?

Outstanding:
// FIXME Version function first?  No structs or handles needed for that.
// FIXME Sort out this alignment.  "Set an" directly below "system_dir" looks awful.  Indent differently?  More blank lines?
// FIXME Check how doxygen processes this.  E.g. "return: LVM handle.  You must use lvm_error() to check there were no errors and confirm that the handle is valid for passing to other functions."
// FIXME Find a better name.  lvm_init.
// FIXME Consider renaming according to the new name for lvm_create.
// FIXME Please can we use dm_malloc throughout?

15 years agoAdd warning to lvm.h stating API development in progress.
Dave Wysochanski [Mon, 27 Jul 2009 21:13:54 +0000 (21:13 +0000)]
Add warning to lvm.h stating API development in progress.

15 years agoUpdate WHATS_NEW for latest liblvm changes
Dave Wysochanski [Mon, 27 Jul 2009 21:10:30 +0000 (21:10 +0000)]
Update WHATS_NEW for latest liblvm changes

15 years agoRemove unnecessary \n's from log_error in liblvm.
Dave Wysochanski [Mon, 27 Jul 2009 21:03:15 +0000 (21:03 +0000)]
Remove unnecessary \n's from log_error in liblvm.

15 years agoAdd config_reload and config_override to test.c, change prompt.
Dave Wysochanski [Mon, 27 Jul 2009 21:02:51 +0000 (21:02 +0000)]
Add config_reload and config_override to test.c, change prompt.

  PV         PV UUID                                VG
  /dev/loop1 A95EvV-iqmb-ZFuJ-u8MV-Npwn-wlc2-Ul1Mnn vg1
  /dev/loop0 R16FDG-OmoS-HNGt-LSZY-OAlC-7qeU-t2gztp vg1
lvm> config_override loop0
Success overriding LVM configuration
lvm> config_reload
Success reloading LVM configuration
lvm> vg_open vg1
Couldn't find device with uuid 'A95EvV-iqmb-ZFuJ-u8MV-Npwn-wlc2-Ul1Mnn'.
Success opening vg vg1
lvm> vg_close vg1
lvm> quit

Maybe a bug in lvm_vg_open for missing pvs but the filter seems to work.

Change prompt from "lvm>" to "liblvm>".

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
15 years agoUpdate return code for lvm_config_reload.
Dave Wysochanski [Mon, 27 Jul 2009 21:02:35 +0000 (21:02 +0000)]
Update return code for lvm_config_reload.

15 years agoAdd lvm_config_override - allow caller to override config, similar to --config.
Dave Wysochanski [Mon, 27 Jul 2009 21:02:17 +0000 (21:02 +0000)]
Add lvm_config_override - allow caller to override config, similar to --config.

Allowing the caller to override the LVM configuration with an API will
enable them to use things such as device filters.
While very flexible, there is some danger to this API in that it will
make it harder to debug setups that have a changing config and deduce
what might have happened.  At some point we may want to limit the scope
of this API but for now it is as open as the --config option to lvm commands.

Update exported symbols.  When I renamed lvm_reload_config to lvm_config_reload
I forgot to rename so I renamed that one here.

This I believe is the last liblvm API for now.  ;-)

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
15 years agoRename _override_settings into override_config_tree_from_string and move.
Dave Wysochanski [Mon, 27 Jul 2009 21:01:56 +0000 (21:01 +0000)]
Rename _override_settings into override_config_tree_from_string and move.

Move _override_settings from tools/lvmcmdline.c into lib/config/config.c
and export so we can re-use in liblvm.

15 years agoRefactor _override_settings to take the new config string as input.
Dave Wysochanski [Mon, 27 Jul 2009 21:01:36 +0000 (21:01 +0000)]
Refactor _override_settings to take the new config string as input.

We will re-use this function from liblvm.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
15 years agoAdd skeletons of lvm_lv_resize and lvm_pv_resize - not yet implemented.
Dave Wysochanski [Mon, 27 Jul 2009 21:00:50 +0000 (21:00 +0000)]
Add skeletons of lvm_lv_resize and lvm_pv_resize - not yet implemented.

These lower-priority interfaces are not currently implemented in liblvm
but are on the TODO list in the near term.

Author: Thomas Woerner <twoerner@redhat.com>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
15 years agoUpdate test/api/test.c to include lvm_vg_reduce and lvm_vg_extend.
Dave Wysochanski [Mon, 27 Jul 2009 17:45:21 +0000 (17:45 +0000)]
Update test/api/test.c to include lvm_vg_reduce and lvm_vg_extend.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate test/api/vgtest.c to include lvm_vg_reduce.
Dave Wysochanski [Mon, 27 Jul 2009 17:44:58 +0000 (17:44 +0000)]
Update test/api/vgtest.c to include lvm_vg_reduce.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoAdd lvm_vg_reduce to liblvm2app
Dave Wysochanski [Mon, 27 Jul 2009 17:44:29 +0000 (17:44 +0000)]
Add lvm_vg_reduce to liblvm2app

Extend lvm_vg_write to remove pvs removed in lvm_vg_reduce. The lvm
volume_group internal structure removed_pvs is used for that. The list is
empty afterwards.

Add new test for vg->pvs emptyness to lvm_vg_write to prevent to write empty
vgs. This is needed because of lvm_vg_reduce and lv_vg_create, which creates
empty vgs.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoAdd vg_reduce to metadata.c and metadata-exported.h
Dave Wysochanski [Mon, 27 Jul 2009 17:43:39 +0000 (17:43 +0000)]
Add vg_reduce to metadata.c and metadata-exported.h

This function behaves a little bit different than vg_reduce_single, because
it allowes to remove even the latest pv. This has been done to be consistent
to lvm_vg_create, which creates an empty vg.

removed_pvs has been added to the volume_group struct. vg_reduce adds remove
pvs to this list to be able to commit the changes for the pvs in lvm_vg_comm
in liblvm2app.

Initialize removed_pvs list in format-specific volume_group constructors.
Ideally, we should have a base constructor here that initializes the general
non-format specific members of struct volume_group.  But until then, there
are multiple places to initialize these members.  Maybe a better patch would
be a base constructor patch for struct volume_group.  That is more work
though.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate error return and comments for lvm_list_vg_names/uuids.
Dave Wysochanski [Mon, 27 Jul 2009 11:00:17 +0000 (11:00 +0000)]
Update error return and comments for lvm_list_vg_names/uuids.

The two liblvm functions that return a list of vgnames and vguuids use
cmd->mem to allocate the list.  Make it clear to the caller that this
memory will be freed when the LVM handle is freed.

Clean up and clarify the return value of the functions.  In the
case of a memory allocation error, add a couple log_errnos to the internal
code, and make it clear that memory allocation returns a NULL pointer.
If there are no VGs in the system, the list returned is an empty list.

Make a note of the fact that currently we return hidden VG names, how
these can be detected (always start with "#"), and that they should
not be used.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoRename lvm_reload_config to lvm_config_reload.
Dave Wysochanski [Mon, 27 Jul 2009 10:18:51 +0000 (10:18 +0000)]
Rename lvm_reload_config to lvm_config_reload.

The general naming scheme for most liblvm APIs is:
lvm_<object>_<action>

As there are likely to be other things to do on the lvm 'config' object
(i.e. lvm_config_set_device_filter), we should use consistent naming.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate display.c to use vg_free(vg) instead of duplicating the calculation.
Dave Wysochanski [Mon, 27 Jul 2009 10:18:31 +0000 (10:18 +0000)]
Update display.c to use vg_free(vg) instead of duplicating the calculation.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoMore liblvm header file cleanups.
Dave Wysochanski [Mon, 27 Jul 2009 08:28:13 +0000 (08:28 +0000)]
More liblvm header file cleanups.

Author: Dave Wysochanski <dwysocha@redhat.com>

15 years agoUpdate WHATS_NEW for latest liblvm changes
Dave Wysochanski [Sun, 26 Jul 2009 22:19:14 +0000 (22:19 +0000)]
Update WHATS_NEW for latest liblvm changes

15 years agoUpdate test/api/test.c to display lvm_lv_is_active and lvm_lv_is_suspended.
Dave Wysochanski [Sun, 26 Jul 2009 20:59:02 +0000 (20:59 +0000)]
Update test/api/test.c to display lvm_lv_is_active and lvm_lv_is_suspended.

Author: Dave Wysochanski <dwysocha@redhat.com>

This page took 0.069078 seconds and 5 git commands to generate.