Hi J. R. Okajima,

On Friday, 17. April 2009 15:32:33 [email protected] wrote:
> Rene Mayrhofer:
> > I am a happy user of aufs for our Gibraltar firewall distribution.
> > However, there is one issue that I have not managed to solve so far. aufs
> > code has been taken from CVS head as of today (2009-04-17) with kernel
> > 2.6.28.9 with only a few patches (including PaX).
>
> First, aufs1 (the CVS version) doesn't support linux-2.6.28, and is not
> maintained now. If you can, try switching to aufs2 (GIT version).

I forgot to say that I am using the aufs25/ directory, but I wasn't aware that 
CVS is no longer being updated. I will switch to the GIT tree then.

> > The problem is now a specific directory under /etc:
> >
> > [~]# touch /etc/gibraltar/test
> > [ 1574.915789] aufs au_lkup_neg:393:touch[6175]: I/O Error, b0 gibraltar
> > should be negative.
> > touch: cannot touch `/etc/gibraltar/test': Input/output error
>
> Have you ever modified 'gibraltar' directly (by-passing aufs) without
> udba=inotify option? That is the most possible cause of this message.

I found that this is the case, yes.

> > but the file appears in the read-write branch:
> >
> > [~]# ls -la /system/ramdisks/etc/gibraltar/
> > total 4
> > drwxr-xr-x  2 root root  60 Apr 17 09:37 ./
> > drwxr-xr-x 15 root root 480 Apr 17 11:56 ../
> > -rw-------  1 root root  41 Apr 17 09:37 config_lastsaved
>
> Internally aufs remembers /system/ramdisks/etc/gibraltar/ as 'negative
> dentry' which means 'not exist'. But it exists actually. When and how
> was it created?

You are completely right - the backend FS was modified (a state file written). 
Now that I understand what "negative" means in this case, I found the culprit. 
Thanks for pointing me in the right direction.

For the record, the script now simply calls

mount -o remount /etc

after the backend filesystem (tmpfs) is modified and everything seems to be ok. 
Is that the proper way to do it or should I prevent any modification when aufs 
is not mounted with udba=inotify?

> > The only difference between this directory and others that I can think of
> > is that it is the first that the bootup script tries to write to
> > immediately after having mounted the /etc tree with aufs. The state
> > immediately after mounting /etc is:
>
> This list looks strange to me.
> Why /dev/loop0 is mounted several times? Are they 'bound' mount or
> something?
Yes, bind mount is used.

Thanks for the quick answer!

best regards,
Rene

-- 
-------------------------------------------------
Gibraltar firewall       http://www.gibraltar.at/

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p

Reply via email to