1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

2304 Commits

Author SHA1 Message Date
Alasdair Kergon
f9fc7d8da4 pre-release 2012-02-23 18:22:09 +00:00
Jonathan Earl Brassow
870762d8e3 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.
2012-02-23 17:36:35 +00:00
Peter Rajnoha
da532741c9 Add LVMetaD systemd units. 2012-02-23 11:24:07 +00:00
Jonathan Earl Brassow
9bdfb30720 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.
2012-02-23 03:57:23 +00:00
Alasdair Kergon
d860272b00 Check all tags and LV names are in a valid form in vg_validate. 2012-02-23 00:11:01 +00:00
Peter Rajnoha
4417a8bd40 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'.
2012-02-22 17:55:10 +00:00
Jonathan Earl Brassow
e8eb64c878 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.
2012-02-22 17:18:49 +00:00
Jonathan Earl Brassow
0e92b70f71 *** empty log message *** 2012-02-22 17:14:38 +00:00
Alasdair Kergon
971248911b post-release 2012-02-20 21:11:06 +00:00
Alasdair Kergon
815aa3555f pre-release 2012-02-20 19:38:19 +00:00
Zdenek Kabelac
d81498a824 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.
2012-02-15 15:18:43 +00:00
Zdenek Kabelac
1fa8ddaf51 Initialize monitoring support only for thin pools 2012-02-15 13:49:51 +00:00
Jonathan Earl Brassow
ad48a46fc9 Make conversion from a synced 'mirror' to 'raid1' not cause a full resync.
It was not possible to pass down the DM_[FORCE|NO]SYNC flags to
'dm_tree_node_add_raid_target'.  This meant that converting to 'raid1' from
'mirror' would cause a full resync.  (It also meant that '--nosync' was
ineffective when creating a 'raid1' LV.)

