If a directory exists in the lowerdir but not in the mounted
overlay, then mkdir of the directory in the target dir results
in a mysterious -EPERM. I've seen this both in wily kernel
(4.2.0-22-generic #27-Ubuntu) and in a hand-built xenial
master-next (with unrelated patches added).
If a directory exists in the lowerdir but not in the mounted
overlay, then mkdir of the directory in the target dir results
in a mysterious -EPERM. I've seen this both in wily kernel
(4.2.0-22-generic #27-Ubuntu) and in a hand-built xenial
master-next (with unrelated patches added).
======= ======= ======= ======= ======= ======= ======= ====
#!/bin/sh -ex
dir=`mktemp -d`
cleanup() {
umount -l $dir/t
rm -rf $dir
}
trap cleanup EXIT
echo "dir is $dir" $dir/l, upperdir= $dir/u, workdir= $dir/w o $dir/t ======= ======= ======= ======= ======= ======= ====
mkdir -p $dir/l $dir/u $dir/w $dir/t
mkdir $dir/l/dev
mount -t overlay -o lowerdir=
stat $dir/t/dev
rmdir $dir/t/dev
mkdir $dir/t/dev
echo $?
echo "mkdir should have succeeded"
=======