mount_nullfs not distinct paths

Hello everyone,

is there any way to attach (mount) nullfs layer to the same place as the old layer ? For example:

Code:
mount -t nullfs /test /test

The result of this command is that those paths are not distinct paths. So is there any way to do that ? Is it even possible ?

Thanks.
 
Well, because I want to hide the underlying layer and I want to access to this layer only through the nullfs (or another) layer above.

I certainly should mount nullfs to another place in filesystem, but the files will be accessible from more than one place and I do not want this.

Do you have any suggestions ?
 
I have done some experiments with mount_nullfs and removed failsafe which stops me from mounting nullfs layer to the same place as old layer. Now I konw that it is not possible, at least by this easy "nullfs hack" way, beacuse of "Resource deadlock".

Well then, I suppose there is not any easy way to do that ... :(
 
lithius said:
Well, because I want to hide the underlying layer and I want to access to this layer only through the nullfs (or another) layer above.

Why? Please tell me what you want to do because I have no idea what you're trying to accomplish.
 
Ok then.

I am going to write fs layer which should provide functionality similar to Redirfs in Linux. Redirfs is linux kernel module which is intended to be used by so called filter. It provide interface to register some inode, dentry and file operations, which when are called are first redirected to the filter (encrypt data etc...) and then particular operation of underlying filesystem is called.

So nullfs in FreeBSD seems to me as good thing to start with. But, in order to provide simple usability I thought that it would be nice to just mount this layer above the old filesystem, without need to attach it somewhere else.

So I just asked if there is some simple way to do this (mounting new layer to the same place as the old layer).
 
lithius said:
I am going to write fs layer which should provide functionality similar to Redirfs in Linux. Redirfs is linux kernel module which is intended to be used by so called filter. It provide interface to register some inode, dentry and file operations, which when are called are first redirected to the filter (encrypt data etc...) and then particular operation of underlying filesystem is called.
I might misunderstood you here but it sounds exactly like what GEOM is doing now.

See geom(8).
 
Well, I must admin that I am pretty new in FreeBSD so I am not familiar with GEOM. I will look at it closely.

Anyway, thank you for this tip.
 
Back
Top