Permalink
Browse files

don't mount aufs or overlayfs in overlayfs

overlayfs can be mounted in overlayfs, but has the same whiteout problem as in
aufs. aufs mounts but has strange behavior.
  • Loading branch information...
1 parent 076d5cb commit 586cc42b5295f4385cc2b459b79bbc73ed1a13de Alex Suraci committed Feb 11, 2014
Showing with 12 additions and 2 deletions.
  1. +12 −2 warden/root/linux/skeleton/lib/common.sh
@@ -62,7 +62,12 @@ function should_use_overlayfs() {
modprobe -q overlayfs >/dev/null 2>&1 || true
# cannot mount overlayfs in aufs
- if [ "$(current_fs $rootfs_path)" == "aufs" ]; then
+ if [ "$(current_fs tmp/rootfs)" == "aufs" ]; then
+ return 1
+ fi
+
+ # cannot mount overlayfs in overlayfs; whiteout not supported
+ if [ "$(current_fs tmp/rootfs)" == "overlayfs" ]; then
return 1
fi
@@ -81,7 +86,12 @@ function should_use_aufs() {
fi
# cannot mount aufs in aufs
- if [ "$(current_fs $rootfs_path)" == "aufs" ]; then
+ if [ "$(current_fs tmp/rootfs)" == "aufs" ]; then
+ return 1
+ fi
+
+ # cannot mount aufs in overlayfs
+ if [ "$(current_fs tmp/rootfs)" == "overlayfs" ]; then
return 1
fi

0 comments on commit 586cc42

Please sign in to comment.