Date: Mon, 01 Mar 2010 12:35:39 +0200 From: George Mamalakis <mamalos@eng.auth.gr> To: freebsd-stable <freebsd-stable@freebsd.org> Subject: mount_newnfs & mount_nullfs problem. Message-ID: <4B8B987B.40401@eng.auth.gr>
next in thread | raw e-mail | index | archive | help
Dear all, In short: If I export the filesystem /export/homes, and mount it through nfsv4 on a fbsd8-stable box in the folder /mnt, and then use mount_nullfs /mnt/ /path1/path2/path3, then I have the following-wrong behaviour. If I use vi /path1/path2/path3/mamalos/newfile to write a file, the file is saved in /path1/path2, instead (!!?!). Which is on my local filesystem tree. If I echo "mytestfile" > /path1/path2/path3/mamalos/one, then the file is correctly written in /path1/path2/path3/mamalos/one. In my jail environment, I use a similar approach to that of freebsd-handbook for application jails (paragraph 15.6). So in my setup, mount command shows: solaris:/export/homes on /mnt (newnfs) /jails/j/mroot on /jails/j/postfix (nullfs, local, read-only) /jails/s/postfix on /jails/j/postfix/s (nullfs, local, read-only) /jails/t/postfix on /jails/j/postfix/t (nullfs, local) /mnt on /jails/j/postfix/t/home (nullfs) where we see my imported filesystem, the path where my postfix jail starts (/jails/j/postfix) along with two other filesystems mounted on it (/jails/j/postfix/s and /jails/j/postfix/t). On top of the latter's folder "home" I mount /mnt. If I jexec to that jail, and try to create a file using vi, then vi /home/mamalos/myfile is written in /jails/t/postfix (which is the same as /jails/j/postfix/t) What I suspect is that there must be a problem with nfs4 root-directory (which is two subfolders deep -> /export/homes) and mount_nullfs. The thing is that information is finally stored in my local filesystem instead of the imported one, which is very strange... I will look to it more thoroughly, so as to provide more feedback about the issue. Hopefully, someone with more knowledge on the source code will find an answer. FBSD-box: # uname -a FreeBSD fbsd 8.0-STABLE FreeBSD 8.0-STABLE #2: Fri Feb 19 19:30:00 EET 2010 root@filesrv.ee.auth.gr:/usr/obj/usr/src/sys/MYKERNEL amd64 # mount_newnfs -o nfsv4,rw solaris:/export/homes /mnt/ OpenSolaris: # uname -a SunOS opensolaris 5.11 snv_111b i86pc i386 i86pc Solaris # share -F nfs -o sec=sys,rw,root=@192.168.100.12 /export/homes 192.168.100.12 where 192.168.100.12 is fbsd-box's IP. Thank you all. -- George Mamalakis IT Officer Electrical and Computer Engineer (Aristotle Un. of Thessaloniki), MSc (Imperial College of London) Department of Electrical and Computer Engineering Faculty of Engineering Aristotle University of Thessaloniki phone number : +30 (2310) 994379
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B8B987B.40401>