Results 1 to 4 of 4

Thread: How to move Docker data to another disk?

  1. #1

    Question How to move Docker data to another disk?

    I use docker extensively and fear the constant threat of "no space left on device". Using LVM setup my `system` has btrfs. I created and mounted to `system` logical device formatted as ext4 (which might be fail on my side, because docker seems to use btrfs, I mean /var/lib/doker/btrfs). So the idea was to copy data from /var/lib/docker to the directory on the new logical device and replace /var/lib/docker with a link to new folder. This didn't work (Docker complained about btrfs folder) and I reverted the changes.

    What is a proper way to move docker to another volume?

  2. #2

    Default Re: How to move Docker data to another disk?

    And there is another issue with btrfs. Seems that I'm facing problem describes here - docker doesn't clean up subvolumes in btrfs directory even after `docker system prune -a`. So my question extended: how to move docker data to another volume and get turn off its usage of btrfs?

  3. #3

    Default Re: How to move Docker data to another disk?

    Figured that out. First of all `pruned` all docker data (on a descktop PC had to manually clean btrfs folder `btrfs subvolume delete...` ) and enabled overlay2 instead of btrfs for docker. Then moved docker directory to another volume and created in /var/lib a link to its location. Everything works now

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,173
    Blog Entries
    3

    Default Re: How to move Docker data to another disk?

    Thanks. It's great when people solve their own problem. And, better still, you have left some hints for anyone with similar issues.
    openSUSE Leap 15.1; KDE Plasma 5;

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •