docker - prepare for update to omv3 --> change storage driver to btrfs

    • OMV 0.2
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • docker - prepare for update to omv3 --> change storage driver to btrfs

      Hello,

      I wanted to prepare my running system for upgrade to omv3.

      I have a running docker system with storage-driver aufs.
      Due to the non existing aufs driver in newer backport-kernels in jessie I want to switch my docker to btrfs.

      Therefor I prepared a btrfs formated partition and created a shared folder on it.

      Stopping and deleting or loosing all running container and images is no problem, i have a backup or can rebuild them by scripts.

      What is the best way to change to btrfs?

      1. Stopping all running container
      2. Change the shared folder in the Openmediavault WebInterface
      3. Stop docker service
      4. Change storagedriver in /etc/default/docker
      5. Start docker service
      6. Restore all images and container
      I already tried steps 1 and 2, but nothing happened to the shared folder setting. Also after a reboot docker runs with the old folder

      Is there something else i forgot?

      Kind regards
      Sven
    • der-brumm-baer wrote:

      Stopping all running container

      Change the shared folder in the Openmediavault WebInterface

      Stop docker service

      Change storagedriver in /etc/default/docker

      Start docker service

      Restore all images and container

      Changing storage driver you will loose all images and containers. So you need to save/export them as tared files. Plenty of documentation around for that.


      For the storage driver I've always used btrfs, so i don't know about the swap. I don't use the shared folder function in the UI
      I use a symlink. So with the service stopped I delete the /var/lib/docker folder, then create the symlink

      Source Code

      1. root@nb:~ # stat /var/lib/docker
      2. File: ‘/var/lib/docker’ -> ‘/media/dd703d81-9006-411d-a256-587ac3260154/docker’
      3. Size: 50 Blocks: 8 IO Block: 4096 symbolic link
      4. Device: 16h/22d Inode: 1547850 Links: 1
      5. Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
      6. Access: 2016-08-27 00:25:55.949731792 +1000
      7. Modify: 2016-08-27 00:25:55.949731792 +1000
      8. Change: 2016-08-27 00:25:55.949731792 +1000
      9. Birth: -
      10. root@nb:~ #

      Make sure dd703d81-9006-411d-a256-587ac3260154 is a btrfs disk, and docker folder is empty. Starting the docker-engine should give you now the new storage driver. Check with btrfs info
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10
      telegram.me/openmediavault broadcast channel
      openmediavault discord server
    • Hallo,

      Thank you for your help.

      But I give my steps another try, and stopping the docker service before changing the directory did the job.

      1. Stopping all running container
      2. Export all Container and Images ( if needed )
      3. Stop docker service on the console
      4. Change the shared folder in the Openmediavault WebInterface
      5. Change storagedriver in /etc/default/docker (not needed, after reboot docker detects the BTRFS File System
      6. Reboot
      7. Restore all images and container