linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jordi Pujol <jordipujolp@gmail.com>
To: linux-fsdevel@vger.kernel.org
Cc: Miklos Szeredi <miklos@szeredi.hu>
Subject: overlayfs.v8 testing on a Live system
Date: Wed, 20 Apr 2011 11:43:00 +0200	[thread overview]
Message-ID: <201104201143.00241.jordipujolp@gmail.com> (raw)

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

             reply	other threads:[~2011-04-20  9:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20  9:43 Jordi Pujol [this message]
2011-04-20 13:37 ` overlayfs.v8 testing on a Live system Miklos Szeredi
2011-04-21  8:15   ` Jordi Pujol

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201104201143.00241.jordipujolp@gmail.com \
    --to=jordipujolp@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).