[OpenIndiana-discuss] NFS hidden files

Jim Klimov jimklimov at cos.ru
Tue Jun 5 13:12:52 UTC 2012


2012-06-05 16:31, Jose-Marcio Martins da Cruz wrote:
>>Well ... sort of.  What do you say when "rm -rf somedir" fails because
>> some of the files within "somedir," although owned by the invoker,
>> cannot be removed?
> That means that these files are still open and in use by some program,
> or some active process has its pwd inside "somedir", or some process
> ended without cleanly close its open files. Am I wrong ?
>
> Either way, IMHO, it's usually not the fault of NFS system.

I believe, there is also a scenario where a program opens a file,
deletes (unlinks) it from the filesystem, and uses the file handle.
Beside being a byproduct of a user deleting files still opened by
some program, this is often used for secure temporary files which
no-one can now break into - because there is no reference to the
file from any directory (but the FS inode exists until the file
handle is closed by the original program).

I wonder if in such cases the NFS server should hide the inode
(i.e. in case of ZFS - use some special directory under .zfs in
the dataset which contains the removed file) in order to allow
removal of directories as you outlined above.

QUESTION: I also wonder if there is an NFS-protocol action for
a server to send a "hint" to the NFS client, for example, if
the storage server is going to gracefully disable itself upon
poweroff, etc. Namely, compliant clients would flush their data
to disk and stop their server processes or failover to another
replica of the storage server, if available. This would allow
proper shutdowns of VMs with NFS-based disk images, databases
over iSCSI, etc. when the server goes down. Is that possible
or implementable as an RFE?

One scenario I do think of in particular is gracefully shutting
down a farm of servers upon an UPS on-battery event, where the
storage servers and the compute servers might rely on different
power sources, and the storage one happens to go down first
(before the VM hosts begin to shut down).

Thanks,
//Jim



More information about the OpenIndiana-discuss mailing list