LinuxQuestions.org
Help answer threads with 0 replies.
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 03-16-2010, 06:55 AM   #1
klmklm
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Rep: Reputation: 0
Disk Usage Information


Hi,

I am trying to get my head around my new server. I am using CENTOS 5.4 x86_64 with 300GB harddrive.

The 300 GB been partitioned with the following:

Device Size Used Available Percent Used Mount Point
/dev/md0 99M 18M 77M 19% /boot
/dev/md1 16G 8.7G 5.8G 61% /
/dev/md2 246G 40G 194G 18% /home
/dev/md3 4.8G 1.6G 3.0G 35% /var
/usr/tmpDSK 3.9G 432M 3.3G 12% /tmp

I have increased teh tmpDSK as it was getting full very quickly.

My question is, what are these md0; md1, md2 and md3 are they harddrive partitions and as md1 is getting full will that have an impact on my sites.

Many thanks in advance.
 
Old 03-16-2010, 06:59 AM   #2
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Here md stands for Meta Device, these are basically the raid partitions.
I guess the md0 partition is configured as raid 0 meta device, and ya if its getting full, you'll be out of disk space soon so take appropriate measures accordingly.

Last edited by Sayan Acharjee; 03-16-2010 at 07:02 AM.
 
Old 03-16-2010, 07:18 AM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Quote:
what are these md0; md1, md2 and md3 are they harddrive partitions
Yes, they are hard drive partitions and they are mounted to the directories shown at the end of the line. So md0 is mounted to /boot and md1 is mounted to /. That is a fairly typical partition and mounting scheme. Mine isn't much different.

Quote:
I have increased teh tmpDSK as it was getting full very quickly.
12% is getting full? If you're worried about /tmp getting full you can always run a cron job to clean out files older than a month. I do that on my server and it has never had any ill effects.

Quote:
md1 is getting full will that have an impact on my sites.
I wouldn't call 61% getting full. Granted, 6G isn't a lot of free space, but since /home, /var and /tmp are mounted on different partitions you probably don't need a lot more space unless you're installing a lot more software. I've routinely run with partitions that are 90% or more in used without any ill effects.

Are you actually seeing problems or is this just confusion around these numbers?
 
Old 03-16-2010, 07:24 AM   #4
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
@Hangdog42, The percentage shown in the OP's post is the available space, not used space.
 
Old 03-16-2010, 07:31 AM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Cripes, I have got to stop answering questions before the coffee kicks in. You're 100% right. Still, I don't see anything there that raises huge red flags unless there are performance problems. /tmp should be easy to clean out, as would /home and /boot doesn't need any more unless the OP is going to have a bunch of kernels lying around. Without a better idea of how the OP is using the machine, it is tough to figure out if more disk space is needed or not.
 
Old 03-16-2010, 07:31 AM   #6
klmklm
LQ Newbie
 
Registered: Nov 2009
Posts: 3

Original Poster
Rep: Reputation: 0
tmp space

Thanks for the quick reply....

Hangdog42 you said you run a cron to clear the tmpDSK, are you able let me know how to do it as I've increase the drive as it keeps getting full all the time. Someone suggested to create a shell script like the following:


#!/bin/sh

for file in "$( /usr/bin/find /tmp -type f -mtime +2 )"
do
rm -f $file
done

Then make it executable

is that correct, and how do I make it executable?

Many thanks in advance
 
Old 03-16-2010, 09:01 AM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,714
Blog Entries: 27

Rep: Reputation: 2057Reputation: 2057Reputation: 2057Reputation: 2057Reputation: 2057Reputation: 2057Reputation: 2057Reputation: 2057Reputation: 2057Reputation: 2057Reputation: 2057
Hi,

Quote:
Originally Posted by klmklm View Post
Hi,

I am trying to get my head around my new server. I am using CENTOS 5.4 x86_64 with 300GB harddrive.

The 300 GB been partitioned with the following:

Device Size Used Available Percent Used Mount Point
/dev/md0 99M 18M 77M 19% /boot
/dev/md1 16G 8.7G 5.8G 61% /
/dev/md2 246G 40G 194G 18% /home
/dev/md3 4.8G 1.6G 3.0G 35% /var
/usr/tmpDSK 3.9G 432M 3.3G 12% /tmp

I have increased teh tmpDSK as it was getting full very quickly.

My question is, what are these md0; md1, md2 and md3 are they harddrive partitions and as md1 is getting full will that have an impact on my sites.

Many thanks in advance.

Quote:
Originally Posted by sayan_acharjee View Post
@Hangdog42, The percentage shown in the OP's post is the available space, not used space.
I'm sorry but the human readable output for the command does show the percentage of the total space on the device that is used. For the OPs' '/boot' on '/dev/md0' that has a total space of '99M' with '18M' used has a percentage of '19%' for the total space leaves '77M' available for storage.

 
Old 03-16-2010, 11:32 AM   #8
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
That shell script would work, but I do mine with a one-liner:
Code:
/usr/bin/find /tmp -mtime +2 -exec rm -R {} \;
That deletes anything that is 2 days old or older. Adjust the path to find and the delete time to your tastes.

Quote:
and how do I make it executable?
You use the chmod command to make a file executable. If you run chmod +x filename, that would do the trick, however it also would make it executable by anybody. For finer grained control, have a look at the man page as it explains it fairly well.
 
Old 03-16-2010, 06:51 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Conventionally on Linux, the md signifies a raid drive of some sort.
Try

mdadm --detail /dev/md0

for each one ie md0, md1, md2

Also see

cat /proc/mdstat
 
  


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
displaying bandwidth usage information on an network wanas Linux - Networking 15 04-17-2009 11:15 PM
Script for getting host information,disk usage and all details o/p should be in html kishorem666 Linux - Server 4 09-17-2008 08:30 AM
Traffic usage information NixMaster Linux - Networking 1 09-12-2006 06:34 PM
Disk Usage Information on HP-UX anuradha06 Other *NIX 1 05-12-2006 04:40 PM


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