Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=359291b41cdeb1ca…
Commit: 359291b41cdeb1ca886e018aa44c67882da10252
Parent: 3c818c89467f9b54bc94d9919a127dd912d96c24
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Dec 18 12:00:02 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Dec 18 12:23:59 2013 +0100
systemd: use only major:minor for pvscan in lvm2-pvscan@.service
When using filters for the pvscan --cache (the global_filter),
there's a difference between:
pvscan --cache -aay /dev/block/<major>:<minor>
and
pvscan --cache -aay <major>:<minor> (or --major <major> --minor <minor>)
In the first case, we need to be sure to have an exact matching line
in the filter for the device to be used, no aliases are considered
So for example even if we have accept rule for "/dev/sda" present,
this won't apply for "/dev/block/8:0" even though it's the same device!
This is because we're comparing the path used on command line directly
with the path written in the rule.
For the second one, any alias mentioned in the filter will apply
as we're comparing the major and minor pair, not looking at actual
device names - so any alias mentioned in the rules will suffice for
the filtering rule to apply.
For the global_filter to be properly used, we need to call the
second one in the lvm2-pvscan@.service - nobody is able to tell
what value of major:minor the kernel assignes next time, hence
this bug makes the use of global_filter quite unusable!
---
WHATS_NEW | 1 +
scripts/lvm2_pvscan_systemd_red_hat@.service.in | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index fe8f1ea..1dac25e 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Use major:minor in lvm2-pvscan@.service for proper global_filter application.
Syntax and spelling fixes in some man pages.
Dependency scan counts with snapshots and external origins.
Make sure VG extent size is always greater or equal to PV phys. block size.
diff --git a/scripts/lvm2_pvscan_systemd_red_hat@.service.in b/scripts/lvm2_pvscan_systemd_red_hat@.service.in
index 6b21c75..cdbbe40 100644
--- a/scripts/lvm2_pvscan_systemd_red_hat@.service.in
+++ b/scripts/lvm2_pvscan_systemd_red_hat@.service.in
@@ -11,5 +11,5 @@ Conflicts=shutdown.target
[Service]
Type=oneshot
RemainAfterExit=yes
-ExecStart=@sbindir@/pvscan --cache --activate ay /dev/block/%i
+ExecStart=@sbindir@/pvscan --cache --activate ay %i
ExecStop=@sbindir@/pvscan --cache %i
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3c818c89467f9b54…
Commit: 3c818c89467f9b54bc94d9919a127dd912d96c24
Parent: 434d95cef31c4d95b6468e02397e1fedbdca9928
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Dec 18 10:52:09 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Dec 18 10:52:09 2013 +0100
device: if BLKPBSZGET is unavailable, enforce 512
If there is no define for BLKPBSZGET - we have hard time how to
decrypt physical block size - we can't use here block_size,
since this is usually 4k while we need to use 512b.
FIXME: find some better way, until that enforce value 512.
Eventually we could also try to put in:
+#ifndef BLKPBSZGET
+# define BLKPBSZGET _IO(0x12,123)
+#endif
but this will still not work well on old kernels.
---
lib/device/dev-io.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/device/dev-io.c b/lib/device/dev-io.c
index 766d9af..1bfac1d 100644
--- a/lib/device/dev-io.c
+++ b/lib/device/dev-io.c
@@ -157,7 +157,8 @@ int dev_get_block_size(struct device *dev, unsigned int *physical_block_size, un
}
#else
/* if we can't get physical block size, just use logical block size instead */
- dev->phys_block_size = dev->block_size;
+ // FIXME block_size is typically 4096b while phys_block_size is 512b
+ dev->phys_block_size = 512;// dev->block_size;
log_debug_devs("%s: physical block size can't be determined, using logical "
"block size of %u bytes instead", name, dev->phys_block_size);
#endif
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3776832499862ce6…
Commit: 3776832499862ce6896b598487e79b02e7432326
Parent: c3d82d717ccd4d4801f5d84787bb12e0189eb1af
Author: Ville Skyttä <ville.skytta(a)iki.fi>
AuthorDate: Tue Dec 17 20:26:10 2013 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Dec 18 09:03:42 2013 +0100
man: syntax and spelling fixes.
---
WHATS_NEW | 1 +
man/dmsetup.8.in | 2 +-
man/lvconvert.8.in | 2 +-
man/lvm.8.in | 4 ++--
man/lvreduce.8.in | 2 +-
man/lvresize.8.in | 2 +-
man/pvmove.8.in | 2 +-
7 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index a7522f9..fe8f1ea 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Syntax and spelling fixes in some man pages.
Dependency scan counts with snapshots and external origins.
Make sure VG extent size is always greater or equal to PV phys. block size.
Optimize double call of stat() for cached devices.
diff --git a/man/dmsetup.8.in b/man/dmsetup.8.in
index 93621a5..599c843 100644
--- a/man/dmsetup.8.in
+++ b/man/dmsetup.8.in
@@ -484,7 +484,7 @@ Default subsystem is LVM.
.B status
.RB [ \-\-target
.IR target_type ]
-.RB [ \-\-\noflush ]
+.RB [ \-\-noflush ]
.RI [ device_name ]
.br
Outputs status information for each of the device's targets.
diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in
index 44b89af..c8cb2dc 100644
--- a/man/lvconvert.8.in
+++ b/man/lvconvert.8.in
@@ -203,7 +203,7 @@ a mirror logical volume.
.B \-\-trackchanges
Used with \fB\-\-splitmirrors\fP on a raid1 device, this tracks changes so
that the read-only detached image can be merged efficiently back into
-the mirror later. Only the regions of the detatched device where
+the mirror later. Only the regions of the detached device where
the data changed get resynchronized.
Please note that this feature is only supported with the new md-based mirror
diff --git a/man/lvm.8.in b/man/lvm.8.in
index 13e66d0..d78281a 100644
--- a/man/lvm.8.in
+++ b/man/lvm.8.in
@@ -21,7 +21,7 @@ that command.
On invocation, \fBlvm\fP requires that only the standard file descriptors
stdin, stdout and stderr are available. If others are found, they
get closed and messages are issued warning about the leak.
-This warning can be suppressed by setting enviromental variable
+This warning can be suppressed by setting the environment variable
.B LVM_SUPPRESS_FD_WARNINGS\fP.
.LP
Where commands take VG or LV names as arguments, the full path name is
@@ -46,7 +46,7 @@ being created in the filesystem for them.
\fBdumpconfig\fP \(em Display the configuration information after
loading \fBlvm.conf\fP(5) and any other configuration files.
.TP
-\fBdevtypes\fP \(dm Display the recognised built-in block device types.
+\fBdevtypes\fP \(em Display the recognised built-in block device types.
.TP
\fBformats\fP \(em Display recognised metadata formats.
.TP
diff --git a/man/lvreduce.8.in b/man/lvreduce.8.in
index dabdc88..2c38f5b 100644
--- a/man/lvreduce.8.in
+++ b/man/lvreduce.8.in
@@ -57,7 +57,7 @@ size of the Logical Volume with the suffix \fI%LV\fP, as a percentage of the
remaining free space in the Volume Group with the suffix \fI%FREE\fP, or (for
a snapshot) as a percentage of the total space in the Origin Logical
Volume with the suffix \fI%ORIGIN\fP.
-The resulting value for the substraction is rounded downward, for the absolute
+The resulting value for the subtraction is rounded downward, for the absolute
size it is rounded upward.
.TP
.IR \fB\-L ", " \fB\-\-size " [" \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]
diff --git a/man/lvresize.8.in b/man/lvresize.8.in
index e04869d..3606762 100644
--- a/man/lvresize.8.in
+++ b/man/lvresize.8.in
@@ -56,7 +56,7 @@ the remaining free space of the PhysicalVolumes on the command line with the
suffix \fI%PVS\fP, as a percentage of the remaining free space in the
Volume Group with the suffix \fI%FREE\fP, or (for a snapshot) as a percentage
of the total space in the Origin Logical Volume with the suffix \fI%ORIGIN\fP.
-The resulting value is rounded downward for the substraction otherwise
+The resulting value is rounded downward for the subtraction otherwise
it is rounded upward.
.TP
.IR \fB\-L ", " \fB\-\-size " [" + | - ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]
diff --git a/man/pvmove.8.in b/man/pvmove.8.in
index c77dcbc..bb69547 100644
--- a/man/pvmove.8.in
+++ b/man/pvmove.8.in
@@ -131,7 +131,7 @@ also refers to 1000 Physical Extents starting from Physical Extent number 1000.
(Counting starts from 0, so this refers to the 1001st to the 2000th inclusive.)
.P
To move a range of Physical Extents to a specific location (which must have
-sufficent free extents) use the form:
+sufficient free extents) use the form:
.sp
.B pvmove /dev/sdb1:1000-1999 /dev/sdc1
.sp
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c3d82d717ccd4d48…
Commit: c3d82d717ccd4d4801f5d84787bb12e0189eb1af
Parent: 3652083f38ca21276c8467f54eeaa8f1365ec6fe
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Dec 17 15:17:44 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Dec 17 15:21:28 2013 +0100
Revert "tree_action: destroy devices from failing activation"
This reverts commit 24639be558a9d4561a34f2b76485b227aed8e9c3.
Ok - seems we could be here a bit too active - and we
may remove devices which are unsuable for reasons we are not
aware of - thus taking down whole device could be way to big hammer.
So we still need some solution to recover from failing preload
and activation - but it needs more tunning.
---
WHATS_NEW | 1 -
lib/activate/dev_manager.c | 10 ++--------
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 59820b2..a7522f9 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,6 +1,5 @@
Version 2.02.105 -
=====================================
- Try to remove any unusable devices from dm table when activation fails.
Dependency scan counts with snapshots and external origins.
Make sure VG extent size is always greater or equal to PV phys. block size.
Optimize double call of stat() for cached devices.
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index a4147d3..7b0b6e2 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -2754,21 +2754,15 @@ static int _tree_action(struct dev_manager *dm, struct logical_volume *lv,
goto_out;
/* Preload any devices required before any suspensions */
- if (!dm_tree_preload_children(root, dlid, DLID_SIZE)) {
- bad:
- if (!dm_tree_deactivate_children(root, dlid, DLID_SIZE))
- stack;
- if (!_remove_lv_symlinks(dm, root))
- log_warn("Failed to remove all device symlinks associated with %s.", lv->name);
+ if (!dm_tree_preload_children(root, dlid, DLID_SIZE))
goto_out;
- }
if (dm_tree_node_size_changed(root))
dm->flush_required = 1;
if (action == ACTIVATE) {
if (!dm_tree_activate_children(root, dlid, DLID_SIZE))
- goto_bad;
+ goto_out;
if (!_create_lv_symlinks(dm, root))
log_warn("Failed to create symlinks for %s.", lv->name);
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=24639be558a9d456…
Commit: 24639be558a9d4561a34f2b76485b227aed8e9c3
Parent: 94137b72edf232a0e82758c1669f1f60f2df3c50
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Dec 17 13:49:03 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Dec 17 14:08:54 2013 +0100
tree_action: destroy devices from failing activation
When activation fails - we may leak large tree of partially loaded
devices in the dm table (i.e. failure in snapshot activation)
The best we can do here is try to deactivate whole device and
remove as much inactive table entries as we can.
---
WHATS_NEW | 1 +
lib/activate/dev_manager.c | 10 ++++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index a7522f9..59820b2 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Try to remove any unusable devices from dm table when activation fails.
Dependency scan counts with snapshots and external origins.
Make sure VG extent size is always greater or equal to PV phys. block size.
Optimize double call of stat() for cached devices.
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index 7b0b6e2..a4147d3 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -2754,15 +2754,21 @@ static int _tree_action(struct dev_manager *dm, struct logical_volume *lv,
goto_out;
/* Preload any devices required before any suspensions */
- if (!dm_tree_preload_children(root, dlid, DLID_SIZE))
+ if (!dm_tree_preload_children(root, dlid, DLID_SIZE)) {
+ bad:
+ if (!dm_tree_deactivate_children(root, dlid, DLID_SIZE))
+ stack;
+ if (!_remove_lv_symlinks(dm, root))
+ log_warn("Failed to remove all device symlinks associated with %s.", lv->name);
goto_out;
+ }
if (dm_tree_node_size_changed(root))
dm->flush_required = 1;
if (action == ACTIVATE) {
if (!dm_tree_activate_children(root, dlid, DLID_SIZE))
- goto_out;
+ goto_bad;
if (!_create_lv_symlinks(dm, root))
log_warn("Failed to create symlinks for %s.", lv->name);
}