1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
Commit Graph

3860 Commits

Author SHA1 Message Date
Peter Rajnoha
1879e85672 Detect udev problems in _rename_dev_node. 2009-08-06 15:00:25 +00:00
Alasdair Kergon
fa5617d7f5 Additional logging 2009-08-05 19:50:08 +00:00
Christine Caulfield
ee1e49ec53 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
56aba8dc9d Forgotten '%s' in one of _mk_link warning messages. 2009-08-05 09:12:44 +00:00
Alasdair Kergon
a83b7adc28 detect udev mk_link problems 2009-08-04 21:44:20 +00:00
Mike Snitzer
61b61849eb 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
f3bc056a44 Add --noudevsync option for relevant LVM tools. 2009-08-04 15:55:43 +00:00
Peter Rajnoha
49886d0982 Add --noudevsync option for relevant LVM tools. 2009-08-04 15:53:04 +00:00
Alasdair Kergon
cf8235e0aa Add activation/udev_sync to lvm.conf. 2009-08-04 15:36:13 +00:00
Peter Rajnoha
c48b10050a '--noudevsync' -- update relevant man pages 2009-08-04 08:09:52 +00:00
Peter Rajnoha
83a3c60506 Fix a typo in udev rule (splitname, NOT namesplit) 2009-08-04 08:05:06 +00:00
Alasdair Kergon
252239bdac Add default udev rules.
Update dm-ioctl.h comments.
2009-08-03 18:44:54 +00:00
Alasdair Kergon
f9e17e36aa Add udev checks. 2009-08-03 18:33:08 +00:00
Alasdair Kergon
2ad32d9518 Add warnings to check udev did what it was meant to. 2009-08-03 18:31:53 +00:00
Alasdair Kergon
aaa01e3488 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
a74be32bf6 Manage without dm_udev_cleanup? 2009-08-03 18:01:45 +00:00
Dave Wysochanski
5e82475490 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
f86117e3d5 cleanup some ignored return values & 'stack's 2009-08-03 11:20:15 +00:00
Alasdair Kergon
b59c9854e8 deal with error-related FIXMEs 2009-08-03 11:01:26 +00:00
Alasdair Kergon
b42929dca7 lvchange --noudevsync 2009-08-03 10:58:40 +00:00
Petr Rockai
f5cb304acb Make lvconvert honour log mirror options combined with downconversion.
(RHBZ 463272)
2009-08-02 21:59:21 +00:00
Petr Rockai
d25584e4fb Slightly refactor mirror log conversions in lvconvert. 2009-08-02 21:56:29 +00:00
Petr Rockai
7aa72b6820 Add test for RHBZ 481793 (passing, thanks to vg_read changes checked in
previously).
2009-08-02 21:45:45 +00:00
Petr Rockai
0e867038da Allow LV suspend while --ignorelockingfailure is in force. 2009-08-02 21:03:09 +00:00
Petr Rockai
e516e0708c Update synopsis in lvconvert manpage to mention --repair. 2009-08-02 21:01:51 +00:00
Mike Snitzer
098c16c9df 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
Mike Snitzer
e92d56a94d 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
Mike Snitzer
bb2a46b218 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
Mike Snitzer
2aabcc1c1c 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
Mike Snitzer
57b660356e 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
70c0c29145 dummy makefile for now to keep builds happy 2009-07-31 18:41:19 +00:00
Alasdair Kergon
bd90c6b2c2 Set cookies in activation code and wait for udev to complete processing. 2009-07-31 18:30:31 +00:00
Alasdair Kergon
2c0dfdf839 Add udevcomplete and --noudevwait to dmsetup. 2009-07-31 17:51:45 +00:00
Alasdair Kergon
b634751cc4 another fixme 2009-07-31 16:57:06 +00:00
Alasdair Kergon
4d8c4ea7e6 Add libdevmapper functions to support synchronisation with udev. 2009-07-31 15:53:11 +00:00
Mike Snitzer
9607eba5c2 Fix compile warnings from recently added log_very_verbose() in _text_pv_write() 2009-07-31 14:23:06 +00:00
Alasdair Kergon
78ce7acc0c configure --udevdir 2009-07-31 13:31:53 +00:00
Alasdair Kergon
a5f46f6a22 add not-yet-working udev options 2009-07-31 11:51:23 +00:00
Alasdair Kergon
5d518f1f18 Prepare for udev synchronisation code. (options don't work yet) 2009-07-31 11:49:53 +00:00
Mike Snitzer
377b6a5843 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
Mike Snitzer
733bd656b2 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
Mike Snitzer
04b2a4bdcf 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
Mike Snitzer
d01a37f597 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
Mike Snitzer
c8a4e489c1 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
Mike Snitzer
ad273af9c7 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
Mike Snitzer
2143b169b1 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
8b9e515185 Document the -I option to clvmd 2009-07-30 13:32:38 +00:00
Alasdair Kergon
f15a2320bd corosync not cman... 2009-07-30 12:31:45 +00:00
Alasdair Kergon
82c445b01d Fix configure script to handle multiple clvmd selections. 2009-07-30 12:25:42 +00:00
Alasdair Kergon
9b6f239159 Fix lvm2app.pc installation filename. 2009-07-29 19:24:11 +00:00