Closed liangxianlong closed 3 years ago
Hi, @liangxianlong When container's rootfs is block device based, such as devmapper, Kata will directly plug the devmapper block device into qemu, thus you cannot expect the changes appeared on host dir once you do any change in container,
If you want this share, please set
disable_block_device_use = true
in kata configure file.
Hi, @liangxianlong When container's rootfs is block device based, such as devmapper, Kata will directly plug the devmapper block device into qemu, thus you cannot expect the changes appeared on host dir once you do any change in container,
If you want this share, please set disable_block_device_use = true in kata configure file.
thinks. Another problem in direct lvm
:my steps
(1) run container
# docker run -ti centos sh
(2) mount
# mount | grep /dev/mapper/docker-
shows
/dev/mapper/docker-8:32-67277621-b3a89a32bbbd30087d457a0f6ca6ff11700586f041a4c4eaa59ae4af20599ab0 on /home/lxl/test-ov/devicemapper/mnt/b3a89a32bbbd30087d457a0f6ca6ff11700586f041a4c4eaa59ae4af20599ab0 type xfs (rw,relatime,seclabel,nouuid,attr2,inode64,logbsize=128k,sunit=256,swidth=1024,noquota)
(3) ll
# ll /dev/mapper/docker-8:32-67277621-b3a89a32bbbd30087d457a0f6ca6ff11700586f041a4c4eaa59ae4af20599ab0
shows
/dev/mapper/docker-8:32-67277621-b3a89a32bbbd30087d457a0f6ca6ff11700586f041a4c4eaa59ae4af20599ab0 -> ../dm-5
I know that the runtime will plug dm-5 into qemu as the virtual machine's /dev/sda. Finally mount /dev/sda to the /run/kata-containers/shared/containers/${containerid}
in virtual machine.Does this means we mount /dev/dm-5 twice:first is host side,second is the vm side?
@liangxianlong
Does this means we mount /dev/dm-5 twice:first is host side,second is the vm side?
Yes. The situation will be fixed for shimv2 in #1412 . For kata-runtime cli, it is a known limitation and cannot be fixed at kata side because the host directory is mounted by upper layer components (docker/containerd/cri-o).
Thinks,Looking forward to #1412.
Description of problem
kata can not see any changes in
/${dockerworkDir}/devicemapper/mnt/{id}/rootfs/home
if i touch a file in container's directory/home/
in direct-lvm mode.Expected result
if i
touch test
in container's directory/home
,i want to see thetest
file on host directory/${dockerworkDir}/devicemapper/mnt/{id}/rootfs/home/test
Actual result
on host directory```/${dockerworkDir}/devicemapper/mnt/{id}/rootfs/home/,i don't see any changes
Meta details
Running
kata-collect-data.sh
version1.6.0 (commit 3c3d0fb)
at2019-03-29.12:43:47.404811799+0800
.Runtime is
/usr/bin/kata-runtime
.kata-env
Output of "
/usr/bin/kata-runtime kata-env
":Runtime config files
Runtime default config files
Runtime config file contents
Config file
/etc/kata-containers/configuration.toml
not found Output of "cat "/usr/share/defaults/kata-containers/configuration.toml"
":KSM throttler
version
Output of "
/usr/libexec/kata-ksm-throttler/kata-ksm-throttler --version
":Output of "
/usr/lib/systemd/system/kata-ksm-throttler.service --version
":systemd service
Image details
Initrd details
No initrd
Logfiles
Proxy logs
Runtime logs
No recent runtime problems found in system journal.
Proxy logs
No recent proxy problems found in system journal.
Shim logs
No recent shim problems found in system journal.
Throttler logs
No recent throttler problems found in system journal.
Container manager details
Have
docker
Docker
Output of "
docker version
":Output of "
docker info
":Output of "
systemctl show docker
":No
kubectl
Nocrio
Havecontainerd
containerd
Output of "
containerd --version
":Output of "
systemctl show containerd
":Output of "
cat /etc/containerd/config.toml
":Packages
No
dpkg
Haverpm
Output of "rpm -qa|egrep "(cc-oci-runtimecc-runtimerunv|kata-proxy|kata-runtime|kata-shim|kata-ksm-throttler|kata-containers-image|linux-container|qemu-)"
":