summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Use $(top_builddir) for inclusion of make.tmpl in Makefiles.Zdenek Kabelac2010-03-041-1/+1
|
* - fix whitespaces all over (tabs/spaces)Fabio M. Di Nitto2010-02-261-98/+123
| | | | | | | | | | | | | | | - increase timeout to 30 secs (on Chrissie request) - source both cluster and clvmd for options (like all the other cluster init scripts) - add clustered_vgs and _lvs commodity fns - move rh_status* fns at the top, so they can be reused - heavily cleanup start and stop fns from redundant code and unnecessary loops - improve output from different operations - make the init script lsb compliant - don´t force kill of the daemon, send only a TERM signal and then wait for it to exit - Resolves rhbz#533247
* Fix syntax error in cmirror init scriptMilan Broz2010-01-221-6/+3
| | | | | | - break cannot be used here - remove CLVMDOPTS - add echo to stop call
* And more fixes for cmirror build.Alasdair Kergon2010-01-192-40/+45
|
* Use tabs, not spaces.Jonathan Earl Brassow2010-01-151-47/+47
|
* Initial version of the cmirrord init scriptJonathan Earl Brassow2010-01-151-0/+104
| | | | Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
* Add a [--poll {y|n}] flag to vgchange and lvchange to control whetherMike Snitzer2010-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | the background polldaemon is allowed to start. It can be used standalone or in conjunction with --refresh or --available y. Control over when the background polldaemon starts will be particularly important for snapshot-merge of a root filesystem. Dracut will be updated to activate all LVs with: --poll n The lvm2-monitor initscript will start polling with: --poll y NOTE: Because we currently have no way of knowing if a background polldaemon is active for a given LV the following limitations exist and have been deemed acceptable: 1) it is not possible to stop an active polldaemon; so the lvm2-monitor initscript doesn't stop running polldaemon(s) 2) redundant polldaemon instances will be started for all specified LVs if vgchange or lvchange are repeatedly used with '--poll y' Signed-off-by: Mike Snitzer <snitzer@redhat.com>
* Use locking_type 3 (compiled in cluster locking) in lvmconf.Milan Broz2009-11-272-25/+287
|
* Allow for a build directory separate from the source.Alasdair Kergon2009-10-021-4/+5
|
* drop -ing suffixAlasdair Kergon2009-09-161-2/+2
|
* Update lvm2_monitoring script.Alasdair Kergon2009-09-162-1/+120
|
* Various vgimportclone fixes:Mike Snitzer2009-06-171-10/+42
| | | | | | | | | | | - validate the specified device is a PV and that it is in a VG - automatically enable DEBUG (-d) if >= 4 -v instances were supplied - preserve TMP_LVM_SYSTEM_DIR if it contains an lvm.conf and -d was specified - fix handling of special-case where PV is listed as "unknown device" - more descriptive error when a PV is missing ("unknown device") - unset LVM_SYSTEM_DIR if it was not originally set - skip final vgscan if no changes were made
* Use 'lvm lvresize' instead of 'lvresize' in fsadm.Zdenek Kabelac2009-06-091-7/+13
| | | | Do not use '-n' realine option in fsadm for busybox compatiblity.
* Fix 'service-default-enabled' rpmlint in clvmd initscriptMike Snitzer2009-05-291-1/+1
|
* Fix rpmlint in clvmd initscriptMike Snitzer2009-05-291-3/+26
| | | | | | Added missing LSB stanza lines. Added reload capability. Remaining warning (incoherent-init-script-name) is not relevant.
* Add vgimportclone and install it and the man page by default.Mike Snitzer2009-05-142-0/+336
|
* Fix previous commit (scripts/Makefile targets order)Milan Broz2009-05-111-2/+2
|