1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00
Commit Graph

3658 Commits

Author SHA1 Message Date
Christine Caulfield
cecc0e9dc8 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.
2009-08-05 14:18:35 +00:00
Peter Rajnoha
4d4d7c1fb3 Forgotten '%s' in one of _mk_link warning messages. 2009-08-05 09:12:44 +00:00
Alasdair Kergon
e50e7ee119 detect udev mk_link problems 2009-08-04 21:44:20 +00:00
snitzer
0d15d01b45 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
2009-08-04 16:02:39 +00:00
Peter Rajnoha
7972728e7c Add --noudevsync option for relevant LVM tools. 2009-08-04 15:55:43 +00:00
Peter Rajnoha
d4d430ee80 Add --noudevsync option for relevant LVM tools. 2009-08-04 15:53:04 +00:00
Alasdair Kergon
b2155fde1a Add activation/udev_sync to lvm.conf. 2009-08-04 15:36:13 +00:00
Peter Rajnoha
0033b9eeb5 '--noudevsync' -- update relevant man pages 2009-08-04 08:09:52 +00:00
Peter Rajnoha
3d25b06fbc Fix a typo in udev rule (splitname, NOT namesplit) 2009-08-04 08:05:06 +00:00
Alasdair Kergon
32752bc3dd Add default udev rules.
Update dm-ioctl.h comments.
2009-08-03 18:44:54 +00:00
Alasdair Kergon
f1fd43b61c Add udev checks. 2009-08-03 18:33:08 +00:00
Alasdair Kergon
38fda754a1 Add warnings to check udev did what it was meant to. 2009-08-03 18:31:53 +00:00
Alasdair Kergon
dc4e40a2f6 Only create LV symlinks on ACTIVATE not PRELOAD.
(This is the udev behaviour - but does this change break anything?)
2009-08-03 18:09:25 +00:00
Alasdair Kergon
9abda62c5b Manage without dm_udev_cleanup? 2009-08-03 18:01:45 +00:00
Dave Wysochanski
cd5c37fe1c Move FIXME from user visible lvm2app.h to lvm_vg.c
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-08-03 12:11:45 +00:00
Alasdair Kergon
bce8cac1f4 cleanup some ignored return values & 'stack's 2009-08-03 11:20:15 +00:00
Alasdair Kergon
4171d0c301 deal with error-related FIXMEs 2009-08-03 11:01:26 +00:00
Alasdair Kergon
2edd956853 lvchange --noudevsync 2009-08-03 10:58:40 +00:00
Petr Rockai
d77b03d6c9 Make lvconvert honour log mirror options combined with downconversion.
(RHBZ 463272)
2009-08-02 21:59:21 +00:00
Petr Rockai
4d5a88661f Slightly refactor mirror log conversions in lvconvert. 2009-08-02 21:56:29 +00:00
Petr Rockai
0b9b1ccd0b Add test for RHBZ 481793 (passing, thanks to vg_read changes checked in
previously).
2009-08-02 21:45:45 +00:00
Petr Rockai
d5ef8e037d Allow LV suspend while --ignorelockingfailure is in force. 2009-08-02 21:03:09 +00:00
Petr Rockai
fd09a32d5e Update synopsis in lvconvert manpage to mention --repair. 2009-08-02 21:01:51 +00:00
snitzer
afc5de69d4 Fix error handling of device-related stat() calls to be ENOENT aware.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2009-08-01 17:14:52 +00:00
snitzer
2adec6ef66 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>
2009-08-01 17:11:02 +00:00
snitzer
5829d87313 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>
2009-08-01 17:09:48 +00:00
snitzer
4422423315 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>
2009-08-01 17:08:43 +00:00
snitzer
6c88b6c660 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>
2009-08-01 17:07:36 +00:00
Alasdair Kergon
ccca1401ae dummy makefile for now to keep builds happy 2009-07-31 18:41:19 +00:00
Alasdair Kergon
39270f9647 Set cookies in activation code and wait for udev to complete processing. 2009-07-31 18:30:31 +00:00
Alasdair Kergon
3b6a147653 Add udevcomplete and --noudevwait to dmsetup. 2009-07-31 17:51:45 +00:00
Alasdair Kergon
fd69075a8b another fixme 2009-07-31 16:57:06 +00:00
Alasdair Kergon
dfed228991 Add libdevmapper functions to support synchronisation with udev. 2009-07-31 15:53:11 +00:00
snitzer
5403c6122c Fix compile warnings from recently added log_very_verbose() in _text_pv_write() 2009-07-31 14:23:06 +00:00
Alasdair Kergon
ec76533493 configure --udevdir 2009-07-31 13:31:53 +00:00
Alasdair Kergon
fbdc356b7c add not-yet-working udev options 2009-07-31 11:51:23 +00:00
Alasdair Kergon
709e1afd31 Prepare for udev synchronisation code. (options don't work yet) 2009-07-31 11:49:53 +00:00
snitzer
217bbd0dcb 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.
2009-07-30 21:15:17 +00:00
snitzer
e32f9edc3d 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.
2009-07-30 18:40:22 +00:00
snitzer
282029eb45 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>
2009-07-30 17:45:28 +00:00
snitzer
0ae88174b8 Preserve pe_start in .pv_setup and .pv_write if pe_start was supplied.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2009-07-30 17:42:33 +00:00
snitzer
42fdc445d0 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>
2009-07-30 17:41:01 +00:00
snitzer
48416fcdc1 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>
2009-07-30 17:19:31 +00:00
snitzer
5dab79f1c7 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>
2009-07-30 17:18:03 +00:00
Christine Caulfield
cfe2d71862 Document the -I option to clvmd 2009-07-30 13:32:38 +00:00
Alasdair Kergon
db03ac1596 corosync not cman... 2009-07-30 12:31:45 +00:00
Alasdair Kergon
36a1405360 Fix configure script to handle multiple clvmd selections. 2009-07-30 12:25:42 +00:00
Alasdair Kergon
85d1fe36e1 Fix lvm2app.pc installation filename. 2009-07-29 19:24:11 +00:00
Dave Wysochanski
0148ff5ea2 Don't include lvm-version.h in exported liblvm file!
Move include of lvm-version.h into lvm_base.c where it belongs.
2009-07-29 18:38:27 +00:00
Dave Wysochanski
89f096d68e Remove unneeded struct on return from lvm_lv_create_linear.
Results in compile warning.
2009-07-29 16:47:53 +00:00