]> sourceware.org Git - lvm2.git/log
lvm2.git
12 years agoCheck for vg_name existance
Zdenek Kabelac [Mon, 27 Feb 2012 11:23:15 +0000 (11:23 +0000)]
Check for vg_name existance

Since vg_read() mda ops could be called with NULL vg_name,
check it before derefence also for pool and format1.

12 years agoSystemd is linux-specific - move the supporting code under the 'ifdef linux'.
Peter Rajnoha [Mon, 27 Feb 2012 11:13:51 +0000 (11:13 +0000)]
Systemd is linux-specific - move the supporting code under the 'ifdef linux'.

Some 'defines' used in this specific code were already under an ifdef so this
patch just completes it.

12 years agoFix missing break
Zdenek Kabelac [Mon, 27 Feb 2012 11:13:48 +0000 (11:13 +0000)]
Fix missing break

Bug introduced with addition of internal error default case.
Seem like this code is not used.
TODO: add coverage test.

12 years agoAdd assert for oldname
Zdenek Kabelac [Mon, 27 Feb 2012 10:19:00 +0000 (10:19 +0000)]
Add assert for oldname

Code cannot proceed if oldname would be NULL.
Since lvmetad currently doesn't use logging mechanism of lvm to report
internal errors - stay with current code style of lvmetad which uses
plain asserts for cases like this.

12 years agoA bit more safe version of sprintf
Zdenek Kabelac [Mon, 27 Feb 2012 10:17:06 +0000 (10:17 +0000)]
A bit more safe version of sprintf

