DRBD Error: “Device is held open by someone”

I’ve seen a lot of people posting about this problem but it is very hard to find a good resolution.  Here is what the error will typically look like:

filer1:~# drbdadm secondary r0
/dev/drbd0: State change failed: (-12) Device is held open by someone
Command 'drbdsetup 1 secondary' terminated with exit code 11

You will typically run into this scenario when attempting to force a DRBD primary node into a secondary status for testing or manual failover purposes.  This is a common task.  This error could, in some cases, be triggered by a process that is attempting to use the device in question.  But I find this to be rather unlikely.

With DRBD, most people are running Linux’ LVM volume manager on top of DRBD.  LVM, if still active, will keep DRBD from moving into a secondary mode.  If we know this then the problem is easy to solve.  The vgchange command will allow us to deactivate the volume group in question so that DRBD can successfully change the state of the system.  The “-an” option is used for this.

vgchange -an /dev/drbd0

Most likely this will resolve your error. Obviously use your own volume group name.

June 4, 2011: Happy 65th Dad!

Medifast Status: Day 33, Down ~22lbs

Today is my dad’s sixty-fifth birthday.

The big move was moving the television from the fireplace into the girls’ playroom (aka “the den”, aka “the dining room.”)  Having the television in the living room has been driving me crazy.  It makes the house look awful and it causes that large, main section of the house to become Liesl’s playroom which is a bit of a disaster.  Her toys end up sprawling all over the house and it is all that anyone ever sees when they look at our home.

Getting the television and a bit of the furniture moved into the playroom (which we did the other day) really makes the living room feel open and clean (or cleaner, anyway.)  There is lots of room to move around now and the house feels much more open and bigger.  It also causes us to really use a room that we have never spent time in before now.  It’s kind of like getting a free room.

We really have shifted our usage patterns in our house pretty significantly from when we first moved in.  It used to be that I worked from the back bedroom as my makeshift office and we would watch Netflix from our bedroom – all in the “private” wing of the house.  Then we moved to the living room (middle of the house) for entertainment.  Then my office was completed and I started working out of the new office at the far extreme point of the house from the “old” office.  Now we have shifted our entertainment area from the middle of the house to being right next to the new office.  So we have shifted completely from using the south side of the house to the north.

We did a bit of redding up as well as Liesl’s sprawling disaster needed to be handled.  What a mess the living room turns into practically overnight.  It is amazing.  She loves to just take every container of toys that she owns and empty it all over the living room and the play room – not to mention her bedroom and ours as well and sometimes our bathroom.

June 3, 2011: Late Day

Medifast Status: Day 32, Down ~22lbs

It was a long day at work and it was around eight thirty when I finally arrived at home.  Friday nights are rough.  The day just never ends.

I got home and immediately got hit with a tough Windows administration problem that has been plaguing Grey for weeks.  So I spent an hour or two looking at Windows / NTFS drive issues with him.  But we did manage to get things resolved so that he was able to go home for the evening.

It was around ten when I was finally to the point where I could relax with the girls.  At least tomorrow is Saturday.

June 2, 2011: Slow and Steady

Medifast Status: Day 31, Down ~22lbs

A mostly quiet day.  Still working hard to catch up on the site.  I’ve made up over a week on the site in the last day or so and am working hard to get back on top.  Will take a little while, though.  Doing one post a day is hard.  Doing them when they are behind is really, really hard.

Phone conference this evening.  Boy are my days busy.  Little time to relax after that tonight.  It was a long day.

The Medifast continues to work.  Slow and steady at this point.  Keeping up a continuous loss is tough but it is working.

June 1, 2011: Big Meeting at the House

Medifast Status: Day 30, Down 21.5lbs

My first month of Medifast is over and I am felling quite well.  Twenty one and a half pounds is not too shabby at all.  It’s not all that visible and I don’t feel all that different but knowing that I am down that much feels pretty good.  I am losing fast enough that it is providing motivation to stick with it.

I got stuck at work today and was not able to come home for lunch to help Dominica clean like I was supposed to have done.  I got in a bit of trouble for that.  It was a really busy day at the office and I was just unable to get away.

This evening after work Nicki and I drove up to the house and I set to hooking up a laptop to the television as quickly as possible.  I did what little cleaning and setup that I could but it was a rush to get anything done.

We got the laptop hooked up in the living room so that we could use the television for viewing a WebEx demonstration which worked out really well.  The real challenge was not in getting the image to the television (that’s just a VGA cable) but in getting sound which I had not thought about until the last second.  Oops. But I brought in my powered speakers and hooked them up and it was fine.

Maggie came over a little later.  Watson was going to come over, but it was too long of a drive for him to make it all of the way to Carrollton after being at the office all day.  So he watched from home.  I watched from my office.

We had soda and pizza at the house.  This is definitely the way to watch technical training.  A couch, big screen television, pizza… once again an opportunity for pizza that I cannot take advantage of because I am on Medifast.  I am feeling like I am cursed as to the timing of this.

The WebEx was about two hours long and a little exhausting and then I had the phone ringing constantly as soon as it was done.  It was a big rush to get out the door and drive Nicki home.

It was a long and late night for me.  And then we got to clean up after it was all done.  But it went well and we had a good time.