Mr. Junjiro R. Okajima, thanks again for your immediate answer. You find the requested data in the attached tape archive file email-attachement-05.tar.gz.
1. Kernel messages
[ 99.984955] aufs test_add:262:mount[2493]: uid/gid/perm
/tmp/jailcache.ro.usrlocal 0/50/02775, 0/0/0755
[ 100.071844] aufs test_add:262:mount[2499]: uid/gid/perm
/tmp/jailcache.ro.home 1000/1000/0755, 0/0/0755
The reasons for above message are how I created the directories of
the read only branches. Both directories are created form the user
root but the bound directories /usr/local and /home have other user
ids, group ids and partly permissions. The following lines shows how
I build the AUFS union for usrlocalonaufs:
$> sudo mkdir -p /tmp/jailcache.rw.usrlocal \
/tmp/jailcache.ro.usrlocal
$> sudo mount -o bind /usr/local /tmp/jailcache.ro.usrlocal
$> sudo mount -t aufs -o \
br:/tmp/jailcache.rw.usrlocal:/tmp/jailcache.ro.usrlocal \
usrlocalonaufs /tmp/jail/usr/local
To avoid the first kernel message I have added the chmod and chown
commands between the mkdir command and the first mount command. The
following lines show the changed command sequence I used:
$> sudo mkdir -p /tmp/jailcache.rw.usrlocal \
/tmp/jailcache.ro.usrlocal
$> sudo chmod g+ws /tmp/jailcache.rw.usrlocal
$> sudo chown 0:50 /tmp/jailcache.rw.usrlocal
$> sudo chmod g+ws /tmp/jailcache.ro.usrlocal
$> sudo chown 0:50 /tmp/jailcache.ro.usrlocal
$> sudo chmod g+ws /tmp/jail/usr/local
$> sudo chown 0:50 /tmp/jail/usr/local
$> sudo mount -o bind /usr/local /tmp/jailcache.ro.usrlocal
$> sudo mount -t aufs -o \
br:/tmp/jailcache.rw.usrlocal:/tmp/jailcache.ro.usrlocal \
usrlocalonaufs /tmp/jail/usr/local
As you suggested I installed the never used aufs-util. After the
installation the following kernel message appears again in the
kernel logs. Again, the kernel message appeared during the GNOME
Desktop session log in:
[ 129.434722] aufs au_opts_parse:1039:mount[3397]: unknown option
errors=remount-ro
[ 129.441762] aufs au_opts_parse:1039:mount[3398]: unknown option
commit=0
[ 129.452269] aufs au_opts_parse:1039:mount[3400]: unknown option
commit=0
[ 129.468503] aufs au_opts_parse:1039:mount[3402]: unknown option
commit=0
[ 129.473906] aufs au_opts_parse:1039:mount[3403]: unknown option
commit=0
[ 129.477398] aufs au_opts_parse:1039:mount[3404]: unknown option
commit=0
In the last letter you asked me what the GNOME Desktop session does,
particulary when and why it invokes mount(8).
You can find the answer of your questions in the attached script
bldchraufs-0.2rc2.aio. The script includes all code to create the
chroot environment and the commands I used to invoke a GNOME Desktop
session in the chroot environment. The file bldchraufs-0.2rc2.aio
includes a comprehensive step by step instruction and a documentation
of the operation system I used. The requested /etc/mtab file is
attached at the letter and can be found in the tape archive file
email-attachment-05.tar.gz.
2. Chroot environment removal and forgotten daemons
In the last letter I wrote about my changes I made on the script
aubusy. You wasn't convinced about the correction I have made and
asked me how the following files are looking:
- /proc/self/mounts, /proc/$$/mounts, /proc/mounts
On my system the /proc/mounts is a link that points at /proc/self/
mounts. For that reason I put only the contents of the file /proc/
self/mounts into the tape archive.
If I see it right the script aubusy does basically the following to
get the value for the variable si:
$> fgrep \ /tmp/jail/var\ aufs\ /proc/self/mounts | \
tail -n 1 | \
cut -f4 -d' ' | \
sed -e 's/^.*,si=\([^,]*\),.*$/\1/'
Please don't run the above command in the chroot environment. If
called in the chroot environment the name of the directory /tmp/jail
/var must be substituted with the name /var. The above command
provides the following line:
rw,relatime,si=89f694af8e016535
The value behind the equal sign is a random number. This number is
the suffix behind si_ of the following directory:
/sys/fs/aufs/si_89f694af8e016535
I think, aubusy should provide the following value:
89f694af8e016535
The following command sequence provides the above mentioned value.
In the following sed command the regular expression is run without
the comma, point and star in front of the dollar sign:
$> fgrep \ /tmp/jail/var\ aufs\ /proc/self/mounts | \
tail -n 1 | \
cut -f4 -d' ' | \
sed -e 's/^.*,si=\([^,]*\)$/\1/'
The fgrep scanned line in the file /proc/self/mounts looks like the
following line:
varonaufs /tmp/jail/var aufs rw,relatime,si=89f694af8e016535 0 0
3. NFS in an on AUFS based chroot environment
You are right the value of CONFIG_AUFS_EXPORT is not set. Now I know
why I used the user space nfsd and not the kernel space nfsd. The
kernel I use is a Debian distribution maintained kernel. The lines
are excerpt of the Linux/x86 3.0.0 kernel configuration file /boot/
config-3.0.0-1-amd64:
CONFIG_AUFS_BRANCH_MAX_127=y
# CONFIG_AUFS_BRANCH_MAX_511 is not set
# CONFIG_AUFS_BRANCH_MAX_1023 is not set
# CONFIG_AUFS_BRANCH_MAX_32767 is not set
CONFIG_AUFS_SBILIST=y
# CONFIG_AUFS_HNOTIFY is not set
# CONFIG_AUFS_EXPORT is not set
# CONFIG_AUFS_RDU is not set
# CONFIG_AUFS_PROC_MAP is not set
# CONFIG_AUFS_SP_IATTR is not set
# CONFIG_AUFS_SHWH is not set
# CONFIG_AUFS_BR_RAMFS is not set
# CONFIG_AUFS_BR_FUSE is not set
CONFIG_AUFS_BR_HFSPLUS=y
CONFIG_AUFS_BDEV_LOOP=y
# CONFIG_AUFS_DEBUG is not set
I know the consequence but I want avoid it. Maybe I will use the user
space nfsd further.
Again, I would be very glad, if you could find some time to answer my
questions. Thanks a lot in advanced.
Regards,
Robert Wotzlaw
Attachment:
1. Tape archive email-attachment-05.tar.gz
- All in one file bldchraufs-0.2rc2.aio,
version 0.2rc2, 2012-03-18 17:29:00+01:00
- etc_mtab.log
- proc_self_mounts.log
- proc_$$_mounts.log
email-attachment-05.tar.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure
