Re: OK, I give..Help?

2007-02-13 Thread sfjro

"Chris Furlough":
> What I'd like to be able to do, is to mount something over the whole "/" 
> mount point.

Then you did it. And you see everything under /root/jukebox_cddb/aufs,
except /proc, /sys, /dev/pts and /dev/shm, don't you?
Is it enough for you?

Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Re: mount.aufs and busybox

2007-02-13 Thread sfjro

Wolfgang Barth:
> Oops,  I was wrong. The order of options from busybox mount is correct, but
> the following test:
> 
>test ! -r $f -o \( $do_update -eq 1 -a ! -w $f \) ...
> 
> I'm using aufs during boot phase, so /etc/mtab did not exist. mount -n
> won't update /etc/mtab, so why "test ! -r $f" ?

I didn't know mount(8) can work even if /etc/mtab doesn't exist.
I will modify mount.aufs but it may take some time since I am busy now.
Until then, won't you create an empty /etc/mtab just before mount?

Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Re: OK, I give..Help?

2007-02-13 Thread Chris Furlough
> Will you show me your /proc/mounts?

rootfs / rootfs rw 0 0

udev /dev tmpfs rw 0 0

/dev/hda2 / reiserfs rw 0 0

proc /proc proc rw 0 0

sysfs /sys sysfs rw 0 0

debugfs /sys/kernel/debug debugfs rw 0 0

devpts /dev/pts devpts rw 0 0

tmpfs /dev/shm tmpfs rw 0 0

/dev/hda3 /root/jukebox_cddb reiserfs rw 0 0

none /root/jukebox_cddb/aufs aufs 
rw,xino=/root/jukebox_cddb/rw/.aufs.xino,br:/root/jukebox_cddb/rw=rw:/=ro 0 
0





What I'd like to be able to do, is to mount something over the whole "/" 
mount point.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Re: aufs max branches

2007-02-13 Thread sfjro

Tomas M:
> It was in Linux Live CD all the time, using 'mount' command from 
> busybox. Now I tried it in a normal Linux (installed) and it doesn't 
> segfault, remount simply exits with E2BIG (Argument list too long).

Thi is the effect of the patch I sent.
If you used the un-patched aufs, it would not return the error and cause
a problem.


> I noticed the line in /etc/mtab (mount arguments) can't be longer than 
> 4096 characters. This is 2^12 I guess.

Yes, it is the limitation of mount and /proc/mounts. It is the size of a
memory page.
And aufs will try sysfs as you suggested.

--

> Now I decided to skip unionctl at all, and use
> 
>mount -n -o remount,add:1:/new/branch=ro aufs /union
:::
> Remount segfaults the same in Live CD. BUT! I am unable to reproduce the 
> problem in my installed Linux, even if using busybox's mount. So it it 
> very strange :)

Please let me make sure.
- you did it on your hdd-installed Linux, instead of Live CD
- the aufs patch was applied
- mount.aufs was not installed
- you executed busybox mount -n -o remount,add:1:/new/branch=ro aufs /union
- the busybox aborted by segfault

Which problem do you wrote as "unable to reproduce"?

--

> So here is how did I fix it:
> - I call:
> 
>  mount -o remount,ro aufs .

Well, probably it is a busybox issue.
But aufs should work correctly which includes the expected error.
Do you think aufs has no problem anymore?
I am confused a little...


Junjiro Okajima

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Re: mount.aufs and busybox

2007-02-13 Thread Wolfgang Barth
On Tue, Feb 13, 2007 at 10:55:23AM +0900, [EMAIL PROTECTED] wrote:
> Wolfgang Barth:
> > mount.aufs (20070205) won't work correctly with busybox -  I'm using an old
> > version 1.01. mount.aufs depends on the correct order of arguments, but the
> > mount program from busybox seems not compatible with the standard linux
> > one. 
> > 
> > Is there a plan to parse the options in a robust way instead of assuming
> > the right order?
> 
> Ok, I will try getopt.
> Will you show me the actual arguments, by un-comment out "set -x" line
> in mount.aufs?

Oops,  I was wrong. The order of options from busybox mount is correct, but
the following test:

   test ! -r $f -o \( $do_update -eq 1 -a ! -w $f \) ...

I'm using aufs during boot phase, so /etc/mtab did not exist. mount -n
won't update /etc/mtab, so why "test ! -r $f" ?

The output from mount.aufs as screen shot is attached as image.

wob
-- 
 * http://www.swobspace.de


mount.aufs.gif
Description: GIF image
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

aufs remount - FIXED

2007-02-13 Thread Tomas M
So here is how did I fix it:
- I call:

 mount -o remount,ro aufs .

instead of

 mount -o remount,ro .

This fixes my issue. No more problems at all.
It's a busybox issue while calling mount(2) command IMHO!

I tried strace with the first command and it calls

 mount("aufs", "/union", 0x807e6ec, \
   MS_READONLY|MS_REMOUNT|MS_VERBOSE, "xino=...")

which causes segmentation fault. But when I call strace with the second 
command, it calls

 mount("aufs", "/union", 0, MS_READONLY|MS_REMOUNT|MS_VERBOSE, NULL )

As you can see, using the second way doesn't pass any arguments to the 
mount command, but NULL.

NOTE: I tried with patched and unpatched opts.c, works in both cases.

So, I think the problem is fixed, at least for me.


Tomas M
slax.org

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Re: aufs max branches

