df -h shows 112GB size hard drive, but I have 120GB
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
df -h shows 112GB size hard drive, but I have 120GB
I did a full install of Slackware 11 on a p4 machine with a 120gb hard drive. My file system is ReiserFS, and df -h shows the total size as 112GB. fdisk -l shows 120GB. When I google for this problem I don't see any real solutions, but I have found the large disk howto, and it calls my problem a "Nonproblem". The help the howto provides destroys all the data on my disk, because I tried it 2 days ago and couldn't boot my machine afterwards. I even tried using the slackware 11 dvd to boot whatever linux system it finds on /dev/sda2 with sata.i and it almost worked but couldn't find anything at all. So, I reinstalled Slackware 11 full install and with reiserfs and df -h shows 112GB total, and it's better than ext3, which only saw about 104GB when I ran df -h. I downloaded and compiled kernel 2.6.21.1, and it boots fine. I believe I have a scsi hard drive, because I have to use /dev/sda instead of /dev/hda. I'm at work now, so I can't give any lspci right now, but I will be able to give such info after 8:30pm est. I greatly appreciate any help anyone can provide with this problem that I'm struggling with. Thanks!
It is indeed a nonproblem. 120GB decimal is 120 x 1000 x 1000 x 1000. To convert that computerese, divide 120,000,000,000 by 1024 three times. That gives you about 111.76, or effectively 112GB.
I do not know if you know this but manufactures states GB in human form or base 10. Computers work on two digits or base 2. When converting base 10 to base 2, information will be lost.
A 120 GB will be around 110 GB to 117 GB depending on the hard drive manufacture.
EXT3 does not do well with large capacity drives. I prefer using XFS instead of ReiserFS because ReiserFS has data corruption problems.
Ext3 also reserves a certain amount(usually 5%) of the space for the OS to use. This is so if a user uses up all the disk space the OS can still function(112 vs 104).
Thanks for the responses, everyone. So, I guess there's nothing left for me to do since my drive is actually 112GB, and the info you gave me about ext3 explains why it saw even less than 112GB. Does it matter that the OS that was on the computer by default (Vista) saw 120GB? ReiserFS has data corruption problems? I'll look into that and perhaps try XFS one day. Thanks again for the help.
Thanks for the responses, everyone. So, I guess there's nothing left for me to do since my drive is actually 112GB, and the info you gave me about ext3 explains why it saw even less than 112GB. Does it matter that the OS that was on the computer by default (Vista) saw 120GB? ReiserFS has data corruption problems? I'll look into that and perhaps try XFS one day. Thanks again for the help.
Vista may tell you it is 120gb but in binary it is about the 112gb everyone else has told you, MS must be using decimal for their calculations helping the hard drive manufacturers in their false advertising. As to the Reiserfs data corruptions that is a load of BS I have used it for at least 6 or 7 years now and have had to rebuild a filesystem tree once in that entire time so I don't know where that comes from.
Alright, thanks for the info, HappyTux. Seems like I don't have to fix anything. Thanks for the reassurance about Reiserfs, as I was noticing little things I liked about it here and there. I guess I found all the answers I need. Thanks, everyone.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.