[PVE-User] rbd lock list -- how to track down to client?

Alwin Antreich a.antreich at proxmox.com
Tue Apr 30 13:50:20 CEST 2019


On Tue, Apr 30, 2019 at 03:12:58PM +0700, Igor Podlesny wrote:
> On Tue, 30 Apr 2019 at 15:02, Alwin Antreich <a.antreich at proxmox.com> wrote:
> [...]
> > > > $ rbd lock list cassandra
> > > >
> > > > There is 1 exclusive lock on this image.
> > > > Locker       ID                         Address
> > > > client.10197 kubelet_lock_magic_nodebr0 10.0.2.5:0/1005447
> > >
> > > How would one find out what's using it?
> > > The only clear item is IP address (and port number is indicated as "0"
> > > which isn't any helpful), but obviously host can have tons of RBD
> > > clients running as well.
> > >
> > > Can 10197 or 1005447 give any cue?
> > > Also, with Proxmox KVM ID looks as "auto" followed by rather big
> > > integer. Can it be used for such tracking?
> 
> > Once you have the client, you connect to it run a 'rbd showmapped' to
> > see which rbd device is mapped to which image.
> 
> Obviously
> won't
> work -- if RBD's client is a running instance (aka process) of /usr/bin/kvm.
True, with 'kubelet' I was mistakenly thinking about containers. ;)

> 
> Moreover, it might be the case that one did check with qemu monitor's
> "info block" all the running instances and didn't find references to
> image in question.
> 
> So I'm looking for bullet proof and better direct way to use info
> given by "rbd lock list". Guesswork takes too much time and efforts.
With normal operation a RBD image is used by the VM with the same ID in
its name. So when the KVM process with the ID isn't running anymore on
the client shown by 'rbd lock list'
(eg. '/usr/bin/kvm -id 100 -name testVM' ...), then the lock should be
old.

And yes, with the qemu 'info block' you can verify if a kvm process is
using the image, irregardless of the VMID. On a default Proxmox VE setup
there is no other client besides KVM, that uses librbd to connect to the
RBD images.

--
Cheers,
Alwin




More information about the pve-user mailing list