summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* makefiles: avoid pipingZdenek Kabelac2023-02-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addressing problem for user of system without default bash shell. As reported "set -o pipefail" is a bashism that causes the build to fail when /bin/sh does not point to bash. For example, this has been observed causing build failures on Gentoo when /bin/sh is symlinked to /bin/dash. Rule has been reworked and we started to use .DELETE_ON_ERROR to ensure that with any errors during file generation, such invalid file is automatically removed. Rules were reworked to avoid using pipe and instead use temporary files when necessary. Printing lines with echo was replaced with POSIX recomended 'printf' as proposed by reporter since handling of escape characters and the "-n" flag for "echo" aren't portable across shells. Also some build deps has been added. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1822280 Gentoo-bug: https://bugs.gentoo.org/682404 Gentoo-bug: https://bugs.gentoo.org/716496 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1822280 Reported-by: Michael Orlitzky <michael@orlitzky.com> TODO: investage if the temporary files could be handled via some intermediate target solution - ATM I couldn't make it work equally well as current solution use shell 'trap' to remove temp file.
* makefiles: keep removing anchient filesZdenek Kabelac2023-02-101-0/+2
| | | | | | | | | | | Commit dropping lvmetad support 117160b27e510dceb1ed6acf995115c040acd88d also removed cleaning of its generated files. However we need to keep this functionality, otherwise we can leak them during various bisect. Easier is to keep such rules forever. Also commit c1ab9fb37faee56cee278ccd94cb958d30d61b94 moved cmds.h to include, so again keep it removed so it's not left there and in any case could not misslead anyone.
* lvresize: better detection of BLKID_SUBLKS_FSINFOZdenek Kabelac2023-02-101-0/+3
| | | | | | | | | Use configure detection instead of trying to directly include blkid.h inside lvresize.c - where we do not pass in BLKID_CFLAGS and since we actually do not need to use blkid there, introeduce test variable HAVE_BLKID_SUBLKS_FSINFO and avoid trying to use blkid.h in this place - this also fixes builing problem for systems without blkid.h.
* make: move cmds.hDavid Teigland2022-09-271-1/+17
| | | | | generate the header in the include dir so it can be easily used from both lib and tools dirs.
* configure: updateMarian Csontos2022-09-141-2/+4
|
* lvresize: add new options and defaults for fs handlingDavid Teigland2022-09-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new option "--fs String" for lvresize/lvreduce/lvextend controls the handling of file systems before/after resizing the LV. --resizefs is the same as --fs resize. The new option "--fsmode String" can be used to control mounting and unmounting of the fs during resizing. Possible --fs values: checksize Only applies to reducing size; does nothing for extend. Check the fs size and reduce the LV if the fs is not using the affected space, i.e. the fs does not need to be shrunk. Fail the command without reducing the fs or LV if the fs is using the affected space. resize Resize the fs using the fs-specific resize command. This may include mounting, unmounting, or running fsck. See --fsmode to control mounting behavior, and --nofsck to disable fsck. resize_fsadm Use the old method of calling fsadm to handle the fs (deprecated.) Warning: this option does not prevent lvreduce from destroying file systems that are unmounted (or mounted if prompts are skipped.) ignore Resize the LV without checking for or handling a file system. Warning: using ignore when reducing the LV size may destroy the file system. Possible --fsmode values: manage Mount or unmount the fs as needed to resize the fs, and attempt to restore the original mount state at the end. nochange Do not mount or unmount the fs. If mounting or unmounting is required to resize the fs, then do not resize the fs or the LV and fail the command. offline Unmount the fs if it is mounted, and resize the fs while it is unmounted. If mounting is required to resize the fs, then do not resize the fs or the LV and fail the command. Notes on lvreduce: When no --fs or --resizefs option is specified: . lvextend default behavior is fs ignore. . lvreduce default behavior is fs checksize (includes activating the LV.) With the exception of --fs resize_fsadm|ignore, lvreduce requires the recent libblkid fields FSLASTBLOCK and FSBLOCKSIZE. FSLASTBLOCK*FSBLOCKSIZE is the last byte used by the fs on the LV, which determines if reducing the fs is necessary.
* configure: remove some obsolete or duplicate checksZdenek Kabelac2022-08-301-7/+0
| | | | As autoupdate suggested, drop unneeded checks.
* configure: check for mallinfo2Zdenek Kabelac2022-08-301-0/+3
|
* autoreconf: support newer archsZdenek Kabelac2022-08-151-18/+12
| | | | | | | | | | | Update to more recent version of configure script to support more new architecture types like RISCV64. Tools in use ATM: autoconf-2.71-3.fc37.noarch autoconf-archive-2022.02.11-3.fc37.noarch automake-1.16.5-9.fc37.noarch Resolves https://bugzilla.redhat.com/show_bug.cgi?id=2118243
* configure: updateZdenek Kabelac2021-10-181-3/+0
|
* configure: updatesZdenek Kabelac2021-10-141-0/+6
|
* configure: updateMarian Csontos2021-10-071-0/+3
|
* configure: check ffs __builtin_ffs versionsortZdenek Kabelac2021-09-271-0/+9
| | | | Check for presence of ffs(), __builtin_ffs() and versionsort().
* vdo: rename vdoimport to lvm_import_vdoZdenek Kabelac2021-08-261-3/+3
| | | | Missed bits in previous rename commits.
* vdo: Rename vdoimport to lvm_import_vdo.Marian Csontos2021-08-261-1/+1
|
* vdo: add vdoimport supportZdenek Kabelac2021-07-091-0/+3
| | | | | | | | | | | | | Add tool 'vdoimport' to support easy conversion of an existing VDO manager managed VDO volumes into lvm2 managed VDO LV. When physical converted volume is already a logical volume, conversion happens with the VG itself, just with validation for extent_size, so the virtually sized logical VDO volume size can be expressed in extents. Example of basic simple usage: vdoimport --name vg/vdolv /dev/mapper/vdophysicalvolume
* configure: updatesZdenek Kabelac2021-07-091-3/+3
|
* configure: Add macro LOCKDIDM_SUPPORTLeo Yan2021-05-211-0/+3
| | | | | | | | | | The macro LOCKDIDM_SUPPORT is missed in configure.h.in file, thus when execute "configure" command, it has no chance to add this macro in the automatic generated header include/configure.h. This patch adds macro LOCKDIDM_SUPPORT into configure.h.in. Signed-off-by: Leo Yan <leo.yan@linaro.org>
* configure: support builds without versioningZdenek Kabelac2021-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Not all libc (like musl, uclibc dietlibc) libraries support full symbol version resolution in runtime like glibc. Add support to not generate symbol versions when compiling against them. Additionally libdevmapper.so was broken when compiled against uclibc. Runtime linker loader caused calling dm_task_get_info_base() function recursively, leading to segmentation fault. Introduce --with-symvers=STYLE option, which allows to choose between gnu and disabled symbol versioning. By default gnu symbol versioning is used. __GNUC__ check is replaced now with GNU_SYMVER. Additionally ld version script is included only in case of gnu option, which slightly reduces output size. Providing --without-symvers to configure script when building against uclibc library fixes segmentation fault error described above, due to lack of several versions of the same symbol in libdevmapper.so library. Based on: https://patchwork.kernel.org/project/dm-devel/patch/20180831144817.31207-1-m.niestroj@grinn-global.com/ Suggested-by: Marcin Niestroj <m.niestroj@grinn-global.com>
* configure: use rawhide versionZdenek Kabelac2021-03-221-3/+0
|
* git: update .gitignoreZdenek Kabelac2021-03-191-0/+2
| | | | Hide some files from older builds.
* lvmlockctl: replace popen and systemDavid Teigland2021-03-031-3/+0
| | | | | | | | | with fork and exec to avoid use of shell. largely copied from lib/misc/lvm-exec.c require lvmlockctl_kill_command to be full path use lvm config instead of lvmconfig to avoid need for LVM_DIR
* lvmlockctl: use lvm.conf lvmlockctl_kill_commandDavid Teigland2021-03-031-0/+3
| | | | which specifies a command to run by lvmlockctl --kill.
* configure: check for BLKZEROOUT supportZdenek Kabelac2020-10-021-0/+3
|
* lvm: add readline alternative editlineBastian Germann2020-09-291-0/+9
| | | | | | | | | | | | | LVM2 is distributed under GPLv2 only. The readline library changed its license long ago to GPLv3. Given that those licenses are incompatible and you follow the FSF in their interpretation that dynamically linking creates a derivative work, distributing LVM2 linked against a current readline version might be legally problematic. Add support for the BSD licensed editline library as an alternative for readline. Link: https://thrysoee.dk/editline
* build: make generateMarian Csontos2020-08-091-3/+3
|
* Allow dm-integrity to be used for raid imagesDavid Teigland2020-04-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dm-integrity stores checksums of the data written to an LV, and returns an error if data read from the LV does not match the previously saved checksum. When used on raid images, dm-raid will correct the error by reading the block from another image, and the device user sees no error. The integrity metadata (checksums) are stored on an internal LV allocated by lvm for each linear image. The internal LV is allocated on the same PV as the image. Create a raid LV with an integrity layer over each raid image (for raid levels 1,4,5,6,10): lvcreate --type raidN --raidintegrity y [options] Add an integrity layer to images of an existing raid LV: lvconvert --raidintegrity y LV Remove the integrity layer from images of a raid LV: lvconvert --raidintegrity n LV Settings Use --raidintegritymode journal|bitmap (journal is default) to configure the method used by dm-integrity to ensure crash consistency. Initialization When integrity is added to an LV, the kernel needs to initialize the integrity metadata/checksums for all blocks in the LV. The data corruption checking performed by dm-integrity will only operate on areas of the LV that are already initialized. The progress of integrity initialization is reported by the "syncpercent" LV reporting field (and under the Cpy%Sync lvs column.) Example: create a raid1 LV with integrity: $ lvcreate --type raid1 -m1 --raidintegrity y -n rr -L1G foo Creating integrity metadata LV rr_rimage_0_imeta with size 12.00 MiB. Logical volume "rr_rimage_0_imeta" created. Creating integrity metadata LV rr_rimage_1_imeta with size 12.00 MiB. Logical volume "rr_rimage_1_imeta" created. Logical volume "rr" created. $ lvs -a foo LV VG Attr LSize Origin Cpy%Sync rr foo rwi-a-r--- 1.00g 4.93 [rr_rimage_0] foo gwi-aor--- 1.00g [rr_rimage_0_iorig] 41.02 [rr_rimage_0_imeta] foo ewi-ao---- 12.00m [rr_rimage_0_iorig] foo -wi-ao---- 1.00g [rr_rimage_1] foo gwi-aor--- 1.00g [rr_rimage_1_iorig] 39.45 [rr_rimage_1_imeta] foo ewi-ao---- 12.00m [rr_rimage_1_iorig] foo -wi-ao---- 1.00g [rr_rmeta_0] foo ewi-aor--- 4.00m [rr_rmeta_1] foo ewi-aor--- 4.00m
* configure: check for prlimitZdenek Kabelac2019-08-261-0/+3
| | | | | | Update configure and make code compilable if prlimit() is not present. Since the code is suspicious do not cope yet with it's replacement with set/getrlimit().
* build: autoreconfMarian Csontos2019-06-071-3/+3
|
* configure: check for pselectZdenek Kabelac2019-04-161-0/+6
|
* headers: use configure.h as 1st. headerZdenek Kabelac2018-12-141-0/+6
| | | | | | | | | | | Ensure configure.h is always 1st. included header. Maybe we could eventually introduce gcc -include option, but for now this better uses dependency tracking. Also move _REENTRANT and _GNU_SOURCE into configure.h so it doesn't need to be present in various source files. This ensures consistent compilation of headers like stdio.h since it may produce different declaration.
* makefiles: improving cleaning rulesZdenek Kabelac2018-11-291-1/+1
|
* Place the first PE at 1 MiB for all defaultsDavid Teigland2018-11-261-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . When using default settings, this commit should change nothing. The first PE continues to be placed at 1 MiB resulting in a metadata area size of 1020 KiB (for 4K page sizes; slightly smaller for larger page sizes.) . When default_data_alignment is disabled in lvm.conf, align pe_start at 1 MiB, based on a default metadata area size that adapts to the page size. Previously, disabling this option would result in mda_size that was too small for common use, and produced a 64 KiB aligned pe_start. . Customized pe_start and mda_size values continue to be set as before in lvm.conf and command line. . Remove the configure option for setting default_data_alignment at build time. . Improve alignment related option descriptions. . Add section about alignment to pvcreate man page. Previously, DEFAULT_PVMETADATASIZE was 255 sectors. However, the fact that the config setting named "default_data_alignment" has a default value of 1 (MiB) meant that DEFAULT_PVMETADATASIZE was having no effect. The metadata area size is the space between the start of the metadata area (page size offset from the start of the device) and the first PE (1 MiB by default due to default_data_alignment 1.) The result is a 1020 KiB metadata area on machines with 4KiB page size (1024 KiB - 4 KiB), and smaller on machines with larger page size. If default_data_alignment was set to 0 (disabled), then DEFAULT_PVMETADATASIZE 255 would take effect, and produce a metadata area that was 188 KiB and pe_start of 192 KiB. This was too small for common use. This is fixed by making the default metadata area size a computed value that matches the value produced by default_data_alignment.
* configure: updateZdenek Kabelac2018-11-081-0/+3
|
* build: Update configureMarian Csontos2018-09-141-9/+0
|
* Remove lvmetadDavid Teigland2018-07-111-2/+0
| | | | | | | | | | | | | Native disk scanning is now both reduced and async/parallel, which makes it comparable in performance (and often faster) when compared to lvm using lvmetad. Autoactivation now uses local temp files to record online PVs, and no longer requires lvmetad. There should be no apparent command-level change in behavior.
* build: add vdo configuration option --with-vdo=Zdenek Kabelac2018-07-091-0/+6
| | | | | | | | | | | | | Checks whether VDO support is enabled. Detects presence of 'vdoformat' tool which is required for to format VDO pool. ATM build of VDO is NOT automatically enabled (None is default). To enable build of LVM with VDO support use: configure --with-vdo=internal TODO: Maybe future version may switch to link some small VDO library for formating (would require linking and package dependency).
* build: drop some more old filesZdenek Kabelac2018-07-021-0/+2
|
* utils: add clzllZdenek Kabelac2018-06-221-0/+3
| | | | Check for __builtin_clzll and add wrapper when missing.
* liblvm: remove lvmapiJoe Thornber2018-06-081-63/+3
| | | | This has been deprecated for a while.
* Remove clvmd and associated codeDavid Teigland2018-06-051-18/+0
| | | | More code reduction and simplification can follow.
* build: remove any leftover fileZdenek Kabelac2018-06-042-4/+82
| | | | | In case repository is used after building older version of lvm2 (i.e. git bisect) make sure clean erases any possible old symlinks.
* Merge branch 'master' into 2018-05-11-fork-libdmJoe Thornber2018-05-161-0/+3
|\
| * build: configure detect libaioZdenek Kabelac2018-05-151-0/+3
| | | | | | | | | | | | | | | | | | No point to start building lvm without this header file. Although there could be 'some point' in supporting standalone build of 'just' libdm where the libaio might be avoided. TODO: think about configure option for building libdm only.
* | build: Don't generate symlinks in include/ dirJoe Thornber2018-05-142-99/+1
|/ | | | | | | As we start refactoring the code to break dependencies (see doc/refactoring.txt), I want us to use full paths in the includes (eg, #include "base/data-struct/list.h"). This makes it more obvious when we're breaking abstraction boundaries, eg, including a file in metadata/ from base/
* Revert "build: Stop creating the symlinks in include/ on the fly."Joe Thornber2018-05-0183-83/+103
| | | | This reverts commit cdcea0bf55c170f538c3ffc114792eb3c993f4ac.
* build: update ./configure and configure.h.inJoe Thornber2018-05-011-14/+0
| | | | Fallout from Dave's removal of format1 and pool.
* build: rename configure.in -> configure.acJoe Thornber2018-04-301-1/+1
| | | | Squashes a warning from autotools
* build: Stop creating the symlinks in include/ on the fly.Joe Thornber2018-04-2783-103/+83
| | | | | | | | | | Git handles symlinks, tar handles symlinks. So I've just put the links themselves into git. This simplifies dependencies a little, and stop some build loops I was hitting. External build dir now works too.
* Revert "build: Stop creating the symlinks in include/ on the fly."Joe Thornber2018-04-2783-83/+103
| | | | | | This reverts commit f8f621951315087c4e7720682be495941dc3cf37. It wasn't taking builds outside the src dir into account.