Do I need to stop the docker service before a reboot?


Recommended Posts

I needed to reboot my machine yesterday so I stopped all my dockers and then tried to stop the array.  It got stuck

trying to umount the drives.  It was stuck trying to unmount the drive that my docker image was on.

I couldn't find any browser or telnet session that was using or pointing to any docker image files.

I ended up having to force a reboot from the console.

Luckily I was able to restart my dockers on a reboot with no issues.

 

I couldn't find any info in the FAQ..  

So what is the proper way to shutdown/reboot when using dockers?

Do I need to manually stop the dockers and then stop the docker service?

Or if I stop the array will it do everything for me?

 

This will also come into play in a power failure scenario. Will the system shutdown cleanly when the battery gets low.

 

Thanks,

 

Jim

 

Link to comment

You don't need to stop the service before rebooting / shutting down / power failure.

 

There are some circumstances however where any application can hang the umount process.  Most commonly is having a SSH session with the current directory set to something within /mnt/

Link to comment

Thanks, Squid!

Is there a post somewhere that outlines how to find the offending process that's keeping the drive from being unmounted?

I tried the the lsof command but I couldn't figure out what I needed to kill.

I'm pretty sure it was something accessing something that was mounted from the docker image.

 

Jim

Edited by jbuszkie
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.