Date: 12 Jan 2002 20:45:46 -0200 From: Edvard Fagerholm <desti@sigtrap.com> To: freebsd-stable@freebsd.org Subject: mount_null problems Message-ID: <1010875546.1942.0.camel@ryssa.cyberland.fi>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello!
I've just tried to tweak a few things with chrooted ftp for my users.
Basically what I'm doing is that every user has an NFS mounted wwwroot
from some http-server. These www-folders are mounted to /www /www2 ...
/wwwN one for each server and each of these /wwwN folders contain one
folder per domain, so we've got things like:
/www3/domain.dom/
Now domain.dom is owned by some user and thus we've got a softlink
pointing from this user's home directory to the NFS mounted location of
his/her wwwroot (i.e. /www3/domain.dom/).
The problem with this is that chrooted ftp-access isn't possible with
softlinks and I don't want to mount each user's wwwroot to his/her home
directory as that would lead to a massive amount of NFS mounts.
What I tried to do was to use mount_null to mount /www ->
/home/user/www. This was done on a little testbox with limited access
for only a few users. The problem is that if I do cd /home/user/www and
type 'ls' the ls process freezes and so thus every other subsequent
process that tries to access /home/user/www. Basically this is how the
file systems are mounted:
/dev/ad1s1a on / (ufs, local, soft-updates)
/dev/ad1s1e on /root (ufs, local, soft-updates)
/dev/ad1s1f on /tmp (ufs, local, nodev, noexec, nosuid, soft-updates)
/dev/ad1s1h on /usr (ufs, local, nodev, soft-updates)
/dev/ad1s1g on /var (ufs, local, nodev, noexec, nosuid, soft-updates)
procfs on /proc (procfs, local)
nfs1:/data/home on /home (nfs, nodev, noexec, nosuid)
http1:/www on /www (nfs, nodev, noexec, nosuid)
http1:/var/log/apache on /logs (nfs, nodev, noexec, nosuid, read-only)
/www on /home/user1/www (null)
/www on /home/user2/www (null)
/www on /home/user3/www (null)
/www on /home/user4/www (null)
So basically a NFS mounted partition is further null mounted. The only
way to get rid of these ls processes or shells trying to cd into that
/home/user/www folder is to kill them and the only way to make that
directory available again is to reboot. This is the output from top for
one of these freezed processes:
239 root -14 0 1332K 988K nullno 0:00 0.00% 0.00% csh
This box is running -stable as of 3 days ago. I'm not sure whether this
is a software problem or a problem relating to available memory in the
kernel, so this might be the wrong list for this. I've attached my
'vmstat -m' output to this e-mail.
Any ideas, why this doesn't work or why it's stupid or impossible to do
are welcomed. Any other idea how to do chrooted ftp-access for a few
hundred users and still let them write into these NFS mounted folders
would be nice too. Most of these users can't use the shell, so I can't
have them upload files to a temporary storage space to be moved by hand
from the shell (and if they knew how to do this, I'd force them to use
scp...).
Regards,
Edvard
[-- Attachment #2 --]
Memory statistics by bucket size
Size In Use Free Requests HighWater Couldfree
16 201 55 4293 1280 0
32 164 92 1074 640 0
64 1600 64 15920 320 0
128 1194 22 2752 160 0
256 986 22 1718 80 0
512 36 4 153 40 0
1K 58 2 204 20 0
2K 24 0 26 10 0
4K 17 2 10720 5 0
8K 1 0 1 5 0
16K 11 0 11 5 0
32K 5 0 5 5 0
64K 2 0 2 5 0
256K 1 0 1 5 0
512K 0 0 2 5 0
Memory usage type by bucket size
Size Type(s)
16 NULLFS mount, uc_devlist, p1003.1b, routetbl, ether_multi, vnodes,
mount, pcb, soname, rman, bus, sysctl, kld, temp, devbuf, atexit,
proc-args
32 atkbddev, sigio, dirrem, diradd, freefile, freefrag, indirdep,
bmsafemap, newblk, in_multi, routetbl, ether_multi, ifaddr, vnodes,
cluster_save buffer, pcb, soname, taskqueue, SWAP, eventhandler, bus,
sysctl, uidinfo, subproc, pgrp, kld, temp, devbuf, proc-args
64 NULLFS node, NULLFS hash, file, AD driver, isadev, allocindir,
allocdirect, pagedep, NFS req, in6_multi, routetbl, ether_multi,
ifaddr, vnodes, vfscache, pcb, rman, eventhandler, bus, subproc,
session, ip6ndp, temp, devbuf, lockf, proc-args
128 ZONE, dev_t, freeblks, inodedep, routetbl, vnodes, mount,
timecounter, soname, ttys, bus, cred, kld, ip6ndp, temp, devbuf,
zombie, proc-args
256 file desc, FFS node, newblk, NFS daemon, routetbl, ifaddr, vnodes,
ttys, bus, subproc, temp, devbuf, proc-args
512 uc_devlist, ATA generic, UFS mount, ifaddr, mount, BIO buffer, ptys,
msg, ioctlops, bus, uidinfo, ip6ndp, devbuf
1K AD driver, NQNFS Lease, BIO buffer, sem, ioctlops, kld, temp
2K UFS mount, BIO buffer, pcb, bus, proc, devbuf
4K mbuf, UFS mount, sem, msg, kld, temp, devbuf
8K pagedep
16K shm, msg, kld, devbuf
32K VM pgdata, UFS ihash, inodedep, NFS hash, kld
64K vfscache, temp
256K SWAP
512K temp
Memory statistics by type Type Kern
Type InUse MemUse HighUse Limit Requests Limit Limit Size(s)
NULLFS mount 5 1K 1K 31795K 5 0 0 16
NULLFS node 22 2K 2K 31795K 22 0 0 64
NULLFS hash 1 1K 1K 31795K 1 0 0 64
atkbddev 1 1K 1K 31795K 1 0 0 32
uc_devlist 8 1K 1K 31795K 8 0 0 16,512
mbuf 1 4K 4K 31795K 1 0 0 4K
sigio 1 1K 1K 31795K 1 0 0 32
file 62 4K 5K 31795K 1920 0 0 64
file desc 28 7K 9K 31795K 338 0 0 256
AD driver 1 1K 2K 31795K 10668 0 0 64,1K
ATA generic 0 1K 1K 31795K 1 0 0 512
isadev 6 1K 1K 31795K 6 0 0 64
ZONE 14 2K 2K 31795K 14 0 0 128
VM pgdata 1 32K 32K 31795K 1 0 0 32K
dev_t 607 76K 76K 31795K 607 0 0 128
UFS mount 15 25K 25K 31795K 15 0 0 512,2K,4K
UFS ihash 1 32K 32K 31795K 1 0 0 32K
FFS node 844 211K 211K 31795K 884 0 0 256
dirrem 0 0K 1K 31795K 41 0 0 32
diradd 0 0K 1K 31795K 48 0 0 32
freefile 0 0K 1K 31795K 23 0 0 32
freeblks 0 0K 2K 31795K 21 0 0 128
freefrag 0 0K 1K 31795K 4 0 0 32
allocindir 0 0K 1K 31795K 1 0 0 64
indirdep 0 0K 1K 31795K 1 0 0 32
allocdirect 0 0K 1K 31795K 39 0 0 64
bmsafemap 0 0K 1K 31795K 20 0 0 32
newblk 1 1K 1K 31795K 41 0 0 32,256
inodedep 1 32K 35K 31795K 64 0 0 128,32K
pagedep 1 8K 9K 31795K 12 0 0 64,8K
p1003.1b 1 1K 1K 31795K 1 0 0 16
NFS hash 1 32K 32K 31795K 1 0 0 32K
NQNFS Lease 1 1K 1K 31795K 1 0 0 1K
NFS daemon 1 1K 1K 31795K 1 0 0 256
NFS req 0 0K 1K 31795K 257 0 0 64
in6_multi 6 1K 1K 31795K 6 0 0 64
in_multi 2 1K 1K 31795K 2 0 0 32
routetbl 60 9K 9K 31795K 85 0 0 16,32,64,128,256
ether_multi 28 2K 2K 31795K 28 0 0 16,32,64
ifaddr 22 5K 5K 31795K 22 0 0 32,64,256,512
vnodes 22 6K 6K 31795K 276 0 0 16,32,64,128,256
mount 14 7K 7K 31795K 16 0 0 16,128,512
cluster_save buffer 0 0K 1K 31795K 1 0 0 32
vfscache 1256 143K 143K 31795K 1542 0 0 64,64K
BIO buffer 56 64K 64K 31795K 111 0 0 512,1K,2K
timecounter 10 2K 2K 31795K 10 0 0 128
pcb 20 5K 5K 31795K 138 0 0 16,32,64,2K
soname 4 1K 1K 31795K 3716 0 0 16,32,128
ptys 3 2K 2K 31795K 3 0 0 512
ttys 487 62K 62K 31795K 1072 0 0 128,256
shm 1 12K 12K 31795K 1 0 0 16K
sem 3 6K 6K 31795K 3 0 0 1K,4K
msg 4 25K 25K 31795K 4 0 0 512,4K,16K
rman 35 2K 2K 31795K 392 0 0 16,64
ioctlops 0 0K 1K 31795K 15 0 0 512,1K
taskqueue 1 1K 1K 31795K 1 0 0 32
SWAP 2 173K 173K 31795K 2 0 0 32,256K
eventhandler 11 1K 1K 31795K 11 0 0 32,64
bus 283 24K 24K 31795K 551 0 0 16,32,64,128,256,512,2K
sysctl 0 0K 1K 31795K 59 0 0 16,32
uidinfo 5 1K 1K 31795K 9 0 0 32,512
cred 8 1K 2K 31795K 432 0 0 128
subproc 70 7K 8K 31795K 825 0 0 32,64,256
proc 2 4K 4K 31795K 2 0 0 2K
session 18 2K 2K 31795K 31 0 0 64
pgrp 21 1K 1K 31795K 73 0 0 32
kld 16 57K 62K 31795K 69 0 0 16,32,128,1K,4K,16K,32K
ip6ndp 3 1K 1K 31795K 4 0 0 64,128,512
temp 109 51K 985K 31795K 814 0 0 16,32,64,128,256,1K,4K,64K,512K
devbuf 65 170K 174K 31795K 10781 0 0 16,32,64,128,256,512,2K,4K,16K
lockf 3 1K 1K 31795K 83 0 0 64
atexit 1 1K 1K 31795K 1 0 0 16
zombie 0 0K 1K 31795K 310 0 0 128
proc-args 24 1K 2K 31795K 311 0 0 16,32,64,128,256
Memory Totals: In Use Free Requests
1305K 28K 36882
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1010875546.1942.0.camel>
