LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-28-2011, 05:25 PM   #1
drManhattan
Member
 
Registered: Aug 2010
Location: Warsaw, Poland
Distribution: Ubuntu 10.04 LTS on IBM Lenovo R61e, RHEL5-6,SLES10-11
Posts: 262

Rep: Reputation: 1
disk capacity vanished


Hi

I partitioned my new hdd in the following scheme.
Code:
Disk /dev/sdb: 120.0 GB, 120034123776 bytes
240 heads, 63 sectors/track, 15505 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf099f099

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       15505   117217768+  83  Linux
When I perform 'df -h' it shows the following :
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1             111G  188M  105G   1% /media/4369cb28-c94e-4218-97b8-4c2929827f43
Why 'df -h' shows Size 111G when 'fdisk -l' shows 120 GB ?
What happened to 9 GB of space ?

thx for help.
 
Old 03-28-2011, 05:55 PM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
Well, to start with the 120GB is the disk manufacturer's fraudulent drive size that is a "decimalized" value (they all do it).
120034123776 / (1000*1000*1000) = 120.034123776GB.

But the other value is the same number shown as a "power of two" value (i.e. 1K = 1024; 1M =1024*1024 or 1048576; 1G =1024*1024*1024 or 1073741824).
120034123776 / (1024*1024*1024) = 111.790489196777344GB.

And then there is a certain amount of overhead to any filesystem for inodes, directories, unusable starting addresses or ending addresses of partitions because of alignment. And other stuff I'm ignorant of.

Last edited by tommylovell; 03-28-2011 at 06:28 PM.
 
Old 03-28-2011, 06:38 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Alsop, the default is for the system to reserve (5% iirc) for private use by the system/root in case the user area fills up and/or keeping partition defragged ie temp storage for moving blocks around.
http://linux.die.net/man/8/tune2fs
 
  


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
Finding capacity of Hard disk manoj.linux AIX 4 12-06-2010 11:51 PM
Hard disk vanished! What happened? lucmove Linux - Hardware 1 09-13-2009 02:13 AM
I can't access the full capacity of my hard disk urpion Linux - Newbie 5 10-20-2008 01:04 PM
Samba displaying incorrect disk capacity on windows clients... fred22 Linux - Software 1 03-30-2006 08:24 PM
how to find disk capacity Henry_1 Linux - General 4 09-11-2003 11:40 PM

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

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