1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

163 Commits

Author SHA1 Message Date
Alasdair Kergon
d74afb244b . 2012-04-19 13:47:38 +00:00
Alasdair Kergon
5d048a5e26 . 2012-04-19 13:47:11 +00:00
Peter Rajnoha
0afc1897b2 Add udev info and context to lvmdump.
--------------------------------------------------------------------
2012-04-18 15:26:02 +00:00
Jonathan Earl Brassow
35e728ec8d Add a couple new functions to gdbinit file and decode a couple lv->status flags
New functions:
 - seg_pvs: Print a list of PVs in a seg_pvs list
 - pv_dev_name: print name of a PV
2012-04-10 23:24:00 +00:00
Peter Rajnoha
f4dd47242e Use pvscan --cache instead of vgscan in lvmetad init script and systemd unit. 2012-03-16 15:12:04 +00:00
Zdenek Kabelac
de0e4e755a Fix string parsing
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.
2012-03-16 12:53:05 +00:00
Peter Rajnoha
23a88f868d Use SD_ACTIVATION env. var. in systemd units to better detect systemd in use.
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.
2012-03-14 15:51:51 +00:00
Peter Rajnoha
c2d7d97301 Add 'Restart: on-abort' for lvmetad systemd service.
Restart lvmetad automatically if it exits due to reception of uncaught signal,
leaving a track in systemd log/syslog.
2012-03-08 09:49:09 +00:00
Peter Rajnoha
3db3d4d895 LVMetaD socket operates in non-blocking mode. 2012-02-28 13:07:03 +00:00
Peter Rajnoha
60d0b63380 lvmetad.socket 2012-02-27 15:45:49 +00:00
Peter Rajnoha
460605cf71 Use 'killproc' fn in lvmetad init script (fn provided by 'functions' init script library). 2012-02-27 08:56:46 +00:00
Peter Rajnoha
be5d2c75f3 Also remove intermediate lvmetad init script file. 2012-02-24 15:07:00 +00:00
Peter Rajnoha
dc7d369ad8 Use '-p PID_FILE' for the status call since the pidfile is in its own lvm subdir and return proper status code. 2012-02-24 13:45:37 +00:00
Peter Rajnoha
9a3497dcfa The daemon as well as the first scan must be both executed properly, otherwise it's an error! 2012-02-24 13:11:57 +00:00
Peter Rajnoha
88a898d6cf Add LVMetaD init script. 2012-02-24 13:03:50 +00:00
Peter Rajnoha
9d206272a5 Use 'd' instead of 'D' in tmpfiles configuration to not overwrite any existing directory.
...that happens when systemd creates it first (e.g. based on a .socket unit)
before the tmpfiles.d content is executed.
2012-02-23 14:24:30 +00:00
Peter Rajnoha
0c7a75df32 Remove the old systemd socket file, we're using the .in template now. 2012-02-23 13:39:08 +00:00
Peter Rajnoha
38c2ccf7b8 Use DEFAULT_RUN_DIR instead of hardcoded value in lvmetad systemd units
and add ExecStartPost=vgscan to actually run the first scan that will
fill the metadata daemon with metadata information.
2012-02-23 13:31:49 +00:00
Petr Rockai
002f7a0ce2 The lvmetad client-side integration. Only active when use_lvmetad = 1 is set in
lvm.conf *and* lvmetad is running.
2012-02-23 13:11:07 +00:00
Peter Rajnoha
8acbf570b5 Add LVMetaD systemd units. 2012-02-23 11:24:07 +00:00
Peter Rajnoha
40f111e9b9 Install lvm2 monitoring init script and systemd units only if dmeventd is built. 2012-02-23 11:13:18 +00:00
Peter Rajnoha
7e61f1ef44 Clean intermediate files. 2012-02-23 10:01:12 +00:00
Peter Rajnoha
9a94507884 Add lvm2 tmpfiles.d configuration file. 2012-02-22 18:02:31 +00:00
Peter Rajnoha
73c46fa222 Add configure --with-tmpfilesdir and lvm2 tmpfiles.d configuration file itself.
/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'.
2012-02-22 17:55:10 +00:00
Peter Rajnoha
56f6e9310d Clean up systemd unit ordering and requirements. 2012-02-01 13:08:39 +00:00
Peter Rajnoha
dc1d4e2444 Use also normalized output for vgchange command in lvm2-monitor init script. 2011-12-16 11:42:56 +00:00
Peter Rajnoha
999263f18d Fix lvm2-monitor init script to use normalized output when using vgs. 2011-12-07 12:29:41 +00:00
Alasdair Kergon
b5518cb1ea Move gentoo MAKEDEV to /sbin in lvm2create_initrd. (James Le Cuirot) 2011-11-12 17:03:53 +00:00
Peter Rajnoha
2d603339f1 Add "ExecReload" to dm-event.service for systemd to reload dmeventd properly.
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.
2011-10-31 12:22:49 +00:00
Jonathan Earl Brassow
3016856a4c New handy gdb debugging function, "dm_list_size"
Example:
(gdb) dm_list_size &split_images
1 list items
2011-09-28 16:32:22 +00:00
Zdenek Kabelac
a6791e34ba Fix install_ocf
When builddir is different from srcdir install_ocf: has not been able to find
files for installation.
2011-09-24 21:05:03 +00:00
Zdenek Kabelac
1c088b0a2b Add support for DM_DEV_DIR
Follow other commands support this directory setting.
Useful for test suite.
2011-09-19 19:36:52 +00:00
Zdenek Kabelac
c110bc0154 Add support for non /dev devices
Since test suite is not using /dev - add support for such dirs into fsadm.
2011-09-19 14:52:33 +00:00
Zdenek Kabelac
304c544ce5 Support different PATH setting
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.
2011-09-19 13:51:09 +00:00
Zdenek Kabelac
9ee3f61aee Surround all executed commands with quotes
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.
2011-09-19 13:47:37 +00:00
Zdenek Kabelac
ff9808505b Fix missing '$' in test 2011-09-19 13:43:50 +00:00
Jonathan Earl Brassow
0bab63a818 reorder some status flag printing in gdbinit file. 2011-09-13 13:57:02 +00:00
Jonathan Earl Brassow
61b33c0a0a Adjust gdbinit script to new RAID status flag values. 2011-09-08 22:19:45 +00:00
Zdenek Kabelac
867e4cfffb Replace char class :space: with explicit chars
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.
2011-09-07 08:31:16 +00:00
Jonathan Earl Brassow
985a6a65cb Updates to gdbinit file
1) Add more status flags for printing
2) Fix bug in lv_status_r processing for mirror segment type
2011-09-01 21:01:12 +00:00
Peter Rajnoha
0390acff8c Suppress locking error messages in monitoring init scripts. 2011-08-11 15:27:46 +00:00
Peter Rajnoha
c3f5210734 Configure and makefile changes for newly added systemd unit files. 2011-07-28 12:57:26 +00:00
Peter Rajnoha
5c4c36b135 Add systemd unit files for dmeventd. 2011-07-28 12:54:28 +00:00
Jonathan Earl Brassow
cfafb8a92a RAID updates for gdbinit file 2011-07-01 16:15:25 +00:00
Milan Broz
9e1376e5a1 Use append but except query for dlm locks:-) 2011-06-02 09:08:16 +00:00
Milan Broz
28ba223ca9 Always use append to file in lvmdump (selinux policy - no file truncation).
Workaround dmsetup ls --tree (terminal ioctl for width).
(Until isatty() will be allowed by selinux policy.)
2011-06-02 09:02:03 +00:00
Jonathan Earl Brassow
4497409a31 gdbinit update
When doing lv_status_r on a sub_lv, do not climb the tree up past the
starting point.
2011-03-29 12:53:13 +00:00
Jonathan Earl Brassow
cb385da467 Watch out for collisions in GDB global namespace.
Better 'lv_status_r' printing.
2011-03-14 18:05:56 +00:00
Jonathan Earl Brassow
4366379b3d lv_status_r now prints out status of attached log LVs
(Print layout could be nicer... :(
2011-03-11 22:25:36 +00:00
Jonathan Earl Brassow
876d50dbe2 lv_status_r has been fixed-up so that it supports infinite LV stacking
(It does not yet follow 'log_lv' or 'origin' links.)
2011-03-11 22:16:38 +00:00