2007-02-13 Thread Tomas M
So now I tried something even more different :)

Before, I was calling unionctl to add branches one by one.
Now I decided to skip unionctl at all, and use

   mount -n -o remount,add:1:/new/branch=ro aufs /union

directly for all branches. Note -n switch to bypass the mtab at all.
I removed mount.aufs as well.

Remount segfaults the same in Live CD. BUT! I am unable to reproduce the 
problem in my installed Linux, even if using busybox's mount. So it it 
very strange :)

The problem is only with liveCD.

I noticed my busybox's mount ignores -n switch.
I'll try to debug more and I'll post here.


Tomas

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Re: aufs max branches

2007-02-13 Thread Tomas M
Yes it's still the same, starts with BUG: ... NULL pointer ...
even with the patched aufs loaded.

It was in Linux Live CD all the time, using 'mount' command from 
busybox. Now I tried it in a normal Linux (installed) and it doesn't 
segfault, remount simply exits with E2BIG (Argument list too long).

BUT! when I copy mount.aufs to /sbin then mount calls /sbin/mount.aufs. 
It works better now, I am able to add 113 branches to union. Then it 
fails with:
[mntent]: line 9 in /etc/mtab is bad; rest of file ignored

I noticed the line in /etc/mtab (mount arguments) can't be longer than 
4096 characters. This is 2^12 I guess.

Hope this helps a bit.


Tomas


[EMAIL PROTECTED] wrote:
> Tomas M:
>> I tested the patch. No difference, remount,ro causes oops in 
>> kernel/exit.c:860
> 
> How about "BUG: ... NULL pointer ..."?
> Your gif file showed me it before "BUG: at kernel/exit.c:860".
> 
> Junjiro Okajima
> 


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Re: aufs max branches

2007-02-13 Thread sfjro

Tomas M:
> I tested the patch. No difference, remount,ro causes oops in 
> kernel/exit.c:860

How about "BUG: ... NULL pointer ..."?
Your gif file showed me it before "BUG: at kernel/exit.c:860".

Junjiro Okajima

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Re: aufs max branches

2007-02-13 Thread Tomas M
I tested the patch. No difference, remount,ro causes oops in 
kernel/exit.c:860

What should the patch do?

Thank you

Tomas M




> I think so.
> Will you try this patch?
> 
> Junjiro Okajima
> 
> Index: fs/aufs/opts.c
> ===
> RCS file: /cvsroot/aufs/aufs/fs/aufs/opts.c,v
> retrieving revision 1.24
> diff -u -p -r1.24 opts.c
> --- fs/aufs/opts.c12 Feb 2007 02:57:13 -  1.24
> +++ fs/aufs/opts.c13 Feb 2007 12:04:21 -
> @@ -633,9 +633,12 @@ int parse_opts(struct super_block *sb, c
>   Err("unknown option %s\n", opt_str);
>   break;
>   }
> +
>   if (!err && !skipped) {
>   if (unlikely(++opt > opt_tail)) {
>   err = -E2BIG;
> + opt--;
> + opt->type = Opt_tail;
>   break;
>   }
>   opt->type = Opt_tail;
> 


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Re: aufs max branches

2007-02-13 Thread sfjro

Tomas M:
> and then I add branches one by one, by using
> 
> mount -o remount,add:1:/mnt/images/image1 aufs /union
> 
> for example. This works OK and branches are added to the union, but 
> remounting the union ro causes the oops I sent you. Do you still agree 
> it's a problem of the lenght of mount arguments?

I think so.
Will you try this patch?

Junjiro Okajima

Index: fs/aufs/opts.c
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/opts.c,v
retrieving revision 1.24
diff -u -p -r1.24 opts.c
--- fs/aufs/opts.c  12 Feb 2007 02:57:13 -  1.24
+++ fs/aufs/opts.c  13 Feb 2007 12:04:21 -
@@ -633,9 +633,12 @@ int parse_opts(struct super_block *sb, c
Err("unknown option %s\n", opt_str);
break;
}
+
if (!err && !skipped) {
if (unlikely(++opt > opt_tail)) {
err = -E2BIG;
+   opt--;
+   opt->type = Opt_tail;
break;
}
opt->type = Opt_tail;

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Re: aufs max branches

2007-02-13 Thread Tomas M
 > Then, I will try sysfs instead of /proc.
 > Give me some time.
 >
 > But I don't think it is good to implement
 >>  echo add:1:/mnt/path > /proc/fs/aufs/0/branches
 >
 > The (re)mount interface is better.

Thank you very much for your consideration!

I like the (re)mount very much, but will your modification fix the 
problem I reported? (the kernel oops or whatever it was in kernel/exit.c)

To make things more clear, I don't call 'mount' command with a huge list 
of branches to mount the union, but instead I create the union in /union

mount -t aufs -o br:/memory=rw aufs /union

and then I add branches one by one, by using

mount -o remount,add:1:/mnt/images/image1 aufs /union

for example. This works OK and branches are added to the union, but 
remounting the union ro causes the oops I sent you. Do you still agree 
it's a problem of the lenght of mount arguments?


Tomas M
slax.org


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Re: mount.aufs and busybox

2007-02-13 Thread Tomas M
>> mount.aufs (20070205) won't work correctly with busybox -  I'm using an old
>> version 1.01. 

What about compiling a new version of busybox? :)
I use busybox for a long time and it's better and better with all new 
releases.


Tomas M

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642