]> sourceware.org Git - lvm2.git/log
lvm2.git
12 years agoFix missing dmt destructor
Zdenek Kabelac [Wed, 25 Jan 2012 22:16:04 +0000 (22:16 +0000)]
Fix missing dmt destructor

Also always initialize maj,min,patchlevel when success is returned.

12 years agoFree allocated segment type in error path
Zdenek Kabelac [Wed, 25 Jan 2012 21:54:00 +0000 (21:54 +0000)]
Free allocated segment type in error path

12 years agoLimit alignment to 32bit values
Zdenek Kabelac [Wed, 25 Jan 2012 21:52:53 +0000 (21:52 +0000)]
Limit alignment to 32bit values

to get the same behavior on 32/64 machines.

12 years agoEnsure whole info is initialised
Zdenek Kabelac [Wed, 25 Jan 2012 21:50:50 +0000 (21:50 +0000)]
Ensure whole info is initialised

Since _create_dm_tree_node is copying whole structure,
make sure all members are initialized.

12 years agoFix resource leak of file handle
Zdenek Kabelac [Wed, 25 Jan 2012 21:47:18 +0000 (21:47 +0000)]
Fix resource leak of file handle

Introduces when added dm_device_get_name.
Close file handle in all error paths.

12 years agoCheck for correctness of uint64 value if exists
Zdenek Kabelac [Wed, 25 Jan 2012 21:43:51 +0000 (21:43 +0000)]
Check for correctness of uint64 value if exists

12 years agoAdd breaks for cases
Zdenek Kabelac [Wed, 25 Jan 2012 21:42:09 +0000 (21:42 +0000)]
Add breaks for cases

12 years agoEnsure reply struct has all fields defined
Zdenek Kabelac [Wed, 25 Jan 2012 21:31:59 +0000 (21:31 +0000)]
Ensure reply struct has all fields defined

Reply is returned by value.

12 years agoCheck and print perror for syscalls
Zdenek Kabelac [Wed, 25 Jan 2012 21:30:27 +0000 (21:30 +0000)]
Check and print perror for syscalls

12 years ago& -> &&
Alasdair Kergon [Wed, 25 Jan 2012 17:14:56 +0000 (17:14 +0000)]
& -> &&

12 years agoFix compilation with disabled devmapper
Zdenek Kabelac [Wed, 25 Jan 2012 13:12:59 +0000 (13:12 +0000)]
Fix compilation with disabled devmapper

During release preparation things has changed, so making sure
we are compilable with --disable-devmapper.

12 years agoThin read percent info from layered device
Zdenek Kabelac [Wed, 25 Jan 2012 13:11:52 +0000 (13:11 +0000)]
Thin read  percent info from layered device

Since we only need layered device - check for tpool device presence,
so user doesn't need to activate thin pool explicitely for percent info.

12 years agoRename origin_only to more generic use_layer flag
Zdenek Kabelac [Wed, 25 Jan 2012 13:10:26 +0000 (13:10 +0000)]
Rename  origin_only to more generic use_layer flag

Since now we have more layered devices i.e. thin volumes - support
selection of layer via flag.

12 years agoClean var declarations to the front of the function
Zdenek Kabelac [Wed, 25 Jan 2012 13:06:57 +0000 (13:06 +0000)]
Clean var declarations to the front of the function

12 years agoUpdate verbose lvs to print metadata_percent info
Zdenek Kabelac [Wed, 25 Jan 2012 11:32:41 +0000 (11:32 +0000)]
Update verbose lvs  to print metadata_percent info

Update lvs  -o fields in WHATS_NEW.

12 years agoThin clear stacked message for thin pool
Zdenek Kabelac [Wed, 25 Jan 2012 11:27:42 +0000 (11:27 +0000)]
Thin clear stacked message for thin pool

Before removing thin pool LV always make sure, stacked message
for previous run are cleared - but allow to remove any
device that should have been created
(i.e. creation of snapshot failed - so the message for snapshot creation
may be replaced with delete message within unfinished transaction).

Also commit messages after lv remove - so free space is released in pool.

12 years agoMake commented out code more obvious
Alasdair Kergon [Wed, 25 Jan 2012 11:10:06 +0000 (11:10 +0000)]
Make commented out code more obvious

12 years agoThin skip activation when there are no thin message
Zdenek Kabelac [Wed, 25 Jan 2012 09:17:15 +0000 (09:17 +0000)]
Thin skip activation when there are no thin message

