[DRBD-user] How to unlock on /var/lock/drbd-147-xxx

Yahagi(TGI) yahagi at tgi.co.jp
Thu Jul 4 11:27:47 CEST 2013

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

Dear Lars Ellenberg san

Thanks for your reply !!

Now, drbdadm command is stalled. And the lock is remain.
> Please teach me the way to unlock?
Is your answer "There is none"?
Please teach me the way to remove the lock?
Do I have to reboot the DRBD servers?
Do I have to drbd service restart?
Do I have to remove the lock file, only?
Do I have to execute "drbdadm disconnect <resource name> --force"?


Please teach me Influence on others with execution of this command.
    drbdadm disconnect <resource name> --force


> Hi
> This is Yahagi.
> Now, I use DRBD ver 8.3.15.
> When the network to use DRBD Mirroring was under high stress,
> the drbdadm command “drbdadm disconnect <resource name>” was
> stalled.
> Then, drbdadm sh-status command is can not run by lock
> (/var/lock/drbd-147-12).
> I try to kill the process that executed the drbdadm command.
> Ant it is killed. But, I can not unlock.
> Please teach me the way to unlock?

There is none (but killing the process that holds the lock).

A graceful (not --forced) drbd disconnect usually waits until all
pending requests are done.
If your network is seriously congested, that may take a while.
Especially if you use DRBD protocol A.

So if you want to disconnect *right now*, use "--force".

Note that if a non-forced disconnect is pending,
an additional --forced one has to wait as well ...

If all else fails, you could also cut the tcp connection,
using iptables or other tools...

> - Log ----------------------------
> root# drbdadm sh-status
> _drbd_version=8.3.15
> _drbd_api=88
> _config_file=/etc/drbd.conf
> _stacked_on=
> _stacked_on_device=
> _stacked_on_minor=
> lock on /var/lock/drbd-147-12 currently held by pid:6719
> Command 'drbdsetup 12 sh-status' terminated with exit code 20
> command sh-status exited with code 20
> root# ps augxw | grep 6719
> root      6719  0.0  0.0   4112   652 ?        S    Jun28   0:01 drbdsetup
> 12 disconnect
> ---------------------------------------------------------- 

More information about the drbd-user mailing list