Results 1 to 4 of 4

Thread: Figuring this out

  1. #1
    Join Date
    Sep 2018
    Beans
    14
    Distro
    Ubuntu 18.04 Bionic Beaver

    Figuring this out

    Code:
    lrwxrwxrwx    1 root     root            73 Sep 15 19:53 ddecomd.log -> /vmfs/volumes/55788775-1acaf4c1-37db-a46c2a38969e/scratch/log/ddecomd.log
    How can I recreate this for another log? As this is one that already works.

    This one was done automatically, but my others weren't.

    I have all my logs writing to a SAN at /vmfs/volumes/55788775-1acaf4c1-37db-a46c2a38969e/scratch/log but my server only knows how to read from ~/var/log and I can't change it's defaults

    I was thinking to
    Code:
    touch syslog.log | ln -s syslog.log /vmfs/volumes/55788775-1acaf4c1-37db-a46c2a38969e/scratch/log/syslog.log
    This is the part I am stuck on thought, I don't know the proper terminology to look it up nor how to do it. but I do know I want it to look like this..maybe? Help?

    Code:
    lrwxrwxrwx    1 root     root            73 Sep 15 19:53 syslog.log -> /vmfs/volumes/55788775-1acaf4c1-37db-a46c2a38969e/scratch/log/syslog.log
    Last edited by jdeiros; September 18th, 2018 at 08:30 PM.
    "You're smarter than you look."

  2. #2
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Figuring this out

    TRy:

    Code:
    cat /var/log/syslog.log |less
    Note: there already is a log file called simply syslog in /var/log

  3. #3
    Join Date
    Sep 2018
    Beans
    14
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Figuring this out

    Quote Originally Posted by cariboo View Post
    TRy:

    Code:
    cat /var/log/syslog.log |less
    Note: there already is a log file called simply syslog in /var/log
    The things is I already tried that, and the person who built this told me that he had to move the default locations to the SAN on site because the microSD that the ESXi OS runs off is too small.

    That's why I'm asking about the links; the logs would still be stored on the SAN but I'd have a link in /var/log/ called syslog.log

    Do I make sense?
    "You're smarter than you look."

  4. #4
    Join Date
    Jul 2006
    Beans
    173
    Distro
    Xubuntu

    Re: Figuring this out

    I believe what you're looking for is...

    Code:
    ln -s /vmfs/volumes/55788775-1acaf4c1-37db-a46c2a38969e/scratch/log/syslog /var/log/syslog
    That will make a symbolic link "syslog" in /var/log/ that points to /vmfs/volumes/55788775-1acaf4c1-37db-a46c2a38969e/scratch/log/syslog

    Is this your only log file? Because perhaps you should use a mount --bind directive to mount the vmfs directory.

    Code:
    mount --bind /vmfs/volumes/55788775-1acaf4c1-37db-a46c2a38969e/scratch/log/ /var/log/
    You can make such a rule in your /etc/fstab for that as well, but the only thing I'm not sure of is if the system will mount this bind directory before other services run and log to the real /var/log directory

    Another solution might be simply to mount your volume's partition as the /var/log/ directory

    Code:
    mount /vmfs/volumes/55788775-1acaf4c1-37db-a46c2a38969e/scratch/log/ /var/log/
    That way the filesystem should boot up and mount your partition to /var/log/ before other services log to the /var/log/ in the root directory.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •