Docker Community Forums

Share and learn in the Docker community.

Move containers / images to another drive (Rhel)

docker

(Anasskeddo) #1

Hello,

My first time on docker and we are now using it for our production environnement, after creating, testing, and setuping all containers we discovered that the VM we are using has 2 partitions (SDA1 with 50 go for system and SDB1 with 200 go) so i need to move all containers/images and future ones to SDB1.

What is the safest and best way to do so ?

System : Red Hat Enterprise Linux Server release 7.4 (Maipo)
Docker version : Docker version 17.09.0-ce

Since we are in production we cannot get in trouble with the procedure :slight_smile:

Thank you


(Mohanrajdocker) #2

you can change the data root directory, “–data-root=”. But before that you have take backup of all images and containers. You will lose all running container.


(Anasskeddo) #3

Hello,

Can you please be more explicit, any example for that ? i already have containers running, so do i have to stop containers, export them…

Is there any detailed proceddure for that purpose ?

Thank you