masking filesystem mount

Jason Keltz jas at cse.yorku.ca
Fri Dec 6 15:06:13 UTC 2013


Hi..

I'm using FreeBSD 9.2 system as a backup/archive pooling server.  At the 
moment, one of the servers being backed up is a Linux file server.  
Assume that the file server has a directory "/export/home" which 
contains home directories, user1, user2, and user3.  Every day, the file 
server is backed up to the pooling server creating a structure something 
like:
/backup/home:
user1/ user2/ user3/
Of course the best part is:
/backup/home/.zfs/snapshot:
day1/ day2/ day3
(then of course user1/ user2/ user3/ under each day)

I'd like to automount the contents of a users snapshot directory onto a 
departmental system.  However, I'd prefer if the user sees just their 
own files in their arc directory, and not everyone elses.
That is, when user1 using one of our systems changes into say, 
/arc/user1, he should see:
day1/ day2/ day3/

... but when he goes into day1/ da2/ day3, he should see only his 
directory - not everyones.

To make this happen, I wonder if there's a way to mount a whole 
filesystem, but somehow provide a "mask" that can be used to "hide" 
parts from view.  In this case, if I could somehow specify a regexp like 
^*/user1/* so that user1 sees only his files, this would be good.

I think the answer is no, but it's an interesting "problem".

(Yes, if I snapshotted each users home directory separately, there would 
be no problem).

By the way -- one other question on the topic of ZFS snapshots.  I 
notice that a question as to why you cannot do a "pwd" in a .zfs 
directory has been asked before...   apparently pwd works works if you 
make .zfs visible (which I haven't tried since I don't want .zfs to be 
visible).  My question is -- what is the technical reason this isn't 
possible?  On the surface, sounds like something that should be easily 
to fix.  Underneath, I guess it's more tricky...  I just know it seems 
logical to me to be able to do a pwd in a .zfs directory whether .zfs is 
visible or not.

Thanks..

Jason.




More information about the freebsd-fs mailing list