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

3884 Commits

Author SHA1 Message Date
Alasdair G Kergon
a946327bb7 post-release 2017-05-03 11:26:58 +01:00
Alasdair G Kergon
fb4bf1f4ea pre-release 2017-05-03 11:23:31 +01:00
David Teigland
54726a4950 fix running commands from a script file
Using any arg with a command name in a script file
would cause the command to fail.

The name of the script file being executed was being passed
to lvm_register_commands() and define_commands(), which
prevented command defs from being defined (simple commands
were still being defined only by name which was enough for those
to still work when run trivially with no args).
2017-04-28 16:51:04 -05:00
David Teigland
c73b9f062c WHATS_NEW: pvcreate prompt 2017-04-28 09:06:41 -05:00
Alasdair G Kergon
1764524b06 WHATS_NEW: pvcreate --setphysicalvolumesize 2017-04-28 14:34:26 +01:00
Heinz Mauelshagen
0516447978 lvconvert: preserve region size on raid1 image count changes (v2)
Unless a change of the regionsize is requested via "lvconvert -R N ...",
keep the region size when the number of images changes in a raid1 LV.

Related: rhbz1443705
2017-04-27 15:52:25 +02:00
Heinz Mauelshagen
af47ec9f51 Revert "lvconvert: preserve region size on raid1 image count changes"
This reverts commit 8333d5a969.
2017-04-27 15:29:03 +02:00
Alasdair G Kergon
cbc69f8c69 pvresize: Prompt when non-default size supplied.
Seek confirmation before changing the PV size to one that differs
from the underlying block device.
2017-04-27 02:36:34 +01:00
Heinz Mauelshagen
8333d5a969 lvconvert: preserve region size on raid1 image count changes
Unless a change of the regionsize is requested via "lvconvert -R N ...",
keep the region size when the number of images changes in a raid1 LV.

Resolves: rhbz1443705
2017-04-22 02:04:49 +02:00
Alasdair G Kergon
658d524d26 configure: Fix notify-dbus and dmfilemapd options. 2017-04-18 20:37:53 +01:00
David Teigland
2d9097e9ca WHATS_NEW: configure option enable-lvmlockd 2017-04-18 12:58:18 -05:00
Heinz Mauelshagen
b81b4aad24 WHATS_NEW: raise region_size default 2017-04-13 17:49:58 +02:00
Alasdair G Kergon
4547218a7d conf: Add missing prefix to installation directory.
Our Makefiles also support systems that set the installation prefix
at configuration time - the use of DESTDIR is not required.
2017-04-13 02:17:27 +01:00
Alasdair G Kergon
ae7f696d53 post-release 2017-04-13 01:47:47 +01:00
Alasdair G Kergon
b9a16fe73b pre-release 2017-04-13 00:43:31 +01:00
Zdenek Kabelac
3018cdcaa7 fsadm: support configurable full path
Just like with other tools lvm2 is using allow to define
fully configurable path.

Default is selected by $PREFIX/sbin/fsadm
2017-04-12 21:34:08 +02:00
Zdenek Kabelac
1095322901 thin: properly check for status for max sizes metadata
When metadata LV size was over DM_THIN_MAX_METADATA_SIZE sectors,
the info() routine was incorrectly trying to match bigger size,
while we do never pass any bigger device.

