- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /var is full
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2012 09:05 PM
тАО04-26-2012 09:05 PM
Hello everybody!
I delete old logs and have 3gb free space on /var. But in some days /var again full!!!
I read all about /var here.
I used cleanup, delete all old logs, cp /dev/null /var/adm/wtmp, and wtmps, btmps... and i have about 200megs of free space, but!!!
after 1-2 minutes /var again was full!! I have no idea why its happens and what to do. Please help!
Sorry for my english...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2012 10:25 PM
тАО04-26-2012 10:25 PM
Re: /var is full
Have you used lsof to find deleted files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2012 01:11 AM
тАО04-27-2012 01:11 AM
Re: /var is full
No, i've not. I do not understand why i must find deleted files?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2012 10:23 AM
тАО04-27-2012 10:23 AM
Re: /var is full
>I do not understand why I must find deleted files?
You said it gets full after a few minutes. If this is not the logs and wtmps that you just removed, it could only be someone still writing to a deleted file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2012 10:32 AM
тАО04-27-2012 10:32 AM
SolutionDeleting log files is not always a good idea. If the files are large but you don't need the information, then truncate the files with either:
cat /dev/null > /var/adm/something.log or > /var/adm/something.log
so as to preserve the permission and ownership. If you simply delete a file -- and the file is still open -- the file will disappear from the directory but the space will not be returned. The process(es) keeping the file open must terminate before the space will be returned. Truncating the file reduces the size immediately. Since you deleted active logfiles, they are still growing but you cannot see them -- the name has been removed from the directory. Only a reboot will fix this. And when you have large log files, never delete or truncate them until you look at the most recent messages. You may have a critical disk or memory failure that must be resolved.
In general, start by finding the large directories (not files!). Use this command:
du -kx /var | sort -rn | head -20
which will sort all the directories by size, largest at the top. Then look inside the directory to see what is using all the space. DO NOT delete anything in /var/adm/sw! Use the cleanup command.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-01-2012 07:35 PM
тАО05-01-2012 07:35 PM
Re: /var is full
Thanks to all! The problem is solved by rebooting servers.
And you know what? I'm happy!)))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-03-2012 09:48 PM
тАО05-03-2012 09:48 PM
Re: /var is full
And to explain why a reboot fixed the problem, a process was probably creating a large file which you deleted. But as mentioned, the name disappears from the directory so you can't see it but until the process is terminated, the file is still there, continuing to grow. The reboot killed the process, and the space was reclaimed.
Bill Hassell, sysadmin