summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
...
* reorder some status flag printing in gdbinit file.Jonathan Earl Brassow2011-09-131-15/+15
|
* Adjust gdbinit script to new RAID status flag values.Jonathan Earl Brassow2011-09-081-8/+8
|
* Replace char class :space: with explicit charsZdenek Kabelac2011-09-071-5/+6
| | | | | | | | | | | | | | | | Some major distributions are still using 'mawk' and they are not using the latest version - we end here with hidden dependency on the latest version of mawk (1.3.4) while i.e. Debian Lenny seems to stay with 1.3.3. So we end with completely broken vgimportclone script on such system. We would need to check for proper support of :space: and abort build if it doesn't work or simplier replace [:space:] with [ \t] which seems sufficient to make it work (as can be seen in this patch) A better fix would be to use command line parameter override - leaving as FIXME comment. This patch makes t-vgimportclone.sh test passing on Lenny.
* Updates to gdbinit fileJonathan Earl Brassow2011-09-011-28/+34
| | | | | 1) Add more status flags for printing 2) Fix bug in lv_status_r processing for mirror segment type
* Suppress locking error messages in monitoring init scripts.Peter Rajnoha2011-08-112-0/+2
|
* Configure and makefile changes for newly added systemd unit files.Peter Rajnoha2011-07-281-1/+8
|
* Add systemd unit files for dmeventd.Peter Rajnoha2011-07-283-0/+42
|
* RAID updates for gdbinit fileJonathan Earl Brassow2011-07-011-33/+106
|
* Use append but except query for dlm locks:-)Milan Broz2011-06-021-1/+1
|
* Always use append to file in lvmdump (selinux policy - no file truncation).Milan Broz2011-06-021-16/+17
| | | | | Workaround dmsetup ls --tree (terminal ioctl for width). (Until isatty() will be allowed by selinux policy.)
* gdbinit updateJonathan Earl Brassow2011-03-291-0/+8
| | | | | When doing lv_status_r on a sub_lv, do not climb the tree up past the starting point.
* Watch out for collisions in GDB global namespace.Jonathan Earl Brassow2011-03-141-23/+65
| | | | Better 'lv_status_r' printing.
* lv_status_r now prints out status of attached log LVsJonathan Earl Brassow2011-03-111-3/+8
| | | | (Print layout could be nicer... :(
* lv_status_r has been fixed-up so that it supports infinite LV stackingJonathan Earl Brassow2011-03-111-74/+180
| | | | (It does not yet follow 'log_lv' or 'origin' links.)
* detect RAID* LV and segment flags.Jonathan Earl Brassow2011-03-111-6/+19
|
* gdbinit - A GDB init file to help while debugging LVM.Jonathan Earl Brassow2011-03-101-0/+303
| | | | | | | | | | | | | | | | | | Copy this file as '.gdbinit' to your home directory or your working directory. It adds the following commands to gdb: - first_seg - lv_status - lv_status_r - lv_is_mirrored - seg_item - seg_status - segs_using_this_lv You can get a list of these user-defined commands by typing: (gdb) help user-defined You can get more information on each command by typing: (gdb) help <command>
* Add "dmsetup ls --tree" output to lvmdump.Dave Wysochanski2011-02-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It would be most useful to add "dmsetup ls --tree" to the commands run. This command helps in answering the question "which devices are actually underneath a given LV?" Although the info is available with other existing dmsetup commands, adding this command gives a much clearer summary of complex setups. Here's an example of an LVM mirror, with mirror images on partitions created on top of multipath devices. The multipath devices are on simple block devices. As you can see, it is easy to see the stacking from the "dmsetup ls --tree" output: vgmpathtest-lvmpathmir (253:14) ├─vgmpathtest-lvmpathmir_mimage_1 (253:13) │ └─mpath5p1 (253:5) │ └─mpath5 (253:2) │ ├─ (8:16) │ └─ (8:0) ├─vgmpathtest-lvmpathmir_mimage_0 (253:12) │ └─mpath6p1 (253:6) │ └─mpath6 (253:3) │ ├─ (8:48) │ └─ (8:32) └─vgmpathtest-lvmpathmir_mlog (253:11) └─mpath7 (253:4) ├─ (8:80) └─ (8:64) VolGroup00-LogVol01 (253:1) └─ (202:2) vgtest-lvmir (253:10) ├─vgtest-lvmir_mimage_1 (253:9) │ └─ (7:1) ├─vgtest-lvmir_mimage_0 (253:8) │ └─ (7:0) └─vgtest-lvmir_mlog (253:7) └─ (7:3) VolGroup00-LogVol00 (253:0) └─ (202:2) But it is much harder to see the stacking with only the commands today ("dmsetup info", "dmsetup status", and "dmsetup table"). We could piece together the stacking from "dmsetup table" but it requires further processing (take output from "dmsetup info to get map name to major/minor, then parse "dmsetup table", etc).
* Fix bug 632681: cmirrord shouldn't fail 'start' if already startedJonathan Earl Brassow2011-01-041-0/+1
| | | | | | | Return 0 from the cmirrord init script if the daemon is already running. http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
* Add date configurable variable DATEZdenek Kabelac2010-11-111-2/+4
| | | | | Follow the rule to run every command through variable dereference. Add a runtime check of translated date to seconds.
* fsadm fix for downsize of unmounted fsZdenek Kabelac2010-11-101-9/+52
| | | | | | | | | | | | | | | | | Fix for the last commit as $MOUNTED is not only used as bool flag, but also store mounted location for remount - so parsing output from mount differently then from /proc/mounts. Prefix calls of 'tunefs' tools with LANG=C to be sure we always do get some nonlocalized strings. Avoid using forced 'resize2fs' for cleanly unmounted filesystems and run regular fsck -f for this case as required by resize2fs. 'fsadm check' uses date difference for extX filesystems between the last mount and last check of 'fsck -f' execution and if the mount was later run 'fsck' with -f so resize2fs is happy and user does not need to pass '-f' flag.
* Scan also 'mount' output for mounted filesystem.Zdenek Kabelac2010-11-101-0/+4
| | | | | | | | | | | | | | | As util-linux package seems to give all the time different names, try harder to figure out, where is the given lv possible mounted and scan /proc/mounts and if not found there, test also 'mount' output. /dev/dm-xxx /dev/mapper/vg-lv /dev/vg/lv All of them could be used different combination in /proc/mount and mount output. Patch fixes regression for older systems where new detection code failed to find valid combination.
* Add OCF supportZdenek Kabelac2010-11-052-1/+291
| | | | | | | | | | | | Updated patch from Florian Haas from Linux-HA project. User needs to 'configure --enable-ocf' to get file installed by 'make install' target by default. User can also use 'make install_ocf' to get only ocf files installed. With disabled (default) ocf support - no ocf files are installed. FIXME: ocf installation path needs to be kept in sync with pacemaker. find better way and possible also better location.
* Add given user prefix to make target install_initscriptsZdenek Kabelac2010-11-051-4/+4
| | | | | | | Avoid files to be written into the live system if lvm was configured with different --prefix. Use initdir for install target path.
* Return different status code for fsadm check of mounted filesystemZdenek Kabelac2010-11-011-2/+12
| | | | | | | | Return status code 3 for fsadm check of mounted filesystem - used later with lvresize update patch to better support online filesystem resize. Also makes a more consistent user interruption and returns status code 2 in this case.
* Add support for noninterctive shell executionZdenek Kabelac2010-10-081-1/+5
| | | | | | Try to distinguish between the case of using interactive shell and non interactive running - different combinations of '-y' and '-p' option needs to be used for fsck.
* Fix usage of --yes flag for ReiserFS resizeZdenek Kabelac2010-10-081-1/+1
| | | | Put 'dry' before resize command - using dry for echo had no use.
* Fix detection of mounted filesystem.Zdenek Kabelac2010-10-081-7/+21
| | | | | | | | | | | | | Update the way how fsadm detects mounted filesystem. With udev /dev/dm-XXX paths are now returned - but mount or /proc/mounts prints names in form of /dev/mapper/vg-lv - so the match was not found. Fixex RHBZ #638050. Current solution uses same trick as mount and detects vg-lv name through /sys where available - this should be reasonable safe. Instead of calling mount without parameter to get actual mount table, switch to use /proc/mounts directly.
* Fix assignment of default LVM variableZdenek Kabelac2010-10-081-1/+1
| | | | | Fix a typo which does not work in case LVM_BINARY is empty string. Using proper :- syntax.
* Support for passing --yes flag recursively.Zdenek Kabelac2010-10-081-1/+3
|
* Correctly respect --dry-run option for fsadmZdenek Kabelac2010-10-081-4/+7
| | | | | | | | Fix missing 'dry' execution of lvresize - fixing problem where resize command were 'dry-run' executed - but lvresize has been executed for real. Also adapt code slightly to support better recursive execution of fsadm through lvresize call.
* Fix a serious bug in the behavior of fasdm tool when breaked.Zdenek Kabelac2010-10-081-2/+3
| | | | | | | | | Under certain conditions it was possible to break (^C) fsadm before actually resizing filesystem, but lvresize which executed fsadm will think resize was succesful and shrinks partitions with unresized filesystem on it. Fix by returning error (1) for this case - this stops lvresize from futher proceding in resize operation.
* Replace "can not" with "cannot"Zdenek Kabelac2010-10-081-3/+3
|
* Based on auto-detection or user requested cluster managers for clvmd,Fabio M. Di Nitto2010-08-231-2/+2
| | | | | | | | | | set appropriate Required-Start and Required-Stop at configure time. Reorder the checks for user selected cluster managers to match auto detected ones, to be consistent in the output. Add special case for qdiskd that´s started after cman/lock_gulmd for RHEL-4/RHEL-5.
* Fix clvmd init script return code when executed as non-root user.Fabio M. Di Nitto2010-08-121-1/+6
| | | | | | | | | | | | | | | | | | | clvmd daemon itself does the right thing when invoked as non-root, by returning 4. The patch removes the use daemon function from /etc/rc.d/init.d/functions that´s unnecessary and has th bad habit to mask the return codes from the real daemon. Add a simple and generic check to see if clvmd is executed by root or not. Our stop/reload/restart paths in the init script are complex and not all the tools involved in the process are guaranteed to return 4 if executed by non-root against a process that´s running as root (for example kill -TERM will return -1 and parsing the output to catch the error is suboptimal at best). https://bugzilla.redhat.com/show_bug.cgi?id=553381
* Fix clvmd init script statusMilan Broz2010-06-231-5/+6
| | | | | | | | | | | - s/Active clustred VG/clustered VG/ (only LV can be active) - print only active LVs (not all) in status command (In the lvdisplay form /dev/vg/lv.) For now, still use awk (already used in clustered_vgs). https://bugzilla.redhat.com/show_bug.cgi?id=598495
* Fix clvmd initscript restart command to start clvmd if not yet running.Milan Broz2010-06-031-1/+3
|
* Fix scripts/relpath.awk to work with mawkMikulas Patocka2010-05-211-5/+5
| | | | | | | | | | | | | | | | length(array) is specific to GNU awk and doesn't work in mawk. Use a return value of "split" function to indicate array size, this is supported in both gawk and mawk. This patch fixes the following errors during "make install" when mawk is installed as a default awk. mawk: scripts/relpath.awk: line 25: illegal reference to array from mawk: scripts/relpath.awk: line 25: illegal reference to array to mawk: scripts/relpath.awk: line 27: illegal reference to array from mawk: scripts/relpath.awk: line 32: illegal reference to array to Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
* Add make install_initscriptsAlasdair Kergon2010-05-201-0/+11
|
* Install lvmconf script by default.Alasdair Kergon2010-05-202-2/+2
| | | | Remove unnecessary versioned dmeventd plugin symlinks.
* Fix clvmd init script stop function to not deactive non-clustered volume groups.Fabio M. Di Nitto2010-05-171-1/+4
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=592362
* Use /bin/bash for scripts with bashismsZdenek Kabelac2010-05-146-6/+6
|
* pre-releaseAlasdair Kergon2010-04-301-1/+1
|
* change awk pathAlasdair Kergon2010-04-301-1/+1
|
* Add -S command to clvmd, so it can restart itself and stillChristine Caulfield2010-04-201-1/+11
| | | | preserve exlusive LV locks.
* Change daemon lock filename from lvm2_monitor to lvm2-monitor for consistency.Alasdair Kergon2010-04-151-1/+1
|
* Added awk script relpath.awk to calculate relative paths.Zdenek Kabelac2010-04-151-0/+40
|
* touch fileAlasdair Kergon2010-04-141-0/+235
|
* fix broken 'make install' for lvm_dump.shAlasdair Kergon2010-04-141-1/+1
|
* INSTALL rules updatesZdenek Kabelac2010-04-091-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | Patch is inspired by Debian's extra patch. - removes OWNER & GROUP make vars they are parts of INSTALL command. - adds INSTALL_PROGRAM for executable, uses $(INSTALL) - adds INSTALL_DATA for non-executable data, uses ($INSTALL) - adds INSTALL_WDATA for writable non-executable data, uses ($INSTALL) - adds configure option --enable-write_install - to support installatin of writable files used by distribution - replaces usage of ifeq @LIB_SUFFIX@ with $(LIB_SUFFIX) - installs .a files from static builds without executable flag - installs .a files to $(usrlibdir) instead of $(libdir) - installs all static binaries to $(staticdir) - create .so links for devel package in $(usrlibdir) instead of $(libdir) - makes .so and .so.LIB_VERSION files within builddir - removes VERSIONED_SHLIB and created versioned LIB_SHARED automagicaly - install LIB_SHARED via install_lib_shared target - install plugins via install_lib_shared_plugin target - prints whole 'install' command during installation instead of less informative "Installing $(something) $(somewhere)" - install multiple man pages with one INSTALL command - use DISTCLEAN_TARGETS instead of creating multiple distclean targets
* Use vpath instead of VPATH.Zdenek Kabelac2010-04-091-1/+0
| | | | | | | | | | | | | | | Usage of VPATH makes troubles when used within $(builddir). Not only source files are being found through VPATH, but targets as well. (make --debug=v) Thus if user builds the code in $(srcdir) and also in some $(builddir) he gets mangled results as some generated files (i.e. .export.sym) are 'reused' from $(srcdir) instead of $(builddir). This patch switches to use vpath were we could explicitly name suffixes that should be looked via vpath - we must take care, we do not generate files with these suffixes: .c, .in, .po, .exported_symbols