Bug 218059 - NFS loop back mount of a tmpfs file systems fail, if the tmpfs file systems was mounted with "-o"
Summary: NFS loop back mount of a tmpfs file systems fail, if the tmpfs file systems w...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-fs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-24 10:37 UTC by Peter Holm
Modified: 2017-03-24 14:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Holm freebsd_committer 2017-03-24 10:37:59 UTC
$ cat localhost2.sh 
#!/bin/sh

[ $# -eq 0 ] && localhost=127.0.0.1
[ $# -eq 1 ] && localhost=localhost

uname -a
ifconfig  | grep inet

[ -d /mnt2 ] || mkdir /mnt2
mount | grep -q mnt2 && umount /mnt2
mount | grep -q mnt && umount /mnt

echo
echo "tmpfs with no \"-o\" argument":
mount -t tmpfs tmpfs /mnt
echo  "mount -t nfs -o retrycnt=1 $localhost:/mnt /mnt2"
mount -t nfs -o retrycnt=1 $localhost:/mnt /mnt2

mount | grep mnt

mount | grep -q mnt2 && umount /mnt2
mount | grep -q mnt && umount /mnt

echo
echo "Now with tmpfs, size=512m:"
mount -t tmpfs -o "size=512m" tmpfs /mnt
echo "mount -t nfs -o retrycnt=1 $localhost:/mnt /mnt2"
mount -t nfs -o retrycnt=1 $localhost:/mnt /mnt2

mount | grep mnt

mount | grep -q mnt2 && umount /mnt2
mount | grep -q mnt && umount /mnt
$ ./localhost2.sh 
FreeBSD t2.osted.lan 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r315388M: Thu Mar 16 08:20:21 CET 2017     pho@t2.osted.lan:/usr/src/sys/amd64/compile/PHO  amd64
        inet 192.168.1.109 netmask 0xffffff00 broadcast 192.168.1.255 
        inet6 fe80::21e:67ff:fe56:b69b%igb0 prefixlen 64 scopeid 0x1 
        inet6 ::1 prefixlen 128 
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
        inet 127.0.0.1 netmask 0xff000000 

tmpfs with no "-o" argument:
mount -t nfs -o retrycnt=1 127.0.0.1:/mnt /mnt2
tmpfs on /mnt (tmpfs, local)
127.0.0.1:/mnt on /mnt2 (nfs)

Now with tmpfs, size=512m:
mount -t nfs -o retrycnt=1 127.0.0.1:/mnt /mnt2
[tcp] 127.0.0.1:/mnt: Permission denied
tmpfs on /mnt (tmpfs, local)
$