mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
polldaemon: Re-initialise lvmcache properly on fork (fixes RHBZ 1073670).
This commit is contained in:
parent
2f279797f5
commit
f12ee43f2e
24
test/shell/pvmove-background.sh
Normal file
24
test/shell/pvmove-background.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing to use,
|
||||
# modify, copy, or redistribute it subject to the terms and conditions
|
||||
# of the GNU General Public License v.2.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
# Check pvmove behavior when it's progress and machine is rebooted
|
||||
|
||||
. lib/test
|
||||
|
||||
aux prepare_vg 3
|
||||
|
||||
lvcreate -l1 -n $lv1 $vg "$dev1"
|
||||
|
||||
lvs -o +devices | grep $dev1
|
||||
pvmove -i 1 -b "$dev1" "$dev2"
|
||||
sleep 5 # arbitrary...
|
||||
lvs -o +devices | not grep "pvmove"
|
||||
lvs -o +devices | grep "$dev2"
|
@ -91,6 +91,7 @@ int become_daemon(struct cmd_context *cmd, int skip_lvm)
|
||||
strncpy(*cmd->argv, "(lvm2)", strlen(*cmd->argv));
|
||||
|
||||
if (!skip_lvm) {
|
||||
lvmcache_destroy(cmd, 1);
|
||||
reset_locking();
|
||||
if (!lvmcache_init())
|
||||
/* FIXME Clean up properly here */
|
||||
|
Loading…
x
Reference in New Issue
Block a user