LinuxQuestions.org
Visit Jeremy's Blog.
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 08-01-2015, 11:15 AM   #1
yogeshjadhav96
Member
 
Registered: Jul 2015
Location: Bangalore, India
Distribution: RHEL 7
Posts: 36

Rep: Reputation: Disabled
Unhappy 'df -h' wrong result, du show perfect one


Filesystem Size Used Avail Use% Mounted on
/dev/sda2 46G 43G 450M 99% /
/dev/sda1 996M 171M 774M 19% /boot
tmpfs 24G 0 24G 0% /dev/shm
/dev/sdb 2.7T 2.0T 713G 75% /data1
/dev/sdd 2.7T 2.0T 746G 73% /data2
dd_890_sw1:/backup/DCA-TST
150T 94T 56T 63% /backup/DCA-TST
[root@sdw4 /]# ls
backup bin boot data data1 data2 dev etc home lib lib64 lost+found media misc mnt net opt proc root sbin selinux srv sys tftpboot tmp usr var
[root@sdw4 /]# du -sh *

85T backup
7.4M bin
138M boot
827M data
2.0T data1
2.0T data2
300K dev
100M etc
2.3G home
1.1G lib
27M lib64
16K lost+found
8.0K media
8.0K misc
8.0K mnt
4.0K net
3.6G opt
0 proc
208K root
42M sbin
8.0K selinux
8.0K srv
0 sys
688M tftpboot
84K tmp
5.5G usr
289M var
 
Old 08-01-2015, 01:10 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Huge amounts of unexplained used space in the root filesystem are almost always due to files hidden under an active mount point, perhaps due to making a backup while nothing was mounted on /backup/DCA-TST . Try this:
Code:
mkdir /tmp/tmproot
mount --bind / /tmp/tmproot
du -sh /tmp/tmproot/*
That allows you to work with the root filesystem as though nothing were mounted on any of the mount point directories. If you see large amounts of space used there, you can look at the files and see what should be moved to its proper location or perhaps removed entirely.

After you're done cleaning up,
Code:
umount /tmp/tmproot
rmdir /tmp/tmproot
 
1 members found this post helpful.
Old 08-02-2015, 03:50 AM   #3
yogeshjadhav96
Member
 
Registered: Jul 2015
Location: Bangalore, India
Distribution: RHEL 7
Posts: 36

Original Poster
Rep: Reputation: Disabled
Thanks rknichols for the reply.

There are only two hidden files of very less size
 
Old 08-02-2015, 08:00 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
The other possibility is a deleted file that is still held open by some process. It's pretty unusual for that to take up 30+ GB, but you can look for it by running
Code:
lsof | grep -i del | less
and scrolling down through the list looking for something huge. Other than hidden or deleted files, the only possibility I know of is filesystem corruption, and you would need to shut down and force an fsck to check for that.
 
1 members found this post helpful.
Old 08-02-2015, 01:52 PM   #5
yogeshjadhav96
Member
 
Registered: Jul 2015
Location: Bangalore, India
Distribution: RHEL 7
Posts: 36

Original Poster
Rep: Reputation: Disabled
Thumbs up

Thanks rknichols...
I got one file which open in one process... That is almost of 28GB
Thanks Again
 
Old 08-02-2015, 04:09 PM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by yogeshjadhav96 View Post
I got one file which open in one process... That is almost of 28GB
Wow! That'll do it. Hopefully you can figure out why that happened and keep it from happening again.
 
1 members found this post helpful.
  


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
show many different ways to print the result to the screen ? stetas Linux - General 1 01-18-2014 05:15 PM
which command can show the result of the linux you are using? Mike.JIn@Shanghai Linux - Newbie 7 11-08-2012 12:57 AM
Show images from a database result. conesh Programming 2 06-25-2010 04:27 PM
show for-loop result in one zenity dialog Dr_Death_UAE Programming 3 11-01-2009 03:04 PM
df -h wrong result ? csrh Linux - General 2 03-08-2005 08:35 AM

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

All times are GMT -5. The time now is 06:37 PM.

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