Which device is using this logical volume?

Use lsof(8):

# lsof /dev/vg_service1/lv_home

I don't have access to a Linux box at this very moment to verify its output, but here's what it looks like on my Mac:

# lsof /dev/disk1 | head
COMMAND    PID           USER   FD   TYPE DEVICE  SIZE/OFF    NODE NAME
launchd      1           root  cwd    DIR   14,4      1564       2 /
launchd      1           root  txt    REG   14,4    415248 7402611 /sbin/launchd
launchd      1           root  txt    REG   14,4     59504 7399166 /usr/lib/libauditd.0.dylib
launchd      1           root  txt    REG   14,4    599232 7402371 /usr/lib/dyld
launchd      1           root  txt    REG   14,4 289054720 8865364 /private/var/db/dyld/dyld_shared_cache_x86_64
launchd      1           root   20r   DIR   14,4       170 7402529 /private/var/tmp
launchd      1           root   24r   REG   14,4         0 9885226 /private/var/run/socketfilterfw.launchd
launchd      1           root   25r   DIR   14,4      2040 7393527 /private/var/db

You should see something similar on your system.


It turned out that the logical volume was itself part of a volume group. It didn't show up in /proc/mounts or in the output of lsof. The only way I was able to discover this was through the "pvdisplay" command, where it appeared as a physical volume:

# pvdisplay 

...

  --- Physical volume ---
  PV Name               /dev/vg_service1/lv_home
  VG Name               nova-volumes
  PV Size               179.91 GiB / not usable 4.00 MiB
  ...

Tags:

Rhel

Lvm