6 Replies Latest reply on Jun 5, 2019 7:49 AM by Dude!

    fs-snapshot: error snapshotting /var/lib/docker/btrfs




      I installed docker under OL 7.6 and created a container using the following dockerfile:


      FROM oraclelinux:7

      RUN cd /etc/yum.repos.d && \

          a=https://copr.fedorainfracloud.org && \

          b=coprs/bgstack15/palemoon/repo/epel-6 && \

          c=bgstack15-palemoon-epel-6.repo && \

          curl --remote-name $a/$b/$c && \

          yum -y install palemoon && \

          dbus-uuidgen > /var/lib/dbus/machine-id

      CMD /usr/local/bin/palemoon


      This apparently installed /var/lib/docker....


      I also use BTRFS for root and installed yum-plugin-fs-snapshot from the ol7_optional_latest repository.


      Now when I use yum to install any software, the system automatically creates a yum snapshot, but fails with an error message:



      I can correct the problem modifying /etc/yum/pluginconf.d/fs-snapshot.conf. For example:



      exclude = /u01 /var/lib/docker/btrfs

      enabled = 1

      create_snapshots_in_post = 0


      But what I don't understand is why there isn't the same error with /var/lib/machines when using LXC.


      [root@localhost ~]# btrfs subvolume list /

      ID 257 gen 54424 top level 5 path root

      ID 259 gen 38816 top level 257 path var/lib/machines

      ID 299 gen 38816 top level 257 path yum_20190508065805


      ID 407 gen 50741 top level 257 path var/lib/docker/btrfs/subvolumes/b1fbf....


      (lxc-create -t download -n my-container)


      After creating an LXC container and starting the system using a BTRFS subvolume to undo a yum update, /var/lib/machines is empty.


      Hence I created the following to restore /var/lib/machines:



      I suppose the same applies to /var/lib/docker, but unlike /var/lib/machines, this produces an fs-snapshot error. I think this is something having to do with nested BTRFS subvolumes, however, I have not found any info explaining the matter with /var/lib/docker/btrfs.


      Any ideas, thanks!