LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2011, 03:29 AM   #1
zaeem
Member
 
Registered: Jan 2010
Posts: 118

Rep: Reputation: 15
Confusion about the partition and its space


HI guys,

I have some confusion about one of my partition and the space it is taking. df -h output is given below;

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ddf1_ADVDTARTINGp1
494G 18G 452G 4% /
/dev/mapper/ddf1_ADVDTARTINGp2
379G 244G 116G 68% /var/lib/mysql
tmpfs 4.0G 0 4.0G 0% /dev/shm

above information is showing that /var/lib/mysql partition total size is 379 GB and it is 68% used. However when I execute command du -sh /var/lib/mysql it shows following output.

# du -sh /var/lib/mysql
45G /var/lib/mysql

Now I want to know what files are taking space to make the partition 68% used. I want to list down all files in that partition with size.

Please help me to sort out this issue.
 
Old 06-08-2011, 06:47 AM   #2
ssrameez
Member
 
Registered: Oct 2006
Location: bangalore
Distribution: Fedora, Ubuntu, Debian, Redhat
Posts: 82

Rep: Reputation: 6
I think it is the snapshot in the LVM taking space.
Can you fire a lvscan and paste the result here.
 
Old 06-08-2011, 06:51 AM   #3
zaeem
Member
 
Registered: Jan 2010
Posts: 118

Original Poster
Rep: Reputation: 15
Following is the output

# lvscan -D
lvscan: invalid option -- D
Error during parsing of command line.

# lvscan --disk
lvscan: unrecognized option `--disk'
Error during parsing of command line.

# lvscan -b
#
 
Old 06-08-2011, 06:55 AM   #4
ssrameez
Member
 
Registered: Oct 2006
Location: bangalore
Distribution: Fedora, Ubuntu, Debian, Redhat
Posts: 82

Rep: Reputation: 6
lvscan -a[ll]
 
Old 06-08-2011, 07:32 AM   #5
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 239

Rep: Reputation: 14
try "lvdisplay"
 
Old 06-08-2011, 08:21 AM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
df reports based on used blocks, du reports based on actuale file sizes (source: http://www.unix.com/unix-dummies-que...isk-space.html )

Further if files are deleted but actually still open in an application, df will see that they're still in use and du will not. You can find open files with lsof.

To see if the latter is the case, you can reboot your system. As this however seems to relate to mysql, stopping and starting mysql might also do the trick.
 
Old 06-08-2011, 08:47 AM   #7
zaeem
Member
 
Registered: Jan 2010
Posts: 118

Original Poster
Rep: Reputation: 15
Dear ssrameez and NM04,

Commands 'lvscan -a[ll]' and 'lvdisplay are not showing anything.
 
Old 06-08-2011, 08:48 AM   #8
zaeem
Member
 
Registered: Jan 2010
Posts: 118

Original Poster
Rep: Reputation: 15
Dear Wim Sturkenboom,

Thanks for your reply. As this is main database server so I can't restart mysql/server right now. However I will plan it out and will get back here if issue still persists.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 01:57 PM
Confusion about device drivers and user-space dkeefe3773 Linux - General 2 05-28-2011 10:46 AM
Partition Encryption - Errors and Confusion? orbit Slackware 3 06-06-2008 12:21 AM
Partition Confusion Controlpanel Linux - Newbie 3 09-11-2007 09:01 PM
a bit confusion between partition type farhan Linux - General 3 03-15-2003 02:07 PM


All times are GMT -5. The time now is 06:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration