Monday, May 28, 2018

Why was this missing?

I've done a pretty good job of making amateur mistakes when I know better.  Modifying an xorg.conf file without making a backup is usually a favorite.  About 15 years ago I would rebuild the box because I didn't know any better.  I think I wrecked a file consistently for years trying to add additional mouse buttons to the configuration.  This time I did something ridiculously stupid.  My container hosts are mostly virtual machines.  I should be able to clone them in a few minutes.  Instead of doing that, I attempted to migrate all persistent storage to a NFS share.  As expected, it failed miserably.  Nothing important was lost, but it stung a little knowing that I had just wrecked something because I didn't even bother to look up the correct method of doing something.

I began my quest for information on the correct way to mount a share and use it for persistent storage.  Unless someone tells me otherwise, it looks like the correct method for a home lab is to install another package to allow NFS mounts in docker.  A package specifically for docker that is not included, and doesn't get the publicity it deserves.  I was quite surprised that it wasn't included on the host image. 

Aggregate 1:
Netshare plugin for docker

Of course the next step is figuring out how to use it.  Fortunately someone already wrote about that.

Aggregate 2:
NFS on a swarm

This is a pretty big deal to me.  There were some things missing in documentation that I figured out from searching around and tinkering, such as the port used for Swarm being blocked by iptables.  The absence of shared storage instructions may have been one of the reasons why my first attempt at creating a service and swarm was a failure.  I don't recall what all failed in that environment, but I do know that the ability to migrate containers with their own persistent data from one host to another should not be an after thought.  For something like the MotionEye container, the shared storage is considerably more important.  A simple NGINX config file is not hard to replace.  Security camera footage causing all containers to fail because the storage filled up is a problem.  That is exactly why I attempted to migrate everything from the local storage to a share.

It might just be the Photon hosts that I use.  So, coming soon, a blog about setting this up in Portainer and using it to create services to deploy to a swarm.

No comments:

Post a Comment

3d design for printing

I don't want to sound like an idiot.  I really don't.  I just lack the patience to learn Blender.  It's not just because the nam...