1833758 Members
1918 Online
110063 Solutions
New Discussion

Linking directories

 
SOLVED
Go to solution
Arthur_3
Regular Advisor

Linking directories

I need some advise.


I have to link a log directory in /var to a larger partition as var keeps filling up.

What is the most appropriate link to use and sym link or hard link?

Does the link get removed when the system is booted?

Thanks for your advise

5 REPLIES 5
Solution

Re: Linking directories

It has to be a symbolic link - hard links cannot span seperate file systems.

The link will be permanent across reboots.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Rob Galloway_1
Frequent Advisor

Re: Linking directories

You can only use a softlink between filesystems.

And Yes they do remain after a system restart.

R.
Experience is a hard teacher. It tests first and teaches afterward.
Rainer von Bongartz
Honored Contributor

Re: Linking directories

A symbolic link will be find.
It will be persitent on reboots.

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Bill Hassell
Honored Contributor

Re: Linking directories

There are several directories that need help in /var as they can independently grow and fill /var. The easiest way to determine which directories need to be separated is to use a du summary:

du -kx /var | sort -rn > /tmp/du.var

Now look at the /tmp/du.var file starting at the top. If you have a large amount of email (often caused by lazy mail users that never delete old mail), then /var/mail may be hundreds of megs. Similarly, /var/spool may fill due to printers that have paper jams. And /var/adm has the majority of log files. Here's a quick list to look at:

/var/spool
/var/mail
/var/adm
/var/adm/crash
/var/adm/sw
/vat/tmp

Now cxron is your friend when it comes to providing a free helper to cleanup these directories. But if you consistently have one or two directories that fill up rapidly, better to put them on their own filesystem such that when it fills up, the rest of the system still continues to run.


Bill Hassell, sysadmin
Robert Anderson
Advisor

Re: Linking directories

I realize this is quite an old post, but in this post, you mention that the link should remain after reboot. We have linked /usr/tmp to a different location. The link works fine, but when we re-boot, it reverts back to linking to /var/tmp. Any help would be greatly appreciated!
Don't think meat! It can only hurt the team!