Use just buffer size limit (it's used for debug only)

12 years agoTest seg pointer for non-null
Zdenek Kabelac [Mon, 27 Feb 2012 10:15:08 +0000 (10:15 +0000)]
Test seg pointer for non-null

As the function accepts NULL for 'seg' parameter,
check for it before dereference.

12 years agoMove allocation after check for vgid
Zdenek Kabelac [Mon, 27 Feb 2012 10:10:43 +0000 (10:10 +0000)]
Move allocation after check for vgid

so there is no mem leak on this error path.
Also actually check if the hash exists.

12 years agoMake force_t enum usage obvious
Zdenek Kabelac [Mon, 27 Feb 2012 10:06:58 +0000 (10:06 +0000)]
Make force_t enum usage obvious

12 years agoTest result of _init_tags.
Zdenek Kabelac [Mon, 27 Feb 2012 10:05:35 +0000 (10:05 +0000)]
Test result of _init_tags.

12 years agoExplicitely ignore result from sync_unlock()
Zdenek Kabelac [Mon, 27 Feb 2012 10:02:17 +0000 (10:02 +0000)]
Explicitely ignore result from sync_unlock()

Make it obvious to analyzer - we can't do anything better here anyway.

12 years agoAlways check result of _set_vg_name()
Zdenek Kabelac [Mon, 27 Feb 2012 10:00:23 +0000 (10:00 +0000)]
Always check result of _set_vg_name()

12 years agoDrop uname call, it's not used from gulm era.
Zdenek Kabelac [Mon, 27 Feb 2012 09:58:18 +0000 (09:58 +0000)]
Drop uname call, it's not used from gulm era.

12 years agoCheck allocation result
Zdenek Kabelac [Mon, 27 Feb 2012 09:56:27 +0000 (09:56 +0000)]
Check allocation result

12 years agoRemove test for pvid
Zdenek Kabelac [Mon, 27 Feb 2012 09:54:25 +0000 (09:54 +0000)]
Remove test for pvid

Since pvid is char buffer[] and not pointer,
there is no point to check it for NULL.

12 years agoIgnore result of unlock explicitely
Zdenek Kabelac [Mon, 27 Feb 2012 09:52:37 +0000 (09:52 +0000)]
Ignore result of unlock explicitely

12 years agoJust reindent with tabs
Zdenek Kabelac [Mon, 27 Feb 2012 09:51:31 +0000 (09:51 +0000)]
Just reindent with tabs

12 years agoUse 'killproc' fn in lvmetad init script (fn provided by 'functions' init script...
Peter Rajnoha [Mon, 27 Feb 2012 08:56:46 +0000 (08:56 +0000)]
Use 'killproc' fn in lvmetad init script (fn provided by 'functions' init script library).

12 years agoFix a possible SEGV in lvmetad client code, and a minor leak in pvscan
Petr Rockai [Sun, 26 Feb 2012 13:42:50 +0000 (13:42 +0000)]
Fix a possible SEGV in lvmetad client code, and a minor leak in pvscan
--lvmetad.

12 years agoA bit of documentation for lvmetad_vg_lookup.
Petr Rockai [Sun, 26 Feb 2012 08:50:13 +0000 (08:50 +0000)]
A bit of documentation for lvmetad_vg_lookup.

12 years ago- Improve error reporting on lvmetad connection failure.
Petr Rockai [Sun, 26 Feb 2012 08:49:40 +0000 (08:49 +0000)]
- Improve error reporting on lvmetad connection failure.
- Fix a couple of memory leaks in the lvmetad client code.
- Avoid an error in lvmetad_pv_gone when we aren't using lvmetad.

12 years agoImprove error handling & reporting in common daemon code.
Petr Rockai [Sun, 26 Feb 2012 08:46:28 +0000 (08:46 +0000)]
Improve error handling & reporting in common daemon code.

12 years agoAdd tentative documentation of pvscan --lvmetad to the pvscan manpage.
Petr Rockai [Sun, 26 Feb 2012 08:45:07 +0000 (08:45 +0000)]
Add tentative documentation of pvscan --lvmetad to the pvscan manpage.

12 years agoAlso remove intermediate lvmetad init script file.
Peter Rajnoha [Fri, 24 Feb 2012 15:07:00 +0000 (15:07 +0000)]
Also remove intermediate lvmetad init script file.

12 years agoUse '-p PID_FILE' for the status call since the pidfile is in its own lvm subdir...
Peter Rajnoha [Fri, 24 Feb 2012 13:45:37 +0000 (13:45 +0000)]
Use '-p PID_FILE' for the status call since the pidfile is in its own lvm subdir and return proper status code.

12 years agoThe daemon as well as the first scan must be both executed properly, otherwise it...
Peter Rajnoha [Fri, 24 Feb 2012 13:11:57 +0000 (13:11 +0000)]
The daemon as well as the first scan must be both executed properly, otherwise it's an error!

12 years agoAdd LVMetaD init script.
Peter Rajnoha [Fri, 24 Feb 2012 13:03:50 +0000 (13:03 +0000)]
Add LVMetaD init script.

12 years agoAdd skeleton for lvmetad udev rules - 69-dm-lvm-metad.rules.
Peter Rajnoha [Fri, 24 Feb 2012 09:53:12 +0000 (09:53 +0000)]
Add skeleton for lvmetad udev rules - 69-dm-lvm-metad.rules.

Why using the order 69:

  - Storage processing in general happens in 60-persistent-storage.rules,
    including the blkid call that adds some usable information we can use
    for filtering and speedup (these rules are part of upstream udev and
    the order is preserved on most distros)

  - There's still some other storage-related processing done after
    60-persistent-storage.rules in general. These might add some detailed
    storage-related information we might use to filter devices effectively
    (e.g. MD udev rules, ...).

  - We need lvmetad rules to be processed before any consumers can use the
    output - so the metadata cache is ready soon enough (e.g. udisks rules).

  - There's no official (upstream udev) document about assigning the order,
    so this number is chosen in best belief it will suit all scenarios.

12 years agoFix server-side leaks in lvmetad.
Petr Rockai [Fri, 24 Feb 2012 00:24:37 +0000 (00:24 +0000)]
Fix server-side leaks in lvmetad.

12 years agoClean up the lvmetad state more thoroughly upon shutdown.
Petr Rockai [Fri, 24 Feb 2012 00:11:59 +0000 (00:11 +0000)]
Clean up the lvmetad state more thoroughly upon shutdown.

12 years agoFix an error path in daemon_open.
Petr Rockai [Fri, 24 Feb 2012 00:02:54 +0000 (00:02 +0000)]
Fix an error path in daemon_open.

12 years agoMake the calls to pvscan --lvmetad in the testsuite slightly more civilised.
Petr Rockai [Thu, 23 Feb 2012 23:58:42 +0000 (23:58 +0000)]
Make the calls to pvscan --lvmetad in the testsuite slightly more civilised.

12 years agoCouple of improvements in the daemon (common + lvmetad) code:
Petr Rockai [Thu, 23 Feb 2012 23:52:11 +0000 (23:52 +0000)]
Couple of improvements in the daemon (common + lvmetad) code:
- some client-side memory leak fixes
- announce and check protocols and protocol versions

12 years agoLimit sscanf params with size
Zdenek Kabelac [Thu, 23 Feb 2012 22:50:50 +0000 (22:50 +0000)]
Limit sscanf params with size

Make sure parsed string fits given char buffer.

12 years agoUnit testing for some string libdm functions
Zdenek Kabelac [Thu, 23 Feb 2012 22:47:17 +0000 (22:47 +0000)]
Unit testing for some string libdm functions

TODO: more functions need to be unit tested.

12 years agoIntroduce dm_strncpy
Zdenek Kabelac [Thu, 23 Feb 2012 22:45:43 +0000 (22:45 +0000)]
Introduce dm_strncpy

Should be faster then strncpy - since we could avoid clearing 4KB pages
with each strncpy(...,PATH_MAX).
Also it's easy to check whether string fit - and eventually avoid
to continue working we incomplete string.

12 years agoUse const for lv
Zdenek Kabelac [Thu, 23 Feb 2012 22:41:57 +0000 (22:41 +0000)]
Use const for lv

lv_is_active doesn't needs modifiable LV struct so keep it const.

Remove lv_send_message() left bits from code -
they were never released in 2.02.89.

12 years agoKeep same sign for 's' counter
Zdenek Kabelac [Thu, 23 Feb 2012 22:36:56 +0000 (22:36 +0000)]
Keep same sign for 's' counter

12 years agoDrop const modifier from fb
Zdenek Kabelac [Thu, 23 Feb 2012 22:36:21 +0000 (22:36 +0000)]
Drop const modifier from fb

It's not useful here to use const - since we need non-const value for unmap.
Also remove now unneeded cast.

12 years agoAdd explicit cast for time() ret value
Zdenek Kabelac [Thu, 23 Feb 2012 22:31:23 +0000 (22:31 +0000)]
Add explicit cast for time() ret value

To keep all numbers with same sign

12 years agoUse same signed numbers
Zdenek Kabelac [Thu, 23 Feb 2012 22:30:20 +0000 (22:30 +0000)]
Use same signed numbers

Keep unsigned aritmetic.

TODO: we should probably switch dm_split_words() to return unsigned numbers.
(minor API libdm change mostly compatible)

12 years agoDrop backtrace after log_error
Zdenek Kabelac [Thu, 23 Feb 2012 22:24:47 +0000 (22:24 +0000)]
Drop backtrace after log_error

Just a minor change to not give backtrace when log_error has been just
reported.

12 years agoRemaing code suffling
Zdenek Kabelac [Thu, 23 Feb 2012 22:23:12 +0000 (22:23 +0000)]
Remaing code suffling

Move declaration to the front of function to follow coding rules.

12 years agoFix regression from cleanup commit
Zdenek Kabelac [Thu, 23 Feb 2012 19:03:48 +0000 (19:03 +0000)]
Fix regression from cleanup commit

baton is being modified, so needs to be cleared before each use.

12 years agopost-release
Alasdair Kergon [Thu, 23 Feb 2012 18:26:28 +0000 (18:26 +0000)]
post-release

12 years agopre-release
Alasdair Kergon [Thu, 23 Feb 2012 18:22:09 +0000 (18:22 +0000)]
pre-release

12 years agoMissed dm_free in last commit
Zdenek Kabelac [Thu, 23 Feb 2012 18:19:32 +0000 (18:19 +0000)]
Missed dm_free in last commit

12 years agoLimit number of mem allocs and copies
Zdenek Kabelac [Thu, 23 Feb 2012 18:05:12 +0000 (18:05 +0000)]
Limit number of mem allocs and copies

If we have good enough glibc to return number of needed chars, do not
loop try to reach good size, but use this size directly for allocation,
saving also last strdup.

Since now we start with 16 bytes - skip buffer realloc for shorter string.

12 years agoSome reformating for lvmetad uddates
Zdenek Kabelac [Thu, 23 Feb 2012 17:59:32 +0000 (17:59 +0000)]
Some reformating for lvmetad uddates

cleanup gcc warning,
use PRIu64
header cleanups
const pointer fixes.

12 years agoRequire number of stripes to be greater than parity devices in higher RAID.
Jonathan Earl Brassow [Thu, 23 Feb 2012 17:36:35 +0000 (17:36 +0000)]
Require number of stripes to be greater than parity devices in higher RAID.

Also, add some comments to code that I recently added that may be unclear
otherwise.

12 years agoAdd a vgscan to lvcreate-repair.sh. The old test applied device filter hacks to
Petr Rockai [Thu, 23 Feb 2012 14:55:29 +0000 (14:55 +0000)]
Add a vgscan to lvcreate-repair.sh. The old test applied device filter hacks to
make devices invisible to lvm, but the behaviour of those is slightly different
than of actual missing devices. Running vgscan after re-enabling the device
triggers a metadata repair which is not done by vgremove -ff. This is not a
regression, merely an odd behaviour that has been around even before lvmetad.

12 years agoUse 'd' instead of 'D' in tmpfiles configuration to not overwrite any existing directory.
Peter Rajnoha [Thu, 23 Feb 2012 14:24:30 +0000 (14:24 +0000)]
Use 'd' instead of 'D' in tmpfiles configuration to not overwrite any existing directory.

...that happens when systemd creates it first (e.g. based on a .socket unit)
before the tmpfiles.d content is executed.

12 years agoKick out a debugging call to valgrind in lvmcache-exercise.sh.
Petr Rockai [Thu, 23 Feb 2012 14:21:18 +0000 (14:21 +0000)]
Kick out a debugging call to valgrind in lvmcache-exercise.sh.

12 years agoAdd a missed dependency that is required to pull in dameons/common in an early
Petr Rockai [Thu, 23 Feb 2012 13:58:56 +0000 (13:58 +0000)]
Add a missed dependency that is required to pull in dameons/common in an early
part of the build.

12 years agoWe need daemons/common now even if the lvmetad server side is not built.
Petr Rockai [Thu, 23 Feb 2012 13:41:11 +0000 (13:41 +0000)]
We need daemons/common now even if the lvmetad server side is not built.

12 years agoRemove the old systemd socket file, we're using the .in template now.
Peter Rajnoha [Thu, 23 Feb 2012 13:39:08 +0000 (13:39 +0000)]
Remove the old systemd socket file, we're using the .in template now.

12 years agoUse DEFAULT_RUN_DIR instead of hardcoded value in lvmetad systemd units
Peter Rajnoha [Thu, 23 Feb 2012 13:31:49 +0000 (13:31 +0000)]
Use DEFAULT_RUN_DIR instead of hardcoded value in lvmetad systemd units
and add ExecStartPost=vgscan to actually run the first scan that will
fill the metadata daemon with metadata information.

12 years agoAdd -ldaemon to make.tmpl.in.
Petr Rockai [Thu, 23 Feb 2012 13:31:01 +0000 (13:31 +0000)]
Add -ldaemon to make.tmpl.in.

12 years agoMissed update for include/.symlinks.in to include lvmetad.h.
Petr Rockai [Thu, 23 Feb 2012 13:19:26 +0000 (13:19 +0000)]
Missed update for include/.symlinks.in to include lvmetad.h.

12 years agoThe lvmetad client-side integration. Only active when use_lvmetad = 1 is set in
Petr Rockai [Thu, 23 Feb 2012 13:11:07 +0000 (13:11 +0000)]
The lvmetad client-side integration. Only active when use_lvmetad = 1 is set in
lvm.conf *and* lvmetad is running.

12 years agoAlso use DEFAULT_RUN_DIR for the lvmetad socket on the client side.
Petr Rockai [Thu, 23 Feb 2012 11:40:24 +0000 (11:40 +0000)]
Also use DEFAULT_RUN_DIR for the lvmetad socket on the client side.

12 years agoAdd LVMetaD systemd units.
Peter Rajnoha [Thu, 23 Feb 2012 11:24:07 +0000 (11:24 +0000)]
Add LVMetaD systemd units.

12 years agoInstall lvm2 monitoring init script and systemd units only if dmeventd is built.
Peter Rajnoha [Thu, 23 Feb 2012 11:13:18 +0000 (11:13 +0000)]
Install lvm2 monitoring init script and systemd units only if dmeventd is built.

12 years agoClean intermediate files.
Peter Rajnoha [Thu, 23 Feb 2012 10:01:12 +0000 (10:01 +0000)]
Clean intermediate files.

12 years agoFix allocation code to allow replacement of single RAID 4/5/6 device.
Jonathan Earl Brassow [Thu, 23 Feb 2012 03:57:23 +0000 (03:57 +0000)]
Fix allocation code to allow replacement of single RAID 4/5/6 device.

The code fail to account for the case where we just need a single device
in a RAID 4/5/6 array.  There is no good way to tell the allocation functions
that we don't need parity devices when we are allocating just a single device.
So, I've used a bit of a hack.  If we are allocating an area_count that is <=
the parity count, then we can assume we are simply allocating a replacement
device (i.e. no need to include parity devices in the calculations).  This
should make sense in most cases.  If we need to allocate replacement devices
due to failure (or moving), we will never allocate more than the parity count;
or we would cause the array to become unusable.  If we are creating a new device,
we should always create more stripes than parity devices.

12 years agoCheck all tags and LV names are in a valid form in vg_validate.
Alasdair Kergon [Thu, 23 Feb 2012 00:11:01 +0000 (00:11 +0000)]
Check all tags and LV names are in a valid form in vg_validate.

12 years agoAdd lvm2 tmpfiles.d configuration file.
Peter Rajnoha [Wed, 22 Feb 2012 18:02:31 +0000 (18:02 +0000)]
Add lvm2 tmpfiles.d configuration file.

12 years agoAdd configure --with-tmpfilesdir and lvm2 tmpfiles.d configuration file itself.
Peter Rajnoha [Wed, 22 Feb 2012 17:55:10 +0000 (17:55 +0000)]
Add configure --with-tmpfilesdir and lvm2 tmpfiles.d configuration file itself.

/etc/tmpfiles.d directory holds configuration files for temporary/volatile
files and directories that should be automatically managed. For example,
if we have some parts of the fs hierarchy on tmpfs, we'd like to recreate
some files or directories on every boot so they're always prepared for use.

Systemd can read such configuration files. For now, the lock and run directory
are the ones that are most probably placed on tmpfs. If this is the case, we
can install the configuration by 'make install_tmpfiles_configuration'.

12 years agoAllow 'lvconvert --repair' to operate on RAID 4/5/6.
Jonathan Earl Brassow [Wed, 22 Feb 2012 17:18:49 +0000 (17:18 +0000)]
Allow 'lvconvert --repair' to operate on RAID 4/5/6.

The higher level RAIDs should be allowed for repair along with 'mirror' and
'raid1' segment types.

12 years ago*** empty log message ***
Jonathan Earl Brassow [Wed, 22 Feb 2012 17:14:38 +0000 (17:14 +0000)]
*** empty log message ***

12 years agoAdd some messages that indicate completion of RAID device replacement.
Jonathan Earl Brassow [Wed, 22 Feb 2012 16:03:55 +0000 (16:03 +0000)]
Add some messages that indicate completion of RAID device replacement.

There were no messages printed upon completiion of RAID device replacement.
This could cause confusion/concern during automated recovery, because the
user sees the failure messages but no other messages indicating correction.

12 years agoFix a bad return code in 'lvconvert_raid'
Jonathan Earl Brassow [Wed, 22 Feb 2012 15:20:50 +0000 (15:20 +0000)]
Fix a bad return code in 'lvconvert_raid'

Functions at this level do return 0 or 1, not ECMD_* values.

12 years agoTweak lvmetad a bit more:
Petr Rockai [Tue, 21 Feb 2012 09:19:08 +0000 (09:19 +0000)]
Tweak lvmetad a bit more:
- allow at most one PV on any given device
- allow PV lookup by device
- merge the pvmeta info into VG metadata when responding to vg_lookup

12 years agopost-release
Alasdair Kergon [Mon, 20 Feb 2012 21:11:06 +0000 (21:11 +0000)]
post-release

12 years agoCall built-in blkid conditionaly (udev version >= 176), call standard blkid
Peter Rajnoha [Mon, 20 Feb 2012 19:38:40 +0000 (19:38 +0000)]
Call built-in blkid conditionaly (udev version >= 176), call standard blkid
with full path otherwise.

12 years agopre-release
Alasdair Kergon [Mon, 20 Feb 2012 19:38:19 +0000 (19:38 +0000)]
pre-release

12 years agoCheck whether udev supports built-in blkid.
Peter Rajnoha [Mon, 20 Feb 2012 19:36:27 +0000 (19:36 +0000)]
Check whether udev supports built-in blkid.

Built-in blkid is supported since udev v176 - set the UDEV_HAS_BUILTIN_BLKID
variable appropriately so we can use it in the rules to call the built-in
blkid conditionaly.

12 years agoSwitch to using built-in blkid in 13-dm-disk.rules.
Peter Rajnoha [Thu, 16 Feb 2012 14:39:02 +0000 (14:39 +0000)]
Switch to using built-in blkid in 13-dm-disk.rules.

Available in udev since version 176.

12 years agoDrop the now-redundant pvid_to_status hash.
Petr Rockai [Wed, 15 Feb 2012 17:37:09 +0000 (17:37 +0000)]
Drop the now-redundant pvid_to_status hash.

12 years agoUpdate lvmetad: use device major/minor pair to track devices. Keep a pvmeta
Petr Rockai [Wed, 15 Feb 2012 17:30:07 +0000 (17:30 +0000)]
Update lvmetad: use device major/minor pair to track devices. Keep a pvmeta
config tree per PV which is mostly provided by the client, so it can be used to
keep track of things like label_sector, PV format, mda count / offsets and so
on.

12 years agoInitialize dmeventd monitoring for every command
Zdenek Kabelac [Wed, 15 Feb 2012 15:18:43 +0000 (15:18 +0000)]
Initialize dmeventd monitoring for every command

Read lvm.conf setting for monitoring for each command. So we should not
activate monitoring if the default compilation is set to monitor during
lvconvert commnads.

Patch also removes check for  clustered VG and allows to disable monitoring
for clustered VG with the assumption, the problem with monitoring and dmeventd
flag passing for INGNORE is already fixed.

12 years agotypo
Peter Rajnoha [Wed, 15 Feb 2012 15:10:31 +0000 (15:10 +0000)]
typo

12 years agoAdd watch rule to 13-dm-disk.rules.
Peter Rajnoha [Wed, 15 Feb 2012 14:50:33 +0000 (14:50 +0000)]
Add watch rule to 13-dm-disk.rules.

We don't have anything better yet...

The problems the watch rule caused when removing devices should be covered
now with the "retry remove" logic. It's also better to have this maintained
by us, rather than having this rule anywhere else without proper control.

12 years agoSimplify with dm_strdup
Zdenek Kabelac [Wed, 15 Feb 2012 14:27:53 +0000 (14:27 +0000)]
Simplify with dm_strdup

12 years agoRun tests with lvmetad if we have it.
Petr Rockai [Wed, 15 Feb 2012 14:24:31 +0000 (14:24 +0000)]
Run tests with lvmetad if we have it.

12 years agoFix segfault in dmsetup when using table specification with --table.
Peter Rajnoha [Wed, 15 Feb 2012 14:20:59 +0000 (14:20 +0000)]
Fix segfault in dmsetup when using table specification with --table.

Segfault introduced with the patch that added dm_free(_table) at the
end of dmsetup (in this release).

12 years ago(lvmetad) Remove unused variable.
Petr Rockai [Wed, 15 Feb 2012 14:15:50 +0000 (14:15 +0000)]
(lvmetad) Remove unused variable.

12 years agoIn lvmetad, also nuke VGs when all their PVs are stolen by another VG (vgmerge
Petr Rockai [Wed, 15 Feb 2012 14:06:48 +0000 (14:06 +0000)]
In lvmetad, also nuke VGs when all their PVs are stolen by another VG (vgmerge
& vgsplit do this).

12 years agoDetect failing fifo
Zdenek Kabelac [Wed, 15 Feb 2012 13:56:47 +0000 (13:56 +0000)]
Detect failing fifo

If the fifo died because of dmeventd restart - do not wait for 20s
in select  - it will not get better and return error immediately.

12 years agoDeal with slower test processing
Zdenek Kabelac [Wed, 15 Feb 2012 13:51:17 +0000 (13:51 +0000)]
Deal with slower test processing

If the merge was faster then query - deal with it and pass the test.

12 years agoInitialize monitoring support only for thin pools
Zdenek Kabelac [Wed, 15 Feb 2012 13:49:51 +0000 (13:49 +0000)]
Initialize monitoring support only for thin pools

12 years agoUpdate cut&paste error message
Zdenek Kabelac [Wed, 15 Feb 2012 13:46:54 +0000 (13:46 +0000)]
Update cut&paste error message

12 years agoTurn a warning to an error in vgreduce --removemissing, since we exit with a
Petr Rockai [Wed, 15 Feb 2012 12:30:46 +0000 (12:30 +0000)]
Turn a warning to an error in vgreduce --removemissing, since we exit with a
failure status there.

12 years agoAdd dmsetup manpage entries for mangle command and --manglename option.
Peter Rajnoha [Wed, 15 Feb 2012 12:25:23 +0000 (12:25 +0000)]
Add dmsetup manpage entries for mangle command and --manglename option.

12 years agoAdd DM_DEFAULT_NAME_MANGLING_MODE env. variable to override configured value.
Peter Rajnoha [Wed, 15 Feb 2012 12:23:15 +0000 (12:23 +0000)]
Add DM_DEFAULT_NAME_MANGLING_MODE env. variable to override configured value.

Just in case of emergency when name mangling code causes any problems so
we can override the default value and switch off the mangling globally.

12 years agoReplace any '\' char with '\\' in table specification on input.
Peter Rajnoha [Wed, 15 Feb 2012 12:17:34 +0000 (12:17 +0000)]
Replace any '\' char with '\\' in table specification on input.

Device-mapper in kernel uses '\' as escape character so it's better
to double it to avoid any confusion when using existing device names
with '\' in the table specification.

For example:

dmsetup create x --table "0 8 linear /dev/mapper/a\x20b 0"

should pass just fine now without a need to explicitly escape the '\' char
like this:

dmsetup create x --table "0 8 linear /dev/mapper/a\\x20b 0"

12 years agoAdd mangle command to dmsetup to provide renaming to correct mangled form.
Peter Rajnoha [Wed, 15 Feb 2012 12:08:57 +0000 (12:08 +0000)]
Add mangle command to dmsetup to provide renaming to correct mangled form.

12 years agoAdd 'mangled_name' and 'unmangled_name' fields to dmsetup info -c -o.
Peter Rajnoha [Wed, 15 Feb 2012 12:06:17 +0000 (12:06 +0000)]
Add 'mangled_name' and 'unmangled_name' fields to dmsetup info -c -o.

12 years agoAdd --manglename option to dmsetup to select the name mangling mode.
Peter Rajnoha [Wed, 15 Feb 2012 12:02:58 +0000 (12:02 +0000)]
Add --manglename option to dmsetup to select the name mangling mode.

12 years agoUnamngle dm device name list automatically on ioctl return.
Peter Rajnoha [Wed, 15 Feb 2012 12:01:28 +0000 (12:01 +0000)]
Unamngle dm device name list automatically on ioctl return.

If dm_task_get_name or dm_task_get_names gets called, these will return
unmangled form of the names so the name mangling stays totally transparent
to any libdevmapper user (unless DM_STRING_MANGLING_NONE is used in which
case the name is not touched and it is is returned as it is in kernel).

For example:

dmsetup create "a b" - will create a\x20b device in kernel and so udev will
create /dev/mapper/a\x20b

dm_task_get_name/names will still return "a b"

In AUTO mode, the libdevmapper user can still query the device by using
the mangled ("a\x20b") or unmangled form of the name when calling dm_task_set_name.
If mangled name is provided, it's detected and the name is kept as it is.
If unmangled name is provided, it will be mangled. IOW in AUTO mode it's
totally transparent and it should not require any changes in the code
using libdevmapper.

However, any libdevmapper user must be aware of the fact that the mangled form
of the name appears in /dev/mapper (udev just can't deal with those blacklisted
characters).

12 years agolvmetad server-side update:
Petr Rockai [Wed, 15 Feb 2012 11:43:06 +0000 (11:43 +0000)]
lvmetad server-side update:
- rename the hashes to be explicit about the mapping
- add VG/PV listing calls to the protocol
- cache slightly more of the per-PV state
- filter cached metadata
- compare the metadata upon metadata_update

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