1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/scripts/blk_availability_init_red_hat.in
Peter Rajnoha 42e76a1920 blkdeactivate: add -m|--mpathoption disablequeueing and use it for blk-availability systemd service and initscript
blkdeactivate -m disablequeueing causes "multipathd disablequeueing maps"
call inside blkdeactivate script before deactivating devices. This
avoids a situation where blkdeactivate may wait for paths to appear if
multipath is set to queueing and there's a stack of other devices and/or
mount points on top of such multipath device.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1344381.
2016-07-12 10:01:07 +02:00

59 lines
1.3 KiB
Bash

#!/bin/bash
#
# Copyright (C) 2012 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# This file is part of LVM2.
# It is required for the proper handling of failures of LVM2 mirror
# devices that were created using the -m option of lvcreate.
#
#
# chkconfig: 12345 25 75
# description: Controls availability of block devices
#
# For Red-Hat-based distributions such as Fedora, RHEL, CentOS.
#
### BEGIN INIT INFO
# Provides: blk-availability
# Required-Start:
# Required-Stop:
# Default-Start: 1 2 3 4 5
# Default-Stop: 0 6
# Short-Description: Availability of block devices
### END INIT INFO
. /etc/init.d/functions
sbindir=@sbindir@
script=blkdeactivate
options="-u -l wholevg -m disablequeueing"
LOCK_FILE="/var/lock/subsys/blk-availability"
rtrn=1
case "$1" in
start)
touch $LOCK_FILE
;;
stop)
action "Stopping block device availability:" $sbindir/$script $options
rm -f $LOCK_FILE
;;
status)
;;
*)
echo $"Usage: $0 {start|stop|status}"
;;
esac