0

I have a question about symlinks that I cant fullunderstand. I have next schema:

Machine1: /opt/xxx/logs
Machine2: /opt/xxx/logs
Machine3: /opt/xxx/logs
Machine4: /opt/xxx/logs
Machine5: /opt/xxx/logs
SharedFolder:/logs

First, We had a shared folder with all logs of all machines but our app have a lot of logs writes and the disk write/read load is too high. We are minimizing our Logs writing, but We want try some alternative to keep the shared folter with all logs of all machines (Currenty We have to disabled the shared folder because the machines work slow or goes down)

We thinked this: All machines will have a symlink targeting their log folder in the shared folder. This way all disk writing is in each machine but we can see all logs in the same folder without affect the perfomance. It is this possible?

   Machine1: /opt/xxx/logs -> symlink (Sharedfolder:/logs/machine1)
   Machine2: /opt/xxx/logs -> symlink (Sharedfolder:/logs/machine2)
   Machine3: /opt/xxx/logs -> symlink (Sharedfolder:/logs/machine3)
   Machine4: /opt/xxx/logs -> symlink (Sharedfolder:/logs/machine4)
   Machine5: /opt/xxx/logs -> symlink (Sharedfolder:/logs/machine5)
   SharedFolder:/logs (will contain 5 folders, but not write here)

Sorry my english.

user1422434
  • 101
  • 2

1 Answers1

3

Yes, it absolutely is possible, you just have to NFS-export your log folder on each machine and then mount them all in a common location.

Sven
  • 97,248
  • 13
  • 177
  • 225