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 02-16-2012, 07:21 PM   #1
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Rep: Reputation: 0
df -h | why is space missing from the hard drive


I just installed and created a new software raid 5 array. Nothing is on it but df -h says 200MB are used. Can someone explain this for me? It's /dev/md1

Code:
test@NAS:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/NAS-root  6.9G  5.9G  709M  90% /
udev                  241M   12K  241M   1% /dev
tmpfs                 100M  752K   99M   1% /run
none                  5.0M     0  5.0M   0% /run/lock
none                  248M     0  248M   0% /run/shm
/dev/sda1             228M   86M  130M  40% /boot
/dev/md0              1.8T  1.6T  157G  91% /mnt/storage
/dev/md1              1.8T  196M  1.7T   1% /mnt/storage2
 
Old 02-16-2012, 08:12 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
There's some overhead for the default inode setups etc
Try http://linux.die.net/man/8/tune2fs, specifically
Quote:
The current values of these options can be displayed by using the -l option to tune2fs(8) program, or by using the dumpe2fs(8) program.
Also, by default Linux reserves (usually) 5% for root use only for recovery and anti-fragmentation use by the FS code.
See http://linux.die.net/man/8/mke2fs etc

Last edited by chrism01; 02-16-2012 at 08:14 PM.
 
Old 02-16-2012, 08:30 PM   #3
NEQTAN
Member
 
Registered: Jan 2012
Location: ND USA
Distribution: Linux Mint 12
Posts: 52

Rep: Reputation: 1
I was recently reading about this.

There are a few key factors:
  • The "actual" size on a disk compared to the "stated" size differ.
  • Bad sectors can account for loss of space.

But for you using RAID is most likely to blame. "The loss of disk space is basically 100 divided by the number of disk drives. With 3 drives, there is a 33% loss of disk space. With 5 drives, there is a 20% loss of disk space."

References:

http://www.pcguide.com/ts/x/comp/hdd...ngSpace-c.html

http://www.hardwaresecrets.com/article/482

RAID reference:

http://www.ahinc.com/raid.htm#RAID%205

I hope this helps.

Neq
 
Old 02-16-2012, 09:21 PM   #4
daisychick
Member
 
Registered: Nov 2006
Location: Texas
Distribution: ubuntu 12.04 LTS
Posts: 154

Original Poster
Rep: Reputation: 0
well.... PFFFT. And here I was thinking I was gaining space! LOL> Maybe it's time to get some more hdds and grow this thing.
 
Old 02-16-2012, 11:08 PM   #5
NEQTAN
Member
 
Registered: Jan 2012
Location: ND USA
Distribution: Linux Mint 12
Posts: 52

Rep: Reputation: 1
saving space+partitioning schemes

Im sure you have done enough of your own homework on the subject . But for the sake of discussion I wanted to throw out a few links worth looking over that could help anyone learn how good partition scheme methodology can save space.

Pretty good, as stated in the article it references "the why not the how":

http://maketecheasier.com/quick-guid...mes/2009/12/17

Again more of a why and not so much on how, but much more in depth:

http://content.hccfl.edu/pollock/AUn...rtitioning.htm

Now making all these partitions for each aspect is argued to have its own space problems. It is said that each partition will have certain amounts of wasted space. But I think the wasted space is less than that of what would be consumed by the system if allowed to have all the space it wanted. Logs, dumps, etc. all keep filling up if not managed. Then to keep in mind if you wanted run the fsck command, the smaller the partition the less time it would take to run through.

Also another thing that may be debatable. I have read that swap space was created for linux during a time when ram / memory was hard to come by. What with older machines most had at best 256mb or 512mb? Somewhere around there. So the swap was utilized as a way to create the ram space that the sticks could not offer. Today I think it is a waste to have a swap space. That is unless you are dual booting and / or have many users.

You can read this discussion if you care to:

http://stackoverflow.com/questions/1...opment-machine

I hope this is of some help and use.

Neq
 
Old 02-16-2012, 11:18 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
Quote:
I have read that swap space was created for linux during a time when ram / memory was hard to come by.
Actually no, it was invented by IBM for their mainframes way back in the 1960s and referred to as virtual memory.
Basically a way of handling progs+datasets that were too big to fit in the equiv of RAM.

Its true that early PCs were very RAM limited, so swap was pretty much a sine qua non, see also pagefile in MSWin.

These days most home systems could maybe manage without, although hibernating a laptop requires swap space to put RAM content into.
Having swap does mean that if their workset gets too big, the machine will gradually slow down as swap usage occurs, as opposed to just dying or the OOM-killer kicking in immediately,
 
Old 02-17-2012, 09:35 AM   #7
NEQTAN
Member
 
Registered: Jan 2012
Location: ND USA
Distribution: Linux Mint 12
Posts: 52

Rep: Reputation: 1
Swap

@chrism01

Thanks for that. Good info to know. Did not know swap dates back to the sixties.

I supose yes, it is good to be safe and have a swap partition. But as you said "most home systems". How is the typical home user going to surpass todays 1g - 8g ram cap.? I have run multiple mem. tests, yes swap gets used during those tests but thats how the tests are designed as far I can tell. I have only 2.5g of ram and at higher levels in the test sequences my ram never exceeds 40% consumption.
I have run the same tests on another laptop that had only 1g of ram. Same scenario. Never exceeded 40-50%.

Now for those results, I would think the typical home user would be safe from having to use a swap space. But in the end what is a couple gigs for a swap space in todays hard discs. I guess if I had a 3t disc I would go fo it without blinking. But for those out there that are still working with hdd that do not get much bigger than 30g that little bit of space can be considered vital.

Thoughts?

Neq
 
  


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
Missing hard drive space? Quads Linux - Newbie 6 07-15-2009 04:21 PM
Missing Hard Drive Space moneyshotz Linux - General 9 06-05-2008 02:22 PM
Missing hard drive free space encomium Linux - Server 3 03-26-2008 02:11 AM
Missing hard drive space rx7haze Linux - General 13 11-16-2005 07:38 AM
suse and hard drive space missing SuSE05 SUSE / openSUSE 1 04-30-2005 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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