tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: About a probable 32 bit ino_t bottleneck in cd9660_fhtovp()
Hi,
me:
> > Is there a tutorial "Localhost NFS for Dummies" ?
Taylor R Campbell:
> Just set up /etc/exports (see `man exports') and get rpcbind, mountd,
> and nfsd running:
I edited /etc/exports and did without final success:
netbsd# cat /etc/exports
/mnt/iso -ro localhost
netbsd# mkdir /mnt/iso
netbsd# mkdir /mnt/nfs
netbsd# /etc/rc.d/rpcbind onestart
Starting rpcbind.
netbsd# /etc/rc.d/mountd onestart
Starting mountd.
netbsd# /etc/rc.d/nfsd onestart
/etc/rc.d/nfsd: WARNING: $mountd is not enabled.
netbsd# # mount_nfs localhost
netbsd# mount_cd9660 /dev/cd0a /mnt/iso
netbsd# mount_nfs localhost:/mnt/iso /mnt/nfs
mount_nfs: rpcbind to nfs on server: RPC: Program not registered
^C
netbsd# mount
/dev/wd0a on / type ffs (local)
kernfs on /kern type kernfs (local)
ptyfs on /dev/pts type ptyfs (local)
procfs on /proc type procfs (local)
/dev/cd0a on /mnt/iso type cd9660 (read-only, NFS exported, local)
Seems to be known as PR bin/45679.
So it is about "mountd being enabled" ?
http://www.netbsd.org/docs/guide/en/chap-net-services.html
In /etc/rc.conf
mountd=YES
Progress
/etc/rc.d/nfsd: WARNING: $rpcbind is not enabled.
In /etc/rc.conf
rpcbind=YES
And ...
netbsd# /etc/rc.d/nfsd onestart
Starting nfsd.
netbsd# ps -ax | grep nfs
12681 ? Ssl 0:00.00 /usr/sbin/nfsd -6tun 4
netbsd# mount_nfs localhost:/mnt/iso /mnt/nfs
netbsd# mount
...
localhost:/mnt/iso on /mnt/nfs type nfs
netbsd# tail -5 /var/log/messages
May 10 20:32:38 netbsd thomas: /etc/rc.d/nfsd: WARNING: $rpcbind is not
enabled.
May 10 20:35:05 netbsd /netbsd: cd9660_fhtovp: ifh.ifid_ino = 34445312
May 10 20:35:05 netbsd /netbsd: RRIP without PX field?
May 10 20:35:05 netbsd /netbsd: cd9660_fhtovp: ifh.ifid_ino = 34445312
May 10 20:35:05 netbsd /netbsd: cd9660_fhtovp: ifh.ifid_ino = 34445312
This matches the inode rollover of /bin/ls of 6.1.3:
netbsd# ls -lid /mnt/iso
34445312 drwxr-xr-x 1 root wheel 2048 Feb 4 18:09 /mnt/iso
Whereas with fix for bin/48798:
netbsd# /usr/src/bin/ls/ls -lid /mnt/iso
4329412608 drwxr-xr-x 1 root wheel 2048 Feb 4 18:09 /mnt/iso
The NFS mountpoint is unusable
netbsd# ls -l /mnt/nfs
-r-xr-xr-x 1 root wheel 0 Jan 1 1970 /mnt/nfs
But it can be unmouted, at least.
Note: This is a more populated ISO image than the published test ISO.
Thus the inode numbers might slightly differ.
Now it is worth a PR.
kern/48799:
32 bit ino_t bottleneck in interface of cd9660 to vfsops sabotages NFS
------------------------------------------------------------
Strange forth and back after reboot with enabled rpcbind
and mountd:
netbsd# /etc/rc.d/nfsd onestart
Starting nfsd.
netbsd# mount
/dev/wd0a on / type ffs (NFS exported, local)
...
/dev/cd0a on /mnt/iso type cd9660 (read-only, local)
The wrong filesystem is exported.
netbsd# cat /etc/exports
/mnt/iso -ro localhost
netbsd# /etc/rc.d/nfsd onestop
Stopping nfsd.
netbsd# /etc/rc.d/mountd stop
Stopping mountd.
...
netbsd# /etc/rc.d/rpcbind stop
Stopping rpcbind.
...
netbsd# /etc/rc.d/rpcbind onestart
Starting rpcbind.
netbsd# mount
/dev/wd0a on / type ffs (NFS exported, local)
Still wrong.
netbsd# /etc/rc.d/mountd onestart
Starting mountd.
netbsd# mount
/dev/wd0a on / type ffs (local)
...
/dev/cd0a on /mnt/iso type cd9660 (read-only, NFS exported, local)
Now it is right. Why ?
Theory:
If the exported directory is empty, then it prefers to export root.
The trouble ends when i mount /mnt/iso, stop the demons, and restart
them.
Is my /etc/exports so weird ?
Have a nice day :)
Thomas
Home |
Main Index |
Thread Index |
Old Index