LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-19-2013, 02:24 AM   #1
lovelypingu
LQ Newbie
 
Registered: Dec 2013
Location: Lahijan
Distribution: Centos
Posts: 4

Rep: Reputation: Disabled
Question problem with a partition


hello dear friends,
i have a problem with one of my s-ata drive's partitions.
this problem is that when i check "df -h" output, it shows that 97% of a partition is used.
but when i check its size with "du -sh", the output shows that there is just 57% disk usage.
i done below actions, but the problem didn't solve yet:
1 - check "lsof" and there isn't any program that use this partition.
2 - reboot this machine.
3 - use "quotacheck -augm".
4 - use "fsck -f -C0 -y".
5 - mount and unmount it.

do you have any solution to solve the problem?
 
Old 12-19-2013, 02:44 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
I'm not really sure if there was any problem.
1. df shows the free and used space of the device.
2. du displays the sum of the occupied space of the files. But it may miss some of your dirs (for example the ones beginning with .)
So it would be nice to see exactly how did you execute those commands (and in which dir, which user...)
 
Old 12-19-2013, 10:46 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Does that filesystem contain any mount points where other filesystems are mounted? If so, data could be hiding under that active mount point.
 
Old 12-19-2013, 10:42 PM   #4
lovelypingu
LQ Newbie
 
Registered: Dec 2013
Location: Lahijan
Distribution: Centos
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
I'm not really sure if there was any problem.
1. df shows the free and used space of the device.
2. du displays the sum of the occupied space of the files. But it may miss some of your dirs (for example the ones beginning with .)
So it would be nice to see exactly how did you execute those commands (and in which dir, which user...)
hello dear,
i run this cmd(du -sh) in main directory(mount point).
also i check hidden files with "ls -all", there isn't any hidden file.

Quote:
Originally Posted by rknichols View Post
Does that filesystem contain any mount points where other filesystems are mounted? If so, data could be hiding under that active mount point.
hello dear,
there isn't exists any other mount point for that partition.

Last edited by lovelypingu; 12-19-2013 at 10:44 PM.
 
Old 12-20-2013, 01:35 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
what is the problem?

i am not sure what the commands 3) and 4) from your first post are supposed to do. can you elaborate?

please show us the complete terminal output from the commands you mentioned in your last post.

and please don't call me dear.
 
Old 12-21-2013, 09:24 AM   #6
lovelypingu
LQ Newbie
 
Registered: Dec 2013
Location: Lahijan
Distribution: Centos
Posts: 4

Original Poster
Rep: Reputation: Disabled
Smile

hello my friend
i attached the output of the commands.
Attached Thumbnails
Click image for larger version

Name:	df_cmd.GIF
Views:	23
Size:	3.7 KB
ID:	14288   Click image for larger version

Name:	du_cmd.GIF
Views:	20
Size:	4.3 KB
ID:	14289  
 
Old 12-21-2013, 09:57 AM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by lovelypingu View Post
there isn't exists any other mount point for that partition.
From the thumbnails, I see that is your root filesystem. It contains mount points I can see for /boot, /home2, /home3, and /tmp, and undoubtedly has several more not shown (/proc, /dev, ...). Any of those mount point directories in the root filesystem could contain files that are hidden from du.

There is a way to access what might be hidden under those mount points.
Code:
mkdir /mnt/tmproot
mount --bind / /mnt/tmproot
du --max-depth=1 /mnt/tmproot
Large numbers for any of your mount point directories show you where data is hidden. You can access that data under /mnt/tmproot to copy it elsewhere or delete it if, for example, it turns out to be an old version of what is now stored in /home3 on /dev/sdc1. After you have finished cleaning out that hidden data, you should
Code:
umount /mnt/tmproot
rmdir /mnt/tmproot
 
Old 12-22-2013, 10:05 PM   #8
lovelypingu
LQ Newbie
 
Registered: Dec 2013
Location: Lahijan
Distribution: Centos
Posts: 4

Original Poster
Rep: Reputation: Disabled
thank you dear rknichols,
your solution solved my problem.
 
  


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
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM
,dmrc problem after moving /home partition to NTFS partition yeehung Linux - Newbie 1 11-14-2007 06:17 AM
Partition problem with Qtparted in Knoppix variety & mp3 support problem in FC3 eypros Linux - Software 1 06-01-2005 07:12 PM
boot problem/ partition problem? ian sil Linux - General 1 05-10-2005 06:08 PM
Problem Resizing Linux Partition From Partition magic John_Emad SUSE / openSUSE 5 02-16-2005 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:45 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