-
Notifications
You must be signed in to change notification settings - Fork 711
Open
Labels
Description
Hi guys,
if I start a Podman container with a bind-mount of the type:
mount=type=bind,src=/tmp/origin,destination=/MNT,bind-propagation=rslave
and inside /tmp/origin/ there is something mounted: /tmp/origin/test_mountpoint
I can see all mounted files inside the container under /MNT/test_mountpoint/...
But if I checkpoint and restore that same container, /MNT/test_mountpoint/... will be empty if the mount /tmp/origin/test_mountpoint is present before restore.
Here are the commands to test this:
#Preparation:
dd if=/dev/zero of=/tmp/testfs.img bs=1M count=10
sudo mkfs.ext4 /tmp/testfs.img
# Mount testfs before container creation
mkdir -p /tmp/origin/testfs
sudo mount -o loop /tmp/testfs.img /tmp/origin/testfs
sudo podman run \
--name testc \
--detach \
--replace \
--mount=type=bind,src=/tmp/origin,destination=/MNT,bind-propagation=rslave \
--network=host \
alpine \
sleep infinity
# Mount in mount is visible from inside the container
sudo podman exec testc tree /MNT
#/MNT
#└── testfs
# └── lost+found
#
# 2 directories, 0 files
# Unmount to allow checkpoint. If not: mnt: Mount 359 ./MNT/testfs (master_id: 232 shared_id: 0) has unreachable sharing
sudo umount /tmp/origin/testfs
# Checkpoint container
sudo podman container checkpoint testc
# Mount testfs again before restoring the container
sudo mount -o loop /tmp/testfs.img /tmp/origin/testfs
# Restore
sudo podman container restore testc
### Submount is not visible anymore
sudo podman exec testc tree /MNT
#/MNT
#└── testfs
#
#1 directories, 0 filesIs this expected behavior? Is there any way so that the mounted files are accessible from inside the container after restore?
Thanks in advance!
Regards
specht478
Reactions are currently unavailable