[DRBD-user] State change failed: Device is held open by someone

Satyajit Paul satyajit.paul at aricent.com
Tue Mar 12 16:51:00 CET 2013

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


Lars,

As suggested by you, I have changed the datatype of open_cnt variable to atomic_t in drbd_int.h and made the corresponding changes in the drbd_main.c file.
After doing the changes, I build the "drbd.ko" exe and replaced the old drbd.ko with new drbd.ko exe in the testing machine.

Please let me know if I need to make any other exe apart  from "drbd.ko" exe.

Thanks in anticipation.

Thanks & Regards,
Satyajit Paul
Software Engineer
India
________________________________________
From: drbd-user-bounces at lists.linbit.com [drbd-user-bounces at lists.linbit.com] On Behalf Of Lars Ellenberg [lars.ellenberg at linbit.com]
Sent: Monday, March 11, 2013 3:22 PM
To: drbd-user at lists.linbit.com
Subject: Re: [DRBD-user] State change failed: Device is held open by someone

On Sat, Mar 09, 2013 at 08:55:42PM +0530, Satyajit Paul wrote:
> Hello Lars,
>
> Thanks for the reply.
>
> Can you please share some thoughts, in case of drbd_open() function,
> locking/unlocking is explicitly invoked and incase of drbd_close()
> function, it is not invoked explicitly ?

>>
>> The lock is there to avoid races between looking/changing state.

Again:

Lock is there to avoid a state change between looking at the state,
deciding if or not the open shall be successful, and incrementing the
count.  Not to serialize open, as that is already serialized in upper
layers somewhere.

>>
>> See also:
>> http://www.gossamer-threads.com/lists/drbd/users/17007?do=post_view_threaded
>> This has come up so many times, really...
>>
>> and if all else fails, and you really did not overlook some
>> devicemapper or other user,
>> I maintain it is *udev* *udev* *udev*, some short lived blkid or other
>> funky thing that looks at the device right when you want to demote it..
>>
>> But feel free to change that to an atomic_t, if you think it helps.

--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed
_______________________________________________
drbd-user mailing list
drbd-user at lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user




===============================================================================
Please refer to http://www.aricent.com/legal/email_disclaimer.html
for important disclosures regarding this electronic communication.
===============================================================================



More information about the drbd-user mailing list