I've taken the 'reserved' parameter in 'dm_tree_node_add_raid_target' and
used it for the "flags" parameter.  Now it is possible to pass the sync
flags and any other flags that may come up.
2012-02-13 20:13:39 +00:00
Zdenek Kabelac
172c87f7ca Never try to test character past given buffer
In case units[0] would be already '\0', do not check units[1].
2012-02-13 14:23:40 +00:00
Peter Rajnoha
e587cb6ac5 Add configure --with-systemdsystemunitdir. 2012-02-13 13:02:47 +00:00
Zdenek Kabelac
3e74542b5d Add check for allocation failure 2012-02-13 11:16:42 +00:00
Zdenek Kabelac
cbe6bcd593 Add check for rimage name allocation failure 2012-02-13 11:10:37 +00:00
Zdenek Kabelac
bed744c15d Add check for mda_copy failure 2012-02-13 11:09:25 +00:00
Zdenek Kabelac
fde44d055b Add check for failure 2012-02-13 11:07:55 +00:00
Zdenek Kabelac
52f2f3eae4 Add free_orphan_vg
Move commod code to destroy orphan VG into free_orphan_vg() function.
Use orphan vgmem for creation of PV lists.
Remove some free_pv_fid() calls (FIXME: check all of them)
FIXME: Check whether we could merge release_vg back again for all VGs.
2012-02-13 11:03:59 +00:00
Zdenek Kabelac
65079de265 If the same fid is already same avoid ref_counting 2012-02-13 11:01:34 +00:00
Zdenek Kabelac
960ee343f3 Add missing test for failure of lvmcache_foreach_pv 2012-02-13 10:58:20 +00:00
Zdenek Kabelac
f9411bb2af Clean error paths for format instance
With updated orphan VG code this code needed some updates.
Add missing log_error for allocation failures.
2012-02-13 10:56:31 +00:00
Zdenek Kabelac
874a4fd80d Release_vg instead of plain free in error path 2012-02-13 10:53:31 +00:00
Zdenek Kabelac
bbf98c19a8 Log error reporting for failing _alloc_pv
Drop unneeded zeroing of zalloced memory region.
2012-02-13 10:51:52 +00:00
Fabio M. Di Nitto
94424fabd0 In the new corosync world, dlm is a standalone service.
Fix clvmd init script to Require dlm service when building for the
new corosync or clvmd will fail to start.
2012-02-13 05:24:57 +00:00
Alasdair Kergon
0a182731e4 post-release 2012-02-13 00:23:21 +00:00
Alasdair Kergon
79b3966a34 pre-release 2012-02-12 23:02:52 +00:00
Alasdair Kergon
ba14fff2af FMT_INSTANCE_PV is no longer used 2012-02-12 22:37:24 +00:00
Petr Rockai
872b97a752 What's new. 2012-02-10 02:56:54 +00:00
Petr Rockai
0fbbc6ce13 What's new: lvmcache. 2012-02-10 01:29:46 +00:00
Peter Rajnoha
5fa417a9c0 Stop processing lvextend if trying to extend a mirror that is being recovered.
Missing correct return value in lv_extend fn.
2012-02-09 15:13:42 +00:00
Zdenek Kabelac
a7e2da0585 Thin add pool_below_threshold
Test both data and metadata percent usage.
2012-02-08 13:05:38 +00:00
Zdenek Kabelac
94f88a4f14 Fix test for lv_snapshot_percent
Do not check for PERCENT_MERGE_FAILED if the lv_snapshot_percent() failed.
(test for snap_percent would be testing uninitialized value).
2012-02-08 13:02:07 +00:00
Zdenek Kabelac
9278655de1 Some fixmes
'len' calculation is unused ?
Unreachable code could be removed or moved upward ?
2012-02-08 12:57:15 +00:00
Zdenek Kabelac
462835faa0 Switch to return void
List delete cannot fail, so there is no reason to test for error.
2012-02-08 12:52:58 +00:00
Zdenek Kabelac
33dea28e23 Use dm_snprintf and improve error handling
Add standard error reporting with error logging.
Use plain alloc instead of zalloc for string buffer.
Use dm_snprintf with valid test for <0.
2012-02-08 12:50:10 +00:00
Zdenek Kabelac
7ffca95bb6 Add range test for device number
Check the output of atoi is in valid range.
2012-02-08 12:48:14 +00:00
Zdenek Kabelac
3a8b6a9948 Keep page_size as signed number
Since it's return value from sysconf and is checked for <0.
2012-02-08 11:34:46 +00:00
Zdenek Kabelac
84fd8ea4bd Move done jump lower
Since before 'goto done' is bufused zeroed, it would otherwise write 1
byte in front of buffer.
2012-02-08 11:31:29 +00:00
Zdenek Kabelac
0154bcf0a7 Check that whole locking_dir fits _lock_dir buffer 2012-02-08 11:17:34 +00:00
Zdenek Kabelac
02aeb23f1f Use dm_list_iterate_items_safe
And avoid direct access to list member variables.
Inline _free_li().
2012-02-08 11:12:18 +00:00
Zdenek Kabelac
5dfd775384 Ensure strncpy() function always ends with '\0'
Since last character needs to be \0 for string,
pass buffer size smaller by 1 byte.
2012-02-08 11:05:04 +00:00
Zdenek Kabelac
cd4c26a27f Set status for error path
Do not leave status unitialized, since in some cases, it's tested,
when the function returns error.
2012-02-08 10:56:17 +00:00
Zdenek Kabelac
f9bd70878b Add missing deps for lvm2api
Hmm, wasted some time because of this missing deps....
2012-02-08 10:52:45 +00:00
Zdenek Kabelac
ee54e43702 Fix resource leaks for failing allocation
In case, something would fail during format initialization,
return allocated memory.
2012-02-08 10:49:36 +00:00
Zdenek Kabelac
12ac6f9f11 Release allocated resources in error path
If composite_filter_create() fails, release filters.
2012-02-08 10:46:24 +00:00
Zdenek Kabelac
7b408a08ef Check result of lstat
If lstat returns errno different from ENOENT, do not use the content of
struct stat 'buf'.
2012-02-08 10:43:42 +00:00
Petr Rockai
3959c60250 What's new. 2012-02-01 20:13:44 +00:00
Alasdair Kergon
2a57a934bb post-release 2012-02-01 18:46:57 +00:00