Is there a way to achieve context-dependent path names (CDPN) on NFS?
1
vote
1
answer
262
views
In my GFS clusters I use the [CDPN](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Global_File_System/s1-manage-pathnames.html) feature to have separate chrooted
/dev/log
directories on separate cluster nodes:
/home/ftpuser/foo: lrwxrwxrwx 1 root root 18 Sep 26 2010 dev -> .sys/@hostname/dev /home/ftpuser/foo/.sys: drwx--x--x 3 root root 3864 Sep 26 2010 server1.example.com drwx--x--x 3 root root 3864 Sep 26 2010 server2.example.com drwx--x--x 3 root root 3864 Sep 26 2010 server3.example.com /home/ftpuser/foo/.sys/server2.example.com: drwx--x--x 2 root root 3864 Sep 25 09:34 dev /home/ftpuser/foo/.sys/server2.example.com/dev: srw-rw-rw- 1 root root 0 Sep 25 09:23 log /home/ftpuser/foo/dev: (transparently picking 1 subdir depending on node name) srw-rw-rw- 1 root root 0 Sep 25 09:23 logI use this so the rsyslog daemon on each node doesn't interfere with eachother. It works because
@hostname
in a path is replaced with the hostname of the host that interprets it, so different hosts get a different directory. The clusters are active on all nodes simultaneously.
My questions:
* Is there a way to get corresponding functionality on an NFS share?
* Could it in theory be implemented in the linux kernel on all filesystems (via a mount option so it doesn't break stuff by default)?
This question is similar but not identical to this one: https://unix.stackexchange.com/questions/134815/nfs-file-with-same-name-but-different-content-depending-on-host
Asked by MattBianco
(3806 rep)
Nov 10, 2014, 10:54 AM
Last activity: Dec 30, 2014, 03:56 PM
Last activity: Dec 30, 2014, 03:56 PM