0

Our server (Ubuntu 18) has a large partition mounted as /publish/data (its a VM, provided as IaaS so that is how it is mounted when extra disk space is requested), it is defined in fstab as follows: /dev/vdb1 /publish/data ext4 defaults,nofail 0 0

I've configured docker to use journald to store our application's logs, and they are massive, in the GBs of data (root system drive has only like 20gb space).

So I need to probably stop systemd, move the log files to something like /publish/data/log/journal.

I created a /publish/data/log/journal, but how do I configue this in fstab, to mount automatically overriding the default /var/log/journal?

Carmageddon
  • 161
  • 7
  • 2
    Possible duplicate of [What is the difference between symbolic and hard links?](https://unix.stackexchange.com/questions/9575/what-is-the-difference-between-symbolic-and-hard-links) – 0xSheepdog Apr 23 '19 at 15:24
  • You should create the new file system, update the /etc/fstab entries to point to it, and reboot. Best way to preserve all logs. The full technical details are pretty involved. – 0xSheepdog Apr 23 '19 at 15:27
  • @0xSheepdog Could you elaborate please? I read the link and it seems I cant use hard links as those are two different partitions... I dont understand what do you mean by creating a new file system.. a soft link is not gonna work? – Carmageddon Apr 23 '19 at 15:36
  • @0xSheepdog I have rewritten the question, since now its obvious sym link is probably not the answer.. – Carmageddon Apr 23 '19 at 16:35

0 Answers0