Bug#774762: try harder to find reasons for failed `lvchange -an` by looking at /proc/*/mountinfo

chrysn chrysn at fsfe.org
Wed Jan 7 10:01:29 UTC 2015


Package: lvm2
Version: 2.02.111-2
Severity: wishlist

when an `lvchange -an ...` fails, lvm tries to give a better reason than
"is currently in use" by looking at /sys/dev/block/.../holders and
/proc/self/mountinfo when --verbose is given.

it was pointed out to me that i could look at /proc/*/mountinfo as well,
and indeed i found `/sbin/cgmanager --daemon-mname=systemd`.

given cgroups are in wide use today, lvm should take its helpfulness a
little further and look at /proc/*/mountinfo as well for possible mount
locations, and display which processes are involved so the user has a
realistic chance to find the holder of the mount.


note that lvm is not the only program that should do that, but the only
program that does *something* like this at all. (before i tried
`lvchange -an`, i originally wanted to fsck the block device or to mount
it somewhere different, and those programs didn't even try to tell me
where the device is mounted). ideally, in my opinion, it should not be
lvm2 to drill down to the reasons of the device being unavailable, but a
generic `who-uses` tool that would then be used or suggested by lvm,
mount or fsck in case of a failure.


-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages lvm2 depends on:
ii  dmeventd                  2:1.02.90-2
ii  dmsetup                   2:1.02.90-2
ii  init-system-helpers       1.22
ii  initscripts               2.88dsf-58
ii  libc6                     2.19-13
ii  libdevmapper-event1.02.1  2:1.02.90-2
ii  libdevmapper1.02.1        2:1.02.90-2
ii  libreadline5              5.2+dfsg-2
ii  libudev1                  215-8
ii  lsb-base                  4.1+Debian13+nmu1

lvm2 recommends no packages.

Versions of packages lvm2 suggests:
pn  thin-provisioning-tools  <none>

-- no debconf information

-- 
To use raw power is to make yourself infinitely vulnerable to greater powers.
  -- Bene Gesserit axiom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20150107/afaaec76/attachment.sig>


More information about the pkg-lvm-maintainers mailing list