0

I have a container running on my host. there is a volume I bind to the container.
"Volumes": { "/data/mcluster_data": "/data/mcluster_data/d-mcl-30_struc_test", "/srv/mcluster": "/srv/docker/vfs/dir/2f1b1f1b9fd7c35132d42ee3896215771956a763929474fc7493cb97270a781c" },
the path /srv/mcluster is binded to a path on the host /srv/docker/vfs/dir/2f1b1f1b9fd7c35132d42ee3896215771956a763929474fc7493cb97270a781c. There in the container running a mysql server. The mysql server store the data under The path /srv/mcluster/mysql.
I monitor the diskio throw the file "blkio.throttle.io_service_bytes".
There is a strange thing. If I insert data to the database. The file will change(which is as hoped). But if I use dd if=/dev/zero of=/srv/mcluster/mysql/test_ljl bs=1M count=3072 oflag=dsync, the file will remain unchanged.
Has anyone met this problem?

Gary
  • 71
  • 1
  • 4

1 Answers1

0

I found the answer! It's because that I use nsenter to get into the container. Instead that if I use docker attach, then the problem will be fixed.
Also I still find no answer for why this happened.

Gary
  • 71
  • 1
  • 4