Bug#413915: lvm-common: stop() function fails when device file is missing -- happens with AoE devices

Glen W. Mabey Glen.Mabey at swri.org
Wed Mar 7 22:36:58 CET 2007


Package: lvm-common
Version: 1.5.20
Severity: normal


I'm working with an LVM that uses AoE block devices as physical volumes.

I've submitted a patch to aoetools to provide support for mounting and
unmounting those filesystems at appropriate times.

In this process, the AoE devices are deactivated before the network
interfaces are taken down.  LVM gets stopped after the network is
stopped, so when '/sbin/vgchange --ignorelockingfailure -a n' gets
called in lvm's init.d script, some of the block devices that it was
aware of no longer exist.

As a solution, I propose performing another vgscan before calling
vgchange.  This seems to appropriately update the logical volumes that
lvm is aware of, before it tries to make them unavailable.


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages lvm-common depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  module-init-tools           3.3-pre4-2   tools for managing Linux kernel mo
ii  modutils                    2.4.27.0-6   Linux module utilities

Versions of packages lvm-common recommends:
ii  logrotate                     3.7.1-3    Log rotation utility

-- no debconf information
-------------- next part --------------
*** /etc/init.d/lvm	2005-08-01 14:49:44.000000000 -0500
--- /mnt/data/Backup/old_system/etc/init.d/lvm	2006-12-28 11:55:57.000000000 -0600
***************
*** 61,66 ****
--- 61,67 ----
  	stop)
  		echo "Shutting down LVM Volume Groups... "
  		if test `/sbin/lvmiopversion` -ge 200 -a -x /lib/lvm-200/lvm; then
+ 			/sbin/vgscan --ignorelockingfailure  # fixes problem associated with LVMs on AoE block devices
  			/sbin/vgchange --ignorelockingfailure -a n
         		else
  			[ -e /etc/lvmtab ] && /sbin/vgchange -a n


More information about the pkg-lvm-maintainers mailing list