Fixing a case, where lvs should be displaying status for metadata
LV with 16GB size.
2017-04-12 21:34:08 +02:00
David Teigland
4b121a1f6f WHATS_NEW: add items since last release 2017-04-12 13:45:37 -05:00
Heinz Mauelshagen
19e6c338d3 WHATS_NEW: add recent RAID entries 2017-04-12 19:41:55 +02:00
Peter Rajnoha
448bf9491a lvmconf: fix systemd unit existence check for lvmconf --services --startstopservices
We have to unset the LoadState variable from previous use when we check
for systemd unit state. We use this variable to check if systemd services
are loaded or not and if it is loaded, we issue systemctl commands to
enable/disable and start/stop the service. We don't issue these commands
if the unit is not loaded to avoid error messages which may confuse users.
2017-04-05 11:06:56 +02:00
Zdenek Kabelac
dfdd6ccf3b vgrename: use long enough buffer for path
Use PATH_MAX when creating buffers for rename.
2017-03-30 00:38:41 +02:00
Alasdair G Kergon
0c2f7ed49a post-release 2017-03-28 16:14:03 +01:00
Alasdair G Kergon
396377bc03 pre-release
Removing some unused new lines and changing some incorrect "can't
release until this is fixed" comments.  Rename license.txt to make
it clear its merely an included file, not itself a licence.
2017-03-28 16:11:35 +01:00
Heinz Mauelshagen
e9433a9de9 WHATS_NEW: man-generator escape '-' 2017-03-24 14:31:19 +01:00
Alasdair G Kergon
e8362b4cb7 tools: Show configuration command line in lvm version.
Also update configure.in with some items recently added to the tree.
2017-03-23 01:01:35 +00:00
Heinz Mauelshagen
1810162b51 WHATS_NEW: adjust to misordered raid parameters 2017-03-21 18:18:58 +01:00
Heinz Mauelshagen
6ebf39da91 WHATS_NEW: conditionally reject raid convert 2017-03-17 14:51:10 +01:00
Heinz Mauelshagen
4a3e30d102 WHATS_NEW: ensure raid6 upconversion restrictions 2017-03-16 22:33:08 +01:00
Heinz Mauelshagen
b917b12e2c WHATS_NEW: adjust mirror+raid DSOs to lvconvert --repair 2017-03-16 22:27:30 +01:00
David Teigland
c8719d4e94 WHATS_NEW: disable lvmetad for repair 2017-03-16 11:56:19 -05:00
Alasdair G Kergon
4f86519845 lvmchange: Move to a built-in command.
Has been obsolete since LVM1 and it's clear we'll never implement this.
2017-03-16 01:09:29 +00:00
Zdenek Kabelac
52935b5834 cache: enhance lvdisplay for cache volumes
Better support for lvdisplay.
By default info about running (in kernel) cache status is printed.
To get 'segtype' info, user runs: 'lvdisplay -m',  example:

  --- Logical volume ---
  LV Path                /dev/vg/lvol0
  LV Name                lvol0
  VG Name                vg
  LV UUID                Y4uWuN-TBGk-duer-aPWl-yBWn-iFFR-RU1gg1
  LV Write Access        read/write
  LV Creation host, time linux, 2017-03-01 20:52:39 +0100
  LV Cache pool name     lvol2
  LV Cache origin name   lvol0_corig
  LV Status              available
  # open                 0
  LV Size                12,00 MiB
  Cache used blocks      10,42%
  Cache metadata blocks  0,49%
  Cache dirty blocks     0,00%
  Cache read hits/misses 112 / 34
  Cache wrt hits/misses  133 / 0
  Cache demotions        0
  Cache promotions       20
  Current LE             3
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Segments ---
  Logical extents 0 to 2:
    Type		cache
    Chunk size		64,00 KiB
    Metadata format	1
    Mode		writethrough
    Policy		smq
      Setting		migration_threshold=100000
2017-03-10 19:33:01 +01:00
Zdenek Kabelac
4d2b1a0660 cache: enable usage of --cachemetadataformat
lvcreate and lvconvert may select cache metadata format when caching LV.
By default lvm2 picks best available format.
2017-03-10 19:33:01 +01:00
Zdenek Kabelac
518b814cdb cache: LV supports cache segs with metadata format
Cache pool read/writes metadata_format within its segment type..

For CachePoolLV unselected metadata format is NOT stored in metadata.

For CacheLV when metadata format is not present/selected in lvm2 metadata,
it's automatically assumed to be the version 1 (backward compatible).

To ensure older lvm2 will not 'miss-read' metadata with new version 2,
such LV is marked with METADATA_FORMAT status flag (segment is
specifying metadata format). So when cache uses metadata format 2,
it will become inaccesible on older system without such support.
(kernel dm cache < 1.10,  lvm2 < 2.02.169).
2017-03-10 19:33:01 +01:00
Zdenek Kabelac
4a394f410d cache: introduce allocation/cache_metadata_format
Add new profilable configation setting to let user select
which metadata format of a created cache pool he wish to use.

By default the 'best' available format is autodetected at runtime,
but user may enforce format 1 or 2 ATM.

Code also detects availability for metadata2 supporting cache target.

In case of troubles user may easily Disable usage of this feature
by placing 'metadata2' into global/cache_disabled_features list.
2017-03-10 19:33:01 +01:00
Zdenek Kabelac
46820bfff3 lvconvert: share function for cache params
Reuse same code for getting/setting cache parameters with lvcreate.

So there is single one place how to get vars from profiles and configs.

Variables declarations are moved to start of function and
there is no need to initialize them as they are always
defined by functions get_cache_params() and get_pool_params().
2017-03-10 19:33:00 +01:00
Zdenek Kabelac
298d12c459 lvcreate: do not round cache volumes on cache chunks
Since cache chunk might be huge and there is no technical need
to enforce rounding and there is actually more 'real' VG space
used then necessary - keep rounding on 'chunk' bounrary only
for thin volumes - where it's the space used anyway.

NB: we support conversion of any-size 'existing' LV into cached LV.
2017-03-10 19:33:00 +01:00
Zdenek Kabelac
36003df7e3 cache: extend usability of cache_set_params
Fix missing reset of '*settings' pointer when no args were given.

Handle cache_chunk settings like all other settings, so it is properly
updated only with non-zero settings and the existing cache-pool
chunk_size is not being reconfigured.
2017-03-10 19:33:00 +01:00
Zdenek Kabelac
dcf038c7a6 cache: improve support for profile for cache settings
User can specify metadata profile which stores important cache
geometry data for easy configuration.

