- [Instructor] We are here on an Ubuntu host
and this Ubuntu host is running
docker version 1706 enterprise edition.
If we clear our screen,
let's do a docker space info and we'll pipe that to more
and you can see here the storage driver
configured on this host is aufs.
Which is not overlay two,
something we've already looked at in the past.
Aufs is a different storage driver.
As you know there is a number of different options
when it comes to storage drivers.
While the documentation said that Ubuntu
with Enterprise Edition was not supported,
I am going to demonstrate for you
how to change the driver to devicemapper
on this version of Linux with Enterprise edition.
However, just before I push the save button
we're going to abort the changes
and that way, these docker images
that are stored on this host
are not affected by the storage driver change.
So keep that in mind.
When you change your storage driver
all your images on a host will be lost.
You'll no longer be able to use those images.
What you need to do with those images
is run a docker save command
and save those images off
so you can reload them later.
Now, to change our docker storage driver
the first thing we're going to do is to do a
sudo systemctl space stop space docker.
That's going to stop the docker service
and then from there,
let's use sudo with nano to edit
the etc docker daemon dot json file.
And right now we have experimental already in here
what we're going to add is simply storage dash driver
in double quotes and then a colon with devicemapper
again in double quotes.
We'll push control X here to save this,
I'll say yes and let's cat out that etc docker
daemon dot json file.
Of course we have to use sudo
and there you can see we have the storage driver
configured and set to devicemapper.
However, it hasn't taken effect yet
because we still need to start docker with systemctl.
So once you push that enter key right there
and start docker with systemctl
it's going to begin using the new storage driver
which in this case we configured to be devicemapper.
At the same time,
you will lose access to all of your images on this host.
Don't forget about that.
Now in our case, I'd rather not make this change
because I don't want to lose those images.
So let's go ahead and simply reverse what we did.
We'll just take out the storage driver entry here.
Save this file and
restart dockers dn service.
Do a docker version.
Docker info grep storage,
we're back to aufs where we were before
and docker is running.
So that's how you reconfigure your storage driver
to use the devicemapper storage driver.
Don't forget about the prerequisites.
The specific Linux versions and
editions of docker that are supported
or not supported and also,
don't forget about once you configure devicemapper
you still have some more configuration to perform.
Specifically, configuring direct-lvm mode
in production environments.