Hello Jochen,

Jochen Rill:
> So the problem is this:
> After switch_root is executed and the system init process starts, /proc 
> is gone. Normally switch_root moves /sys, /dev and /proc to the new root 
        :::

Currently I don't know the reason.
But what error message did switch_root say? If it failed
mount("/proc", MS_MOVE), the it should report something (hopefully with
errno).
If switch_root didn't report any error, then it means MS_MOVE succeeded
and somethig wrong had to happen after switch_root.

One thing, I guess, which has a possibility to be related to the problem
is that you didn't move the aufs branches under the new root dir.
You wrote that you tried "mount --move /rw /sysroot/rw" in order to
see which files are copied up (another issue). I think it is necessary
for all branches.
You have four branches and one of them is /sysroot. So I'd suggest you
to try
$ d=/sysroot; for i in /rw /groups/conf_fglrx-tft /groups/conf_i09
> do
>       mkdir -p $d$i
>       mount --move $i $d/$i
> done
just before switch_root.
But firstly and most important information is the error msg from
mount(2) call in switch_root.


> Anyway, after I figured out how to work around this, everything booted 
> up fine, but I noticed another strange behavior: after some time, aufs 
> starts to copy-up a large amount of different binaries and libraries 
> even though none of them were modified.
        :::
> So, is there any way to figure out why aufs is copying up all these 
> libraries?

Since you enabled CONFIG_AUFS_DEBUG, you can use the aufs module
parameter 'debug'.
Whne 'debug' is set to 1, aufs prints lost of messages with the
'kernel.debug' syslog facility, and you will able to find which process
caused the copy-up.
But the number of messages are really large, I'd sugges you to try
embedding a simple print in the copy-up routine in aufs. For example,

----------------------------------------------------------------------
diff --git a/fs/aufs/cpup.c b/fs/aufs/cpup.c
index 4e77c7f..6327741 100644
--- a/fs/aufs/cpup.c
+++ b/fs/aufs/cpup.c
@@ -460,6 +460,8 @@ int cpup_entry(struct dentry *dentry, aufs_bindex_t bdst,
        struct inode *h_inode, *h_dir;
        struct super_block *sb;
 
+       pr_info("%.*s, %d-->%d\n", AuDLNPair(dentry), bsrc, bdst);
+
        /* bsrc branch can be ro/rw. */
        h_src = au_h_dptr(dentry, bsrc);
        h_inode = h_src->d_inode;
----------------------------------------------------------------------

This patch prints the message in the form of
"aufs func:line:cmd[pid]: (base)filename src_branch_index-->dst_branch_index"

The "cmd" represents the trigger (cause) of copyup of "filename".


J. R. Okajima

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

Reply via email to