If the list with thin messages is empty, do not touch thin pool device.

12 years agoThin correct activation order
Zdenek Kabelac [Wed, 25 Jan 2012 09:15:44 +0000 (09:15 +0000)]
Thin correct activation order

When the message is passed only in resume path the order needs
to be corrected.

12 years agoThin use suspend/resume_lv_origin
Zdenek Kabelac [Wed, 25 Jan 2012 09:14:25 +0000 (09:14 +0000)]
Thin use  suspend/resume_lv_origin

Use origin_only support for thin volume when thin snapshot is created.

12 years agoThin use origin_only for thin pools as well
Zdenek Kabelac [Wed, 25 Jan 2012 09:13:10 +0000 (09:13 +0000)]
Thin use origin_only for thin pools as well

Extend the usage of origin_only flag to allow resume of thin pool LV
(when it's active) to pass only the messages.

origin_only flag will skip detection of already resumed tree for thin_pool,
so we do not need to suspend the tree and we just send messages.

12 years agoThin add support for origin_only suspend of thin volumes
Zdenek Kabelac [Wed, 25 Jan 2012 09:10:13 +0000 (09:10 +0000)]
Thin add support for origin_only suspend of thin volumes

Pass in the origin_only flag also for thin volumes - but curently the flag
is not used to its best.

FIXME: achieve the state where only  thin volume snapshot origin is
suspended without its childrens -  let's explore whether this may
happen automatically inside libdm (might be generic for other targets).
So the code would not need to annotate the node for this.

12 years agoThin add messages only for activation tree
Zdenek Kabelac [Wed, 25 Jan 2012 09:06:43 +0000 (09:06 +0000)]
Thin add messages only for activation tree

Extend lv_activate_opts with bool flag to know for which purpose
dtree is created - and add message only for activation tree
(since that's the only place that may send them).

Extend validation check for thin snapshot creation and test whether
active snapshot origin is suspended before its snapshot is created
(useful in recover scenarios) -  in this case also detect, whether
transaction has been already completed and avoid such suspend check
failure in that case.

12 years agoThin check for lv_thin_pool_percent error status
Zdenek Kabelac [Wed, 25 Jan 2012 09:02:35 +0000 (09:02 +0000)]
Thin check for lv_thin_pool_percent error status

Check has been missing.

12 years agoUpdate lv_info whats_new
Zdenek Kabelac [Wed, 25 Jan 2012 09:00:57 +0000 (09:00 +0000)]
Update lv_info whats_new

12 years agolv_info using -real layer only for origin_only LV
Zdenek Kabelac [Wed, 25 Jan 2012 09:00:18 +0000 (09:00 +0000)]
lv_info using -real layer only for origin_only LV

If the origin_only flag is passed for non lv_is_origin LVs,
the extension is not added.

Thin volumes may also use origin_only flag.

12 years agoThin prevent removal of its data and metadata LVs
Zdenek Kabelac [Wed, 25 Jan 2012 08:57:25 +0000 (08:57 +0000)]
Thin prevent removal of its data and metadata LVs

LVs cannot be removed while there are linked to thin pool.
(Gives better error message, than validation).

12 years agoThin fix transaction_id incrementation and code refactoring
Zdenek Kabelac [Wed, 25 Jan 2012 08:55:19 +0000 (08:55 +0000)]
Thin fix transaction_id incrementation and code refactoring

Add pool_has_message and use it in attach_pool_message.
Also update header to make more obvious which segment type is
expected as parameter.
Rename  'read_only' to  'no_update' (no auto update transaction_id)
to better fit how it's used.
Fix problem when there was only one stacked message replaced with delete
message that caused unwanted transaction_id increase.

12 years agoComment cleanups
Zdenek Kabelac [Wed, 25 Jan 2012 08:51:29 +0000 (08:51 +0000)]
Comment cleanups

Move comment where it applies and remove unused attribe when the var
is actually used.

12 years agoThin dependency scan support
Zdenek Kabelac [Wed, 25 Jan 2012 08:50:10 +0000 (08:50 +0000)]
Thin dependency scan support

Go through pool_lv and metadata_lv LVs when doing recursive scan.

12 years agoThin add lv_thin_pool_transaction_id
Zdenek Kabelac [Wed, 25 Jan 2012 08:48:42 +0000 (08:48 +0000)]
Thin add lv_thin_pool_transaction_id

Easy function to get transaction_id status value.

12 years agoThin send messages on activation resume code path
Zdenek Kabelac [Wed, 25 Jan 2012 08:46:21 +0000 (08:46 +0000)]
Thin send messages on activation resume code path

Using PRELOAD part would lead to problems when the problem
would happen before vg_write and vg_commit.
Also this change is necessary for snapshot creation sequence.

12 years agoCaller is still entitled to reference an LV that's unlinked, so don't
Alasdair Kergon [Tue, 24 Jan 2012 14:53:59 +0000 (14:53 +0000)]
Caller is still entitled to reference an LV that's unlinked, so don't
tamper with struct contents.

12 years agoUse suspend|resume_origin_only when up-converting RAID LVs, as mirrors do.
Jonathan Earl Brassow [Tue, 24 Jan 2012 14:33:38 +0000 (14:33 +0000)]
Use suspend|resume_origin_only when up-converting RAID LVs, as mirrors do.

Failure to do so results in "Performing unsafe table load while X device(s) are
known to be suspended" errors.  While fixing the problem in this way works and
is consistent with the way the mirror segment type does it, it would be nice
to find a solution that uses the generic suspend/resume calls.

Also included in this check-in are additions to the test suite that perform
conversions on RAID LVs under a snapshot.  These tests are disabled for the
time being due to a kernel bug that is yet to be tracked down.

12 years agoProperly show LV removal message.
Milan Broz [Tue, 24 Jan 2012 14:15:52 +0000 (14:15 +0000)]
Properly show LV removal message.

(Fix regression in commit 6e181ba96dc1f806afc2d7fe825a8d3dd8093052)

12 years agoUse chunk_size consistently for thin_pool within LVM.
Alasdair Kergon [Tue, 24 Jan 2012 00:55:03 +0000 (00:55 +0000)]
Use chunk_size consistently for thin_pool within LVM.

12 years agoFix the way RAID meta LVs are added to the dependency tree.
Jonathan Earl Brassow [Mon, 23 Jan 2012 20:56:42 +0000 (20:56 +0000)]
Fix the way RAID meta LVs are added to the dependency tree.

Similar to the "mirror" segment type's log device, _add_dev_to_dtree should
be called and not _add_lv_to_dtree when adding metadata sub-LVs to the deptree.
Since _add_lv_to_dtree was being called, 'origin_only' could be set if a
snapshot sits on top of the RAID device.  This would cause the actual device
that needed to be added to be skipped in favor of the non-existant device,
"<foo>-real".

12 years agoFix metad help.
Alasdair Kergon [Mon, 23 Jan 2012 17:48:18 +0000 (17:48 +0000)]
Fix metad help.

12 years agoadd const
Alasdair Kergon [Mon, 23 Jan 2012 17:47:36 +0000 (17:47 +0000)]
add const

12 years agoReorder fns in libdm-deptree.
Alasdair Kergon [Mon, 23 Jan 2012 17:46:31 +0000 (17:46 +0000)]
Reorder fns in libdm-deptree.
Tweak dm_config interface and remove FIXMEs.

12 years agoAdd CLVMD_FLAG_REMOTE to skip processing on local node.
Alasdair Kergon [Sat, 21 Jan 2012 05:31:54 +0000 (05:31 +0000)]
Add CLVMD_FLAG_REMOTE to skip processing on local node.

12 years agoAttempt to improve clustered 'lvchange -aey' behaviour to try local node before
Alasdair Kergon [Sat, 21 Jan 2012 05:29:51 +0000 (05:29 +0000)]
Attempt to improve clustered 'lvchange -aey' behaviour to try local node before
remote nodes and address some existing anomalies.

12 years agoPrompt if request is made to remove a snapshot whose "Merge failed".
Mike Snitzer [Fri, 20 Jan 2012 22:04:16 +0000 (22:04 +0000)]
Prompt if request is made to remove a snapshot whose "Merge failed".

12 years agoAllow removal of an invalid snapshot that was to be merged on next activation.
Mike Snitzer [Fri, 20 Jan 2012 22:03:48 +0000 (22:03 +0000)]
Allow removal of an invalid snapshot that was to be merged on next activation.

Don't allow a user to merge an invalid snapshot.

12 years agoUse m and M lv_attr to indicate that a snapshot merge failed in lvs.
Mike Snitzer [Fri, 20 Jan 2012 22:03:03 +0000 (22:03 +0000)]
Use m and M lv_attr to indicate that a snapshot merge failed in lvs.

snapshot (m)erge failed, suspended snapshot (M)erge failed

12 years agoDifferentiate between snapshot status of "Invalid" and "Merge failed".
Mike Snitzer [Fri, 20 Jan 2012 22:02:04 +0000 (22:02 +0000)]
Differentiate between snapshot status of "Invalid" and "Merge failed".

12 years agoLookup snapshot usage percent of origin when a snapshot is merging.
Mike Snitzer [Fri, 20 Jan 2012 21:56:01 +0000 (21:56 +0000)]
Lookup snapshot usage percent of origin when a snapshot is merging.

12 years agoUpdate lvdisplay to show more info about thin LVs
Zdenek Kabelac [Fri, 20 Jan 2012 16:59:58 +0000 (16:59 +0000)]
Update lvdisplay to show more info about thin LVs

Reformat name and path how the LV is represented with lvm1 compatible option,
to switch to the old way - which had number of  problem - i.e. many links
do not exist - since for private devices we are not creating them.
Add more info about thin pools and volumes.

12 years agoMinor cleanup
Zdenek Kabelac [Fri, 20 Jan 2012 11:01:56 +0000 (11:01 +0000)]
Minor cleanup

Simplier and more readable char pointer math.

12 years agoThin until proper vgcfgrestore for thin is implementad, disable restore.
Zdenek Kabelac [Fri, 20 Jan 2012 11:01:13 +0000 (11:01 +0000)]
Thin until proper vgcfgrestore for thin is implementad, disable restore.

Since it may probably do more harm to leave it enabled - add extra test
for presence of thin volumes in VG, and in this case disable restore.

12 years agoThin forgotten initialisation of pointer to NULL
Zdenek Kabelac [Fri, 20 Jan 2012 10:59:26 +0000 (10:59 +0000)]
Thin forgotten initialisation of pointer to NULL

Since the code may go in error path, set to defined NULL.

12 years agoTiny cleanup
Zdenek Kabelac [Fri, 20 Jan 2012 10:58:17 +0000 (10:58 +0000)]
Tiny cleanup

Just remove double braces from conditions when they are not really needed.
(So it doesn't look like an assignment and comparison).

12 years agoThin cleanup
Zdenek Kabelac [Fri, 20 Jan 2012 10:56:30 +0000 (10:56 +0000)]
Thin cleanup

Reorder condition so the code is better readable (and shorter).

12 years agoDrop hack in segtype reporting
Zdenek Kabelac [Fri, 20 Jan 2012 10:55:28 +0000 (10:55 +0000)]
Drop hack in segtype reporting

Since striped name function knows when to report 'linear' instead of
'stripe' type name - drop it from this place.

This fixes problem when reporting segtype e.g. for thin-pool which
is also using area_count=1 to store thin data device reference.

It also returns properly strduped memory instead of badly casted const char*.

12 years agoThin extend lvcreate man page about snapshot support
Zdenek Kabelac [Fri, 20 Jan 2012 10:50:39 +0000 (10:50 +0000)]
Thin extend lvcreate man page about snapshot support

12 years ago.
Alasdair Kergon [Fri, 20 Jan 2012 03:56:18 +0000 (03:56 +0000)]
.

12 years agoimprove comment
Alasdair Kergon [Fri, 20 Jan 2012 03:46:52 +0000 (03:46 +0000)]
improve comment

12 years agoPreserve exclusive activation of cluster mirror when converting.
Jonathan Earl Brassow [Fri, 20 Jan 2012 00:27:18 +0000 (00:27 +0000)]
Preserve exclusive activation of cluster mirror when converting.

This patch to the suspend code - like the similar change for resume -
queries the lock mode of a cluster volume and records whether it is active
exclusively.  This is necessary for suspend due to the possibility of
preloading targets.  Failure to check to exclusivity causes the cluster target
of an exclusively activated mirror to be used when converting - rather than
the single machine target.

12 years agoDrop unimplemented
Zdenek Kabelac [Thu, 19 Jan 2012 16:22:42 +0000 (16:22 +0000)]
Drop unimplemented

12 years agoDrop unused variable
Zdenek Kabelac [Thu, 19 Jan 2012 15:59:51 +0000 (15:59 +0000)]
Drop unused variable

12 years agoThin indent update
Zdenek Kabelac [Thu, 19 Jan 2012 15:42:18 +0000 (15:42 +0000)]
Thin indent update

12 years agoThin disable snapshot creation when pool is over the threshold.
Zdenek Kabelac [Thu, 19 Jan 2012 15:39:41 +0000 (15:39 +0000)]
Thin disable snapshot creation when pool is over the threshold.

Since snapshot needs to suspend origin - it might lead to pool userspace
deadlock (as the pool will wait for new space in case it would be overfilled,
but dmeventd would not be able to resize it, as the lvcreate operation would
have kept the VG lock.)
To minimize the risk of such scenario - we prevent to create new snapshot
in case we are over the threshold - but beware, there is still small timewindow,
so keep threshold at some reasonable level!

12 years agoThin add new display field for lvs
Zdenek Kabelac [Thu, 19 Jan 2012 15:34:32 +0000 (15:34 +0000)]
Thin add new display field for  lvs

New field Data% is able to display info about
thin_pool, thin, snapshot and has generic meaning here.

Simple Time/Host field are here to display host and time creation.

12 years agoAdd support to keep info about creation time and host for each LV
Zdenek Kabelac [Thu, 19 Jan 2012 15:31:45 +0000 (15:31 +0000)]
Add support to keep info about creation time and host for each LV

Basic support to keep info when the LV was created.
Host and time is stored into LV mda section.

FIXME: Current version doesn't support configurable string via lvm.conf
and used fixed version strftime "%Y-%m-%d %T %z".

12 years agoThin add function to read thin volume percent
Zdenek Kabelac [Thu, 19 Jan 2012 15:27:54 +0000 (15:27 +0000)]
Thin add function to read thin volume percent

This value returns percentage of 'mapped' size compared with total LV size.
(Without passed seg pointer it return highest mapped size - but it's
not used yet.)

12 years agoThin updated support for thin pool percent
Zdenek Kabelac [Thu, 19 Jan 2012 15:25:37 +0000 (15:25 +0000)]
Thin updated support for thin pool percent

Support to check also for metadata percent
(By checking whether seg pointer is set)

12 years agoThin rename seg var pool_metadata_lv to metadata_lv
Zdenek Kabelac [Thu, 19 Jan 2012 15:23:50 +0000 (15:23 +0000)]
Thin rename seg var  pool_metadata_lv to metadata_lv

Better fits the code.

12 years agoThin handle empty thin volume case
Zdenek Kabelac [Thu, 19 Jan 2012 15:22:32 +0000 (15:22 +0000)]
Thin handle empty thin volume case

Report both values as 0 in case the volume is unused.

12 years agoThin use consistentely metadata
Zdenek Kabelac [Thu, 19 Jan 2012 15:21:23 +0000 (15:21 +0000)]
Thin use consistentely metadata

Do not shortcut to 'meta' and stay with 'metadata'
Also matches kernel doc for dm API then.

12 years agoThin rename local static
Zdenek Kabelac [Thu, 19 Jan 2012 15:19:18 +0000 (15:19 +0000)]
Thin rename local static

Use '_' for local const char.

12 years agoRename internal macro to match signess
Zdenek Kabelac [Thu, 19 Jan 2012 15:17:46 +0000 (15:17 +0000)]
Rename internal macro to match signess

Since _read_int64 called dm_config_get_uint64, rename it to
less confusing _read_uint64.

12 years agoUpdate for gcc old-style
Zdenek Kabelac [Thu, 19 Jan 2012 15:16:39 +0000 (15:16 +0000)]
Update for gcc old-style

12 years agoAdd dmsetup 'wipe_table' to replace table with one that uses error target.
Alasdair Kergon [Wed, 18 Jan 2012 18:52:02 +0000 (18:52 +0000)]
Add dmsetup 'wipe_table' to replace table with one that uses error target.

12 years agoMove dm_task_set_newname from libdm-iface.c to libdm-common.c
Peter Rajnoha [Tue, 17 Jan 2012 14:36:58 +0000 (14:36 +0000)]
Move dm_task_set_newname from libdm-iface.c to libdm-common.c

12 years agoBeef up the lvmetad code with more functionality and a bunch of bugfixes. There
Petr Rockai [Mon, 16 Jan 2012 08:25:32 +0000 (08:25 +0000)]
Beef up the lvmetad code with more functionality and a bunch of bugfixes. There
used to be a few mis-ordered memory accesses (release and access in the next
block). Fix that set_flag could have sometimes corrupted the flags being
modified.

A few issues with metadata tracking are sorted out as well now, and there are
only a few problems remaining before we can integrate lvmetad, mostly on the
client side:

- metadata areas need to be tracked in lvmetad (most likely to be addressed
  through an extension of metadata, meaning no special support in lvmetad would
  be needed)
- non-udev scanning code needs to be taught about telling lvmetad about device
  disappearance (pvscan most importantly)
- this last item also needs to mesh with metadata inconsistencies and
  suddenly-incomplete volume groups (aux disable_dev in tests); udev-based
  scanning should address this separately and more elegantly

12 years agoFix a boundary condition in read_buffer in daemon-shared.c.
Petr Rockai [Mon, 16 Jan 2012 05:09:16 +0000 (05:09 +0000)]
Fix a boundary condition in read_buffer in daemon-shared.c.

12 years agoFix prototypes for daemon_send_simple (const char).
Petr Rockai [Sun, 15 Jan 2012 15:16:50 +0000 (15:16 +0000)]
Fix prototypes for daemon_send_simple (const char).

12 years agoUnfortunately, blank lines are sometimes produced by config serializer, and
Petr Rockai [Sun, 15 Jan 2012 11:17:16 +0000 (11:17 +0000)]
Unfortunately, blank lines are sometimes produced by config serializer, and
this interferes with their role as message separator in the lvmetad
protocol. Switch to using "##" on an otherwise blank line as a separator.

12 years agoFix a couple of resource leaks in daemon-common server code -- filehandles and
Petr Rockai [Sun, 15 Jan 2012 10:33:41 +0000 (10:33 +0000)]
Fix a couple of resource leaks in daemon-common server code -- filehandles and
unjoined threads were leaked for each connection.

12 years agoMake error message hit when preallocated memlock memory exceeded clearer.
Alasdair Kergon [Thu, 12 Jan 2012 18:29:07 +0000 (18:29 +0000)]
Make error message hit when preallocated memlock memory exceeded clearer.

12 years agoShow read-only activation in display tools.
Alasdair Kergon [Thu, 12 Jan 2012 16:58:43 +0000 (16:58 +0000)]
Show read-only activation in display tools.

12 years agoMissing const.
Peter Rajnoha [Thu, 12 Jan 2012 09:08:55 +0000 (09:08 +0000)]
Missing const.

"warning: assignment discards 'const' qualifier..."

12 years agoAdd activation/read_only_volume_list to override LV permission in metadata.
Alasdair Kergon [Thu, 12 Jan 2012 02:32:09 +0000 (02:32 +0000)]
Add activation/read_only_volume_list to override LV permission in metadata.

12 years agoAdd activation/read_only_volume_list to override LV permission in metadata.
Alasdair Kergon [Thu, 12 Jan 2012 01:51:56 +0000 (01:51 +0000)]
Add activation/read_only_volume_list to override LV permission in metadata.

12 years agoGive priority to emcpower devices with duplicate PVIDs.
Alasdair Kergon [Wed, 11 Jan 2012 20:38:42 +0000 (20:38 +0000)]
Give priority to emcpower devices with duplicate PVIDs.

12 years agoSupport different device name types on output of dmsetup deps, ls and info -c command.
Peter Rajnoha [Wed, 11 Jan 2012 12:46:19 +0000 (12:46 +0000)]
Support different device name types on output of dmsetup deps, ls and info -c command.

Add 'blkdevname' and 'blkdevs_used' field to dmsetup info -c -o.
Add 'blkdevname' option to dmsetup ls --tree to see block device names.
Add '-o options' to dmsetup deps and ls to select device name type on output.

12 years agoAdd dm_device_get_name to get map name or block device name for given devno.
Peter Rajnoha [Wed, 11 Jan 2012 12:34:44 +0000 (12:34 +0000)]
Add dm_device_get_name to get map name or block device name for given devno.

This is accomplished by reading associated sysfs information. For a dm device,
this is /sys/dev/block/major:minor/dm/name (supported in kernel version >= 2.6.29,
for older kernels, the behaviour is the same as for non-dm devices).

For a non-dm device, this is a readlink on /sys/dev/block/major:minor, e.g.
  /sys/dev/block/253:0 --> ../../devices/virtual/block/dm-0.
The last component of the path is a proper kernel name (block device name).

One can request to read only kernel names by setting the 'prefer_kernel_name'
argument if needed.

12 years agoAdd dm_uuid_prefix/dm_set_uuid_prefix for non-lvm users to override hard-coded
Alasdair Kergon [Tue, 10 Jan 2012 02:03:31 +0000 (02:03 +0000)]
Add dm_uuid_prefix/dm_set_uuid_prefix for non-lvm users to override hard-coded
LVM- prefix.

Try harder not to leave stray empty devices around (locally or remotely) when
reverting changes after failures while there are inactive tables.

12 years agoCheck for error code in _adjust_policy_params
Zdenek Kabelac [Mon, 9 Jan 2012 12:31:52 +0000 (12:31 +0000)]
Check for error code in _adjust_policy_params

If error is detected in _adjust_policy_params, break further command processing.

12 years agoMinor oldstyle warning update
Zdenek Kabelac [Mon, 9 Jan 2012 12:29:15 +0000 (12:29 +0000)]
Minor oldstyle warning update

12 years agoImprove readahead in dmsetup man page
Zdenek Kabelac [Mon, 9 Jan 2012 12:28:47 +0000 (12:28 +0000)]
Improve readahead in dmsetup man page

12 years agoUse sysfs to set/get of read-ahead
Zdenek Kabelac [Mon, 9 Jan 2012 12:26:14 +0000 (12:26 +0000)]
Use sysfs to set/get of read-ahead

If we know major:minor number of device (which is known after resume) we will
try to use  sysfs to set/get read ahead parameters of device.
This avoid potential problem of blocking commands like 'dmsetup info' awaiting
for device being usable for open/close - i.e. overfilled thin pool may block
such command.

12 years agoSupport rounding of percentage upward
Zdenek Kabelac [Thu, 5 Jan 2012 15:38:18 +0000 (15:38 +0000)]
Support rounding of percentage upward

We want to keep this logic -
when LV is extend - extend the LV by at least given amount,
when LV is reduced - reduce the LV by at most given amount.

So for this the rounding needs to be used.
Current logic which seems to satisfy give rule is to round up all
extent values for LV resize upward except for values with '-' sign
that are round downward.

This patch also fixes the problem when  lvextend --use-polices tried
to extend LV the by i.e. 20% - but the resulting 20% were smaller
the extent size thus before this patch no extension happened.

12 years agoUse new dmeventd_lvm2_command function in dmeventd plugins.
Zdenek Kabelac [Thu, 22 Dec 2011 16:37:01 +0000 (16:37 +0000)]
Use new dmeventd_lvm2_command function in dmeventd plugins.

For snapshot, prepare whole command in front into private buffer.
Add also some missing '\n' for syslog messages.
For raid and mirror only convert creation of command line string.
This should avoid any unbound growth of mempool for dm_split_names.

12 years agoThin use helper function
Zdenek Kabelac [Thu, 22 Dec 2011 15:57:29 +0000 (15:57 +0000)]
Thin use helper function

Fix some minor outstading issue from thin plugin introduction -
Call dmeventd_lvm2_exit() in failpath for registration.
Add some missing '\n' in syslog messages.

12 years agoAdd helper function dmeventd_lvm2_command().
Zdenek Kabelac [Thu, 22 Dec 2011 15:55:21 +0000 (15:55 +0000)]
Add helper function dmeventd_lvm2_command().

Since this code is in all plugins - create a common helper function.

12 years agoUpdated documentation for dmeventd.
Zdenek Kabelac [Thu, 22 Dec 2011 15:50:38 +0000 (15:50 +0000)]
Updated documentation for dmeventd.

Update man page style.
Mention raid and thin plugins.
Update help text printed by command to match man page.

12 years agoThin man page update
Zdenek Kabelac [Wed, 21 Dec 2011 13:58:38 +0000 (13:58 +0000)]
Thin man page update

12 years agoThin update test case
Zdenek Kabelac [Wed, 21 Dec 2011 13:45:42 +0000 (13:45 +0000)]
Thin update test case

Use thin-pool instead of thin_pool type.

12 years agoExported functions from thin plugin
Zdenek Kabelac [Wed, 21 Dec 2011 13:42:07 +0000 (13:42 +0000)]
Exported functions from thin plugin

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