overlayfs.v8 testing on a Live system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Next I expose some comments about the test of the overlayfs.v8 union filesystem 
driver in the LneT live system,

COMPILE THE KERNEL.

some modifications are needed to compile:

- rename fs/overlayfs/overlayfs.c to fs/overlayfs/module.c

- modify fs/overlayfs/Makefile
#
# Makefile for the overlay filesystem.
#

obj-$(CONFIG_OVERLAYFS_FS) += overlayfs.o

overlayfs-objs := module.o \
	inode.o \
	dir.o \
	readdir.o \
	copy_up.o

- add this line in fs/overlayfs/copy_up.c
 #include <linux/security.h>
+#include <asm/uaccess.h>
 #include "overlayfs.h"

TESTING.

The live system is started in two different modes,
- non persistent mode, upperdir on tmpfs
- persisten mode, upperdir on a disk partition directory, ext4 formatted

Changes to the underlying filesystems while part of a mounted overlay filesystem 
are not allowed.  This is not a problem for Live systems that normally are 
based on static files of squashfs type.

Non-persistent mode: We know that the upperdir can not reside on tmpfs because 
overlayfs requires xattr support on the upper filesystem.
Now trying, it does not work on a live system when the upperdir is on tmpfs.
Has a problem with whiteouts.
mv /root/etc/rc0.d/K01fuse /root/etc/rc0.d/k01fuse
"overlayfs: ERROR - failed to whiteout 'K01fuse'"
Analyzing this operation, looking in the upperdir directories, the new link 
'/root/etc/rc0.d/k01fuse' has been created in the upperdir, but the whiteout 
link '/root/etc/rc0.d/K01fuse' is not created, xattrs can not be created on 
this filesystem type.

Persistent mode: Works on a live system when the upperdir is on disk.
It's a good development, functionally easy and straight, seems very fast, 
although I don't have measured how much,

But some failure has been detected.

DETECTED FAILURE.

Scenario:
- lowerdir is an squashfs mounted on a tmpfs dir.
- upperdir is on an ext4 formatted partition.

An script modifies a file that initially is in lowerdir, issuing consecutive 
commands:

sed -i -r -e 's|\[X-\*-Core\]|&\nServerTimeout=120|' /etc/kde4/kdm/kdmrc
sed -i -e 's/\(ServerArgsLocal\=.*\)$/\1 \-dpi 120/' /etc/kde4/kdm/kdmrc
sed -i -e 's/#\(ServerArgsRemote\=.*\)$/\1 \-dpi 120/' /etc/kde4/kdm/kdmrc

Sometimes first or second changes are lost, only remain the changes done by the 
last commands.

REFERENCES.

release v8:
https://lkml.org/lkml/2011/4/18/247

git:
http://git.kernel.org/?p=linux/kernel/git/mszeredi/vfs.git;a=shortlog;h=refs/heads/overlayfs.v8

LneT custom kernel (Debian source):
http://livenet.selfip.com/ftp/debian/linux-2.6/linux-2.6.38-3.jpp.2-
lnet_2.6.38-14.tar.bz2

IMPROVEMENTS and WHISHLIST.

- upperdir on tmpfs, TODO feature already mentioned in the announcing message.

- xattrs optionally disabled, implement mount option: "nouser_xattr" (option 
name is taken from man mount). Actually this is the default (AFAIK the only) 
behaviour for a Live system, Standard Linux Security is used in the root 
filesystem, it's fast and a desktop system does not need complicated security 
configurations.

- lowerdir may be a list of directories separated by colon (:), they must 
appear in the options string from upper to lower.
That is very interesting, using this feature is easy to create different 
configurations that use the same base Live OS.
example:
mount -t overlayfs upperdir=/upper,lowerdir=/lower1:/lower2:...:/lowerN 
overlayfs /rootdir

- after the previous improvement has been done then we can think about 
changing interactively a Live OS to another configuration, that is done adding 
and removing branches to the union filesystem. Only some Live systems make it, 
others do not have an interactive configuration but require a reboot for 
changing to another configuration,

I hope this review can help,

Jordi Pujol

Live never ending Tale
GNU/Linux Live forever!
http://livenet.selfip.com
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux