We have DRBD volumes shared between 2 servers. There is typically a filesystem directly on each volume rather than stacked LVM etc. On a server with a DRBD volume as primary, how do I tell if it is in use or not? I can tell if it is mounted directly using e.g. /proc/mounts, but there may also be e.g. a XEN VM using the volume.
I can run drbdadm secondary and see if it errors with "Device is held open by someone". Is there any way to tell without actually making the device secondary?
A bonus would be to tell how many processes have the device open (OK, there should only ever be 1, but...), and to identify what holds it open.