Fix missing support for getting chunk_size, cache_mode, cache_policy
for a cache/cache pools volumes from configuration or metadata profile.
2017-03-10 19:33:00 +01:00
Alasdair G Kergon
c41e999488 git: Upstream repository moved to sourceware.org
The fedorahosted git repository shuts down tomorrow:
  https://communityblog.fedoraproject.org/fedorahosted-sunset-2017-02-28/

Our upstream git repository has moved back to sourceware.org.
Mailing list hosting is not changing.

Gitweb:
  https://www.sourceware.org/git/?p=lvm2

Git:
  git://sourceware.org/git/lvm2.git
  ssh://sourceware.org/git/lvm2.git
  http://sourceware.org/git/lvm2.git

Example command to change the origin of a repository clone:
  Public:
    git remote set-url origin git://sourceware.org/git/lvm2.git
  Committers:
    git remote set-url origin git+ssh://sourceware.org/git/lvm2.git
2017-02-27 14:05:50 +00:00
Heinz Mauelshagen
d768fbe010 WHATS_NEW: add entry 2017-02-24 05:24:59 +01:00
Heinz Mauelshagen
8ab0725077 lvchange: reject writemostly/writebehind on raid1 during resync
The MD kernel raid1 personality does no use any writemostly leg as the primary.

In case a previous linear LV holding data gets upconverted to
raid1 it becomes the primary leg of the new raid1 LV and a full
resynchronization is started to update the new legs.

No writemostly and/or writebehind setting may be allowed during
this initial, full synchronization period of this new raid1 LV
(using the lvchange(8) command), because that would change the
primary (i.e the previous linear LV) thus causing data loss.

lvchange has a bug not preventing this scenario.

Fix rejects setting writemostly and/or writebehind on resychronizing raid1 LVs.

Once we have status in the lvm2 metadata about the linear -> raid upconversion,
we may relax this constraint for other types of resynchronization
(e.g. for user requested "lvchange --resync ").

New lvchange-raid1-writemostly.sh test is added to the test suite.

Resolves: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855895
2017-02-23 15:09:29 +01:00
Zdenek Kabelac
9712995edd snapshot: improve removal of active origin volume
Previously when lvremove tried to remove 'active' origin,
it had been asking for every 'snapshot' LV separately
and doing individual single snapshot removals first.

To be faster it now deactivates origin before removal
all connected snapshots.

This avoids multiple reloads of dm table for origin volume
which were unnecessary as origin was meant to be removed as well.
2017-02-22 15:35:04 +01:00
Zdenek Kabelac
6716f5a2f4 WHATS_NEW: add entry 2017-02-22 15:20:52 +01:00
David Teigland
5ab051df7a WHATS_NEW: changes for recent command defs 2017-02-13 15:36:17 -06:00
David Teigland
c816e8b636 WHATS_NEW: items from command definitions patch set 2017-02-13 15:22:26 -06:00
Zdenek Kabelac
2a9eda1229 mem: add extra mem pages for pthread stack
Some archs can use even 64K pages and then lvm2 runs into trouble if
the stack is 'too small' to fit extra page capturing stack overwrite.

So when lvm2 limits stack - add extra mem page - be it 4K or 64K.

Relates to ppc64le bug: https://bugzilla.redhat.com/1387279
2017-02-11 18:23:15 +01:00
Heinz Mauelshagen
baba3f8e2a lvconvert: add conversion from/to raid10
Add:
- conversion support from striped/raid0/raid0_meta to/from raid10;
  raid10 goes by the near format (same as used in creation of
  raid10 LVs), which groups data copies together with their original
  blocks (e.g. 3-way striped, 2 data copies resulting in 112233 in the
  first stripe followed by 445566 in the second etc.) and is limited
  to even numbers of legs for now
- related tests to lvconvert-raid-takeover.sh
- typo

Related: rhbz1366296
2017-02-10 19:13:02 +01:00
Heinz Mauelshagen
55eaabd118 lvreduce/lvresize: add ability to reduce the size of a RaidLV
- support shrinking of raid0/1/4/5/6/10 LVs
- enhance lvresize-raid.sh tests: add raid0* and raid10
- fix have_raid4 in aux.sh to allow lv_resize-raid.sh
  and other scripts to test raid4

Resolves: rhbz1394048
2017-02-09 22:42:03 +01:00
Heinz Mauelshagen
cfb6ef654d lvconvert: add support to change RAID region size
Add:
- support to change region size of existing RaidLVs
  (all RAID LV types but raid0/raid0_meta)
- lvconvert-raid-regionsize.sh with test variations
  for different RAID types and region sizes

Resolves: rhbz1392947
2017-02-07 01:01:19 +01:00