summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* systemd: depend on systemd-udev-settle unit in activation unitHEADmasterPeter Rajnoha2012-09-121-2/+2
| | | | | | | | | | | The "fedora-wait-storage.service" that the "lvm2-activation.service" had as a dependency (which was fedora-specific solution anyway) is obsolete now as this unit called "modprobe scsi_wait_scan" which is not used anymore. The "fedora-wait-storage.service" had "systemd-udev-settle" as its dependency, so let's depend on this one directly now, bypassing the out-dated "fedora-wait-storage.service".
* cleanup: ignore write/close outputZdenek Kabelac2012-08-231-2/+2
| | | | Intentionaly ignore write and close errors.
* make: fix make in scripts dir for --disable-applibPeter Rajnoha2012-08-011-5/+14
|
* systemd: O_CLOEXEC not needed in activation generatorPeter Rajnoha2012-08-011-1/+1
| | | | | O_CLOEXEC not actually needed, this is just a simple program, it is not supposed to fork/exec anywhere and anytime in the future.
* make: use proper libs to make scripts subdirPeter Rajnoha2012-08-011-1/+6
|
* systemd: integrate lvm2 activation generator with conf+makePeter Rajnoha2012-07-311-6/+20
|
* systemd: add lvm2 activation generatorPeter Rajnoha2012-07-311-0/+169
| | | | | | | | | | | | | | | | | | | | The lvm2 activation generator generates systemd units conditionally based on the global/use_lvmetad lvm.conf setting. If use_lvmetad=0, the lvm2-activation-early.service and lvm2-activation.service units will be generated. These units are responsible for direct volume activation by calling "vgchange -aay --sysinit" (this is actually the original on-boot activation as it was used before). If use_lvmetad=1, no units will be generated as we're relying on autoactivation. Important thing to note is that the lvm2-activation units normally bring in the udev-settle ("storage-wait") service that waits for udev to settle (with block devices). We don't need this if lvmetad is used in conjunction with autoactivation feature... but systemd units can't be enabled or disabled (or dependencies added/removed) dynamically based on external configuration. Therefore, we need the unit generator which adds support for such situations: the units as a whole either exist or not based on the external configuration.
* systemd: ensure monitoring is handled after lvmetadPeter Rajnoha2012-07-261-1/+1
| | | | | | | Monitoring is handled using "vgchange --monitor" call. Ensure that lvmetad is up and running at the time of this call to prevent any fallback to direct scan within the vgchange. The same applies for shutdown sequence but the other way round - switch monitoring off and lvmetad afterwards.
* systemd: add doc reference in dm-event.socketPeter Rajnoha2012-06-291-0/+1
|
* initscript: call vgchange -aay instead of -alyPeter Rajnoha2012-06-281-1/+1
| | | | | | | | | | | The clmvd init script called "vgchange -aly" before to activate all VGs in cluster environment. This activated all VGs, no matter if it was clustered or not. Auto activation for clustered VGs is not supported yet so the behaviour of -aay is still the same as before for clustered VGs. However, for non-clustered VGs, we need to check with the activation/auto_activation_volume_list whether the VG/LV should be activated on boot or not.
* configure: run directory configuration cleanupPeter Rajnoha2012-06-274-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were several hard-coded values for run directory around the code. Also, some tools are DM specific only, others are LVM specific and there was no distinction made here before. With this patch applied, we have this cleaned up a bit (subsystem in brackets, defaults in parentheses): [common] configurable PID_DIR (/var/run) lvm [lvm] configurable RUN_DIR (/var/run/lvm) configurable locking dir (/var/lock/lvm) clvmd [lvm] configurable pid file (PID_DIR/clvmd.pid) socket (RUN_DIR/clvmd.sock) lvmetad [lvm] configurable pid file (PID_DIR/lvmetad.pid) socket (RUN_DIR/lvmetad.socket) dm [dm] configurable DM_RUN_DIR (/var/run) cmirrord [dm] configurable pid file (PID_DIR/cmirrord.pid) dmeventd [dm] configurable pid file (PID_DIR/dmeventd.pid) server fifo (DM_RUN_DIR/dmeventd-server) client fifo (DM_RUN_DIR/dmeventd-client) The changes briefly: - added configure --with-default-pid-dir - added configure --with-default-dm-run-dir - added configure --with-lvmetad-pidfile - by default, using one common pid directory for everything (only lvmetad was not following this before)
* systemd: Add Documentation referencesPeter Rajnoha2012-06-205-0/+5
| | | | These documentation references show up in "systemctl status" output.
* More .gitignore files for an in-source-tree build.Alasdair G Kergon2012-06-081-0/+9
| | | | Tell git to ignore files generated by a build inside the source tree.
* Add .gitignore files for an in-source-tree build.Alasdair G Kergon2012-06-081-0/+2
| | | | Tell git to ignore files generated by a build inside the source tree.
* Remove obsolete CVS helper script.Alasdair G Kergon2012-06-071-163/+0
| | | | Remove last_cvs_update.sh now that we're using git.
* .Alasdair Kergon2012-04-191-0/+0
|
* .Alasdair Kergon2012-04-191-235/+0
|
* Add udev info and context to lvmdump.Peter Rajnoha2012-04-181-1/+19
| | | | --------------------------------------------------------------------
* Add a couple new functions to gdbinit file and decode a couple lv->status flagsJonathan Earl Brassow2012-04-101-2/+51
| | | | | | New functions: - seg_pvs: Print a list of PVs in a seg_pvs list - pv_dev_name: print name of a PV
* Use pvscan --cache instead of vgscan in lvmetad init script and systemd unit.Peter Rajnoha2012-03-162-3/+3
|
* Fix string parsingZdenek Kabelac2012-03-161-8/+12
| | | | | | | | | Fix propagation of -e option - pass it via internal shell variable. Fix parsing of /proc/mounts files (don't check for substrings). as reported by O.Mangold with suggested patch: https://www.redhat.com/archives/linux-lvm/2012-February/msg00030.html Properly pass arguments with spaces ("$@") Add validation for YES and EXTOFF variable content.
* Use SD_ACTIVATION env. var. in systemd units to better detect systemd in use.Peter Rajnoha2012-03-142-0/+2
| | | | | | | | LISTEN_PID and LISTEN_FDS environment variables are defined only during systemd "start" action. But we still need to know whether we're activated during "reload" action as well - we use the reload action to call "dmeventd -R"/"lvmetad -R" for statefull daemon restart. We can't use normal "restart" as that is simply composed of "stop" and "start" and we would lose any state the daemon has.
* Add 'Restart: on-abort' for lvmetad systemd service.Peter Rajnoha2012-03-081-0/+1
| | | | | Restart lvmetad automatically if it exits due to reception of uncaught signal, leaving a track in systemd log/syslog.
* LVMetaD socket operates in non-blocking mode.Peter Rajnoha2012-02-281-0/+1
|
* lvmetad.socketPeter Rajnoha2012-02-271-1/+1
|
* Use 'killproc' fn in lvmetad init script (fn provided by 'functions' init ↵Peter Rajnoha2012-02-271-1/+1
| | | | script library).
* Also remove intermediate lvmetad init script file.Peter Rajnoha2012-02-241-1/+1
|
* Use '-p PID_FILE' for the status call since the pidfile is in its own lvm ↵Peter Rajnoha2012-02-241-3/+5
| | | | subdir and return proper status code.
* The daemon as well as the first scan must be both executed properly, ↵Peter Rajnoha2012-02-241-1/+1
| | | | otherwise it's an error!
* Add LVMetaD init script.Peter Rajnoha2012-02-242-0/+116
|
* Use 'd' instead of 'D' in tmpfiles configuration to not overwrite any ↵Peter Rajnoha2012-02-231-2/+2
| | | | | | | existing directory. ...that happens when systemd creates it first (e.g. based on a .socket unit) before the tmpfiles.d content is executed.
* Remove the old systemd socket file, we're using the .in template now.Peter Rajnoha2012-02-231-10/+0
|
* Use DEFAULT_RUN_DIR instead of hardcoded value in lvmetad systemd unitsPeter Rajnoha2012-02-233-2/+14
| | | | | and add ExecStartPost=vgscan to actually run the first scan that will fill the metadata daemon with metadata information.
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-231-0/+1
| | | | lvm.conf *and* lvmetad is running.
* Add LVMetaD systemd units.Peter Rajnoha2012-02-233-0/+29
|
* Install lvm2 monitoring init script and systemd units only if dmeventd is built.Peter Rajnoha2012-02-231-0/+4
|
* Clean intermediate files.Peter Rajnoha2012-02-231-1/+2
|
* Add lvm2 tmpfiles.d configuration file.Peter Rajnoha2012-02-221-0/+2
|
* Add configure --with-tmpfilesdir and lvm2 tmpfiles.d configuration file itself.Peter Rajnoha2012-02-221-0/+4
| | | | | | | | | | | /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'.
* Clean up systemd unit ordering and requirements.Peter Rajnoha2012-02-012-3/+3
|
* Use also normalized output for vgchange command in lvm2-monitor init script.Peter Rajnoha2011-12-162-4/+4
|
* Fix lvm2-monitor init script to use normalized output when using vgs.Peter Rajnoha2011-12-072-4/+4
|
* Move gentoo MAKEDEV to /sbin in lvm2create_initrd. (James Le Cuirot)Alasdair Kergon2011-11-123-51/+60
|
* Add "ExecReload" to dm-event.service for systemd to reload dmeventd properly.Peter Rajnoha2011-10-311-0/+1
| | | | | | | | | | | | | Normally, restart simply means "stop and start" for systemd. However, if we're installing new versions of the dmeventd binary/libdevmapper, we need to restart dmeventd. This fails if we have some devices monitored - we need to call "dmeventd -R" instead. The "ExecReload" did not work quite well in some old versions of systemd, systemd assumed that only the configuration is reloaded on "ExecReload", not the whole binary itself so it lost track of dmeventd daemon (it lost new dmeventd PID). This is fixed and seems to be working fine now with recent versions of dmeventd.
* New handy gdb debugging function, "dm_list_size"Jonathan Earl Brassow2011-09-281-2/+21
| | | | | | Example: (gdb) dm_list_size &split_images 1 list items
* Fix install_ocfZdenek Kabelac2011-09-241-1/+2
| | | | | When builddir is different from srcdir install_ocf: has not been able to find files for installation.
* Add support for DM_DEV_DIRZdenek Kabelac2011-09-191-10/+13
| | | | | Follow other commands support this directory setting. Useful for test suite.
* Add support for non /dev devicesZdenek Kabelac2011-09-191-1/+1
| | | | Since test suite is not using /dev - add support for such dirs into fsadm.
* Support different PATH settingZdenek Kabelac2011-09-191-1/+3
| | | | | | | | | When fsadm is test - it needs to execute lvm and fsadm from non-standard path setting. So adding a support in fsadm script when user set LVM_BINARY, then the lvm command invoced from fsadm will have the same PATH setting as before entering fsadm command. Needed for testing.
* Surround all executed commands with quotesZdenek Kabelac2011-09-191-41/+41
| | | | | | | In case someone would use filename paths with spaces when changing this script surround commands with '"'. With default settings there is no change in behavior.