jail nullfs question

is there anyway to make nullfs mounts stay current?

like....let's say i have a folder /mnt/stuff
and i use nullfs to mount it on /usr/jails/ftpjail/stuff
it seems everything that is in the folder at the time of it being mounted shows up from the nullfs mount but anything added to the folder AFTER that doesn't seem to show up.

is there anway to fix this?
 
Are you sure you mounted correctly?

I use nullfs quite a lot and I never have that issue.
 
You need to mount it correctl. Here is what I put in fstab:
Code:
/usr/jails/foo /jails/smtpd/foo nullfs ro 0 0
 
vivek said:
You need to mount it correctl. Here is what I put in fstab:
Code:
/usr/jails/foo /jails/smtpd/foo nullfs ro 0 0

that is EXACTLY what mine looks like.

I did it in a file per jail fstab (/etc/fstab.jailname)
the original directory is a download directory for torrents, the mounted one is an ftp directory inside a different jail. Perhaps it's a problem with ZFS considering this is all on zfs but for some reasons files that are added after the time of mount don't seem to show up in the ftp jail.
 
i'm wondering now if i need to add an fstab entry for the every folder that is it's own zfs filesystem.
one of the reasons i use zfs is because of the quota and reservation limits you can set...i'll try adding them and report back...

i'm pretty sure it is zfs causing the issue.


edit:

ok, it is defendant zfs causing the issue. Apparently the zfs directory structure doesn't automatically conform to the normal one, i'm sure it's something to do with the way zfs handles mount points
for instance, i've done something like this:
Code:
zfs create tank/foo
zfs create tank/foo/bar
zfs create tank/foo/bar2
zfs create tank/foo/bar2/woo
zfs set mountpoint=/usr/jails/wwwjail/foo tank/foo
and inside of the jail, i just go to foo and eveyrhting is there.

if i use nullfs to mount foo on another jail, it works but it doesn't preserve the directory structure.

so my question is, short of adding each new zfs mount to fstab.jail manually is there a way to mount just /usr/jails/wwwjail/foo into another jail and preserve the directory structure.
 
so does anyone know of a way to mount a zfs filesystem and all it's children recursively in 2 jails?
is it even possible short of manually mounting each child filesystem with fstab.jail?
 
Back
Top