LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-22-2018, 09:25 AM   #1
Jacob-1
LQ Newbie
 
Registered: Dec 2017
Posts: 7

Rep: Reputation: Disabled
Free disk space is less than 20% on volume /z/x/y


Hi

I m using Zabbix to monitor that server, and I receive that message, what is the best way to free the space in that file .

Here are my server disk usages.

#df -h
Filesystem Size Used Avail Use% Mounted on

10.10.2.24 :/file1/file2
453M 341M 85M 81% /z/x/y

Last edited by Jacob-1; 01-22-2018 at 09:38 AM.
 
Old 01-22-2018, 10:12 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
It depends a lot on what is in filesystem, /z/x/y.

You could go to /z/x/y then run "du -sk * |sort" so it gives you sorted output by size to see what is taking up the most space. If you see subdirectories you could run that within the largest to see what within each is taking up space.

If the filesystem is under /home you might use that to identify largest users and tell them to clean up their own files.

if the filesystem is /tmp or /var/tmp you might be able to remove the oldest files you see there. Before removing a file run lsof against it to be sure it is not currently in use.

If the filesystem is something else you'd need to determine what is safe to remove. Many applications create temporary files and/or logfiles under their own directory structure so it is often safe to remove older files of those types. Failing that, you sometimes need to stop the application, truncate the log, then restart the application.

DO NOT DELETE FILES (EVEN LOGS) IF THEY ARE IN USE AS SHOWN BY LSOF.
When you delete an "open" file it doesn't really go away - only the name does - the inode is still using as much space as it did before the deletion and the only way to reclaim the space is to stop the application that was holding the file open.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign free space to logical volume and extend /var partition ccc Red Hat 1 11-24-2017 05:47 PM
How to create Logical Volume from free space of existing Volume Group? AdultFoundry Linux - Newbie 6 12-19-2016 05:59 AM
how to create volume with lvcreate when no free space mhetreys Linux - Newbie 6 07-01-2015 05:16 AM
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 12:57 PM
ran out of disk space var qwertyjjj Linux - Newbie 5 10-06-2011 07:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration