In my GFS clusters I use the CDPN 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 log
I 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: NFS file with same name but different content depending on host