Open jamesruic opened 1 year ago
@jamesruic thanks for the finding. I think this might be something we already track in #292. Can you please clarify if this happens just after the docker run
command, or have you performed some additional actions between the setup-snapshot
and docker run
? It seems like the driver is trying to unmount the root volume, but the reason for this is uncertain to me. I will take a closer look at that one.
@skypodolsky thank you for your reply. I do nothing between setup-snapshot
and docker run
. After this issue, I made some adjustments in umount_hook
for workaround. If block device is a docker service just run orig_umount
and return, and it works fine. It is confuse why docker run
will trigger umount_hook
for me.
I found an issue in docker that might be relevant to this situation. https://github.com/moby/moby/issues/36149
@jamesruic there were a couple of commits that might be fixing your problem. If you still have an opportunity, could you please try the latest master?
Hi @skypodolsky, I try the latest master version of elastio-snap. I got the same error state when I pulling a docker image. However, when I create the snapshot after pulling the docker image. My container and elastio-snap works good.
dmesg when pulling docker image:
[ 906.363420] elastio-snap: creating cow file
[ 906.364364] elastio-snap: allocating cow manager array (864 sections)
[ 906.365820] elastio-snap: writing cow header
[ 906.365829] elastio-snap: finding cow file inode
[ 906.365830] elastio-snap: getting relative pathname of cow file
[ 906.366022] elastio-snap: allocating queue and setting up make request function
[ 906.366035] elastio-snap: allocating gendisk
[ 906.366037] elastio-snap: setting up make request function
[ 906.366038] elastio-snap: setting queue limits
[ 906.366042] elastio-snap: initializing gendisk
[ 906.366042] elastio-snap: naming gendisk
[ 906.366043] elastio-snap: block device size: 28311552
[ 906.366045] elastio-snap: adding disk
[ 906.366138] elastio-snap: starting mrf kernel thread
[ 906.369349] elastio-snap: creating kernel cow thread
[ 906.370616] elastio-snap: getting the base block device's make_request_fn
[ 906.370618] elastio-snap: freezing 'dm-0'
[ 906.376393] elastio-snap: starting tracing
[ 906.376393] elastio-snap: thawing 'dm-0'
[ 906.382701] elastio-snap: detected block device mount: none -> / : 0x44000
[ 906.382705] elastio-snap: mount returned: 0
[ 906.422443] elastio-snap: minor range = 0 - 0
[ 929.985389] elastio-snap: detected block device mount: -> / : 0x84000
[ 929.985393] elastio-snap: mount returned: 0
[ 929.985539] elastio-snap: detected block device mount: /var/lib/docker/overlay2/754d247bba1e5b883d7053003081ce406e08648182bd53317c326ba80dd39559/diff -> /var/lib/docker/overlay2/754d247bba1e5b883d7053003081ce406e08648182bd53317c326ba80dd39559/diff : 0x5000
[ 929.985546] elastio-snap: mount returned: 0
[ 929.985630] elastio-snap: detected block device mount: -> /.pivot_root4171602565 : 0x44000
[ 929.985632] elastio-snap: mount returned: 0
[ 929.985634] elastio-snap: detected block device umount: /.pivot_root4171602565 : 2
[ 929.985635] elastio-snap: block device umount detected for device 0
[ 929.985636] elastio-snap: stopping cow thread
[ 929.985640] elastio-snap: snap_cow_thread() done.
[ 929.985661] elastio-snap: destroying cow manager. close method: 2
[ 929.988941] elastio-snap: getting cow file extents from filp=00000000e0a92610
[ 929.988942] elastio-snap: attempting page stealing from dockerd
[ 929.988956] elastio-snap: fiemap for cow file (ret 0), extents 14 (max 1024)
[ 929.988957] elastio-snap: cow file extent: log 0x0, phy 0x1d8800000, len 4096
[ 929.988957] elastio-snap: cow file extent: log 0x1000, phy 0x1d8801000, len 125825024
[ 929.988958] elastio-snap: cow file extent: log 0x7800000, phy 0x1e0000000, len 125829120
[ 929.988958] elastio-snap: cow file extent: log 0xf000000, phy 0x1e7800000, len 125829120
[ 929.988958] elastio-snap: cow file extent: log 0x16800000, phy 0x1ef000000, len 125829120
[ 929.988959] elastio-snap: cow file extent: log 0x1e000000, phy 0x1f6800000, len 125829120
[ 929.988959] elastio-snap: cow file extent: log 0x25800000, phy 0x1fe000000, len 33554432
[ 929.988959] elastio-snap: cow file extent: log 0x27800000, phy 0x216000000, len 33554432
[ 929.988960] elastio-snap: cow file extent: log 0x29800000, phy 0x21a000000, len 125829120
[ 929.988960] elastio-snap: cow file extent: log 0x31000000, phy 0x221800000, len 125829120
[ 929.988960] elastio-snap: cow file extent: log 0x38800000, phy 0x229000000, len 125829120
[ 929.988961] elastio-snap: cow file extent: log 0x40000000, phy 0x230800000, len 125829120
[ 929.988961] elastio-snap: cow file extent: log 0x47800000, phy 0x238000000, len 125829120
[ 929.988961] elastio-snap: cow file extent: log 0x4f000000, phy 0x23f800000, len 124153856
[ 929.988972] elastio-snap: preserving cow file extents
[ 929.988992] elastio-snap: device still mounted after umounting cow file's file-system. entering error state: -5
[ 929.989020] elastio-snap: umount returned: 0
I use the latest driver in Ubuntu20.04. It will cause a umount error, when I run a busybox container. Does elastio support docker or something wrong with my steps?
My machine info:
create snapshot success:
get the latest busybox image and run
got error state -5
dmesg: