LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-31-2013, 06:39 AM   #1
luckyknight
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Rep: Reputation: 0
3.6T useable on a 4TB HDD?


I've purchased 2 x 4TB WD40EZRX SATA HDDS and setup in parted using a gpt label:

Quote:
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA WDC WD40EZRX-00S (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:


Number Start End Size File system Name Flags
1 1049kB 4001GB 4001GB ext4 primary
But df -h only shows 3.6T is useable - is this normal?

Quote:
/dev/sdb1 3.6T 855G 2.6T 25% /storage/sdb1
/dev/sdc1 3.6T 2.1T 1.4T 62% /storage/sdc1
Motherboard is a Gigabyte D525 Atom running Slackware 14.1. Disk was formatted using mkfs.ext4

Last edited by luckyknight; 12-31-2013 at 06:41 AM.
 
Old 12-31-2013, 07:00 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
There could be 2 things that could explain this:

1 - When you format a partition a certain percentage (default is 5%, which is 200 Gb in your case) is allocated for root use only, this to make sure you are able to troubleshoot the partition if something goes wrong.

2 - There is a difference between 4 TB as mentioned by the manufacturer and 4 TB as mentioned by df. The first is based on 1000 being 1 Mb and the second on 1024 being 1 Mb.

Those 2 combined will account for the "missing" space.
 
Old 12-31-2013, 07:57 AM   #3
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935
Yep, its going to be the whole MB vs MiB issue.

http://en.wikipedia.org/wiki/Mebibyte

4TB = 3.63 TiB.
 
Old 12-31-2013, 11:46 AM   #4
anscal
Member
 
Registered: Apr 2011
Distribution: Slackware, RHEL
Posts: 31

Rep: Reputation: 15
Quote:
Originally Posted by luckyknight View Post
But df -h only shows 3.6T is useable - is this normal?
It is normal, because
Quote:
df -h
reports sizes in MiB/GiB/TiB (i.e. the units we called MB/GB/TB in our childhood ). To obtain the base-ten sizes, try
Quote:
df -H
or, better,
Quote:
df --si

Last edited by anscal; 12-31-2013 at 11:50 AM.
 
1 members found this post helpful.
Old 12-31-2013, 01:13 PM   #5
luckyknight
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by cascade9 View Post
Yep, its going to be the whole MB vs MiB issue.

http://en.wikipedia.org/wiki/Mebibyte

4TB = 3.63 TiB.
I had the same thought as I left the house!! Thanks for clarifying
 
Old 11-14-2014, 08:45 AM   #6
tjackson
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Rep: Reputation: Disabled
4tb != 4tb

This seems to be a recent change. In the past, if I purchased a xGB or xTB disk, I got xGB or xTB.
In my opinion, this just means the consumer gets 9% less than what he purchases. I don't like it.
 
Old 11-14-2014, 09:06 AM   #7
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quote:
In my opinion, this just means the consumer gets 9% less than what he purchases. I don't like it.
No. Not at all.

You are getting 4 Terrabytes worth of space, which CONVERTS to 3.63 TiB of space. It's like converting 1 Mile to Kilometers, its the same amount of distance represented in different units.

You ARE getting 4 TerraBYTES worth of space. Its just that computer programs generally report space in Mebbibytes instead.

Last edited by szboardstretcher; 11-14-2014 at 09:07 AM.
 
1 members found this post helpful.
Old 11-14-2014, 09:07 AM   #8
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by tjackson View Post
This seems to be a recent change. In the past, if I purchased a xGB or xTB disk, I got xGB or xTB.
The first hard drive I installed Slackware on was a Conner IDE drive with 170 MB or 162 MiB capacity. This was about 20 years ago. So if a "change" ever happened, it was before then.
 
Old 11-14-2014, 09:32 AM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by tjackson View Post
This seems to be a recent change. In the past, if I purchased a xGB or xTB disk, I got xGB or xTB.
It has always been this way (always being at least the last 25 years -- probably much longer). It was definitely not a recent change (although, adding the designation of MiB instead of MB for decimal by the IEC occurred in 1998 and took quite a while longer for manufacturers/developers to start utilizing it). Put simply, hard drive manufacturers treat 1GB as one billion bytes, while the operating system calls it 1,073,741,824 bytes (1000 * 1000 * 1000 vs 1024 * 1024 * 1024).

You can see the same issue in reverse with CDs. A CD can hold 700MiB (commonly called 700MB) of information, which ends up being 737,280,000 bytes. If a hard drive manufacturer were selling this CD, it would be labeled as a 737MB disc. And this even occurred with 3.5" floppies, although at a much smaller scale. A 1.44MiB (commonly called 1.44MB) floppy held 1,474,560 bytes, which would've been labeled as 1.47MB by hard drive manufacturers. If you want more info (although, it is Windows based, however it still holds true in Linux), see the following How-to Geek page.

http://www.howtogeek.com/123268/wind...rong-capacity/
 
1 members found this post helpful.
Old 11-14-2014, 10:55 AM   #10
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by bassmadrigal View Post
And this even occurred with 3.5" floppies, although at a much smaller scale. A 1.44MiB (commonly called 1.44MB) floppy held 1,474,560 bytes, which would've been labeled as 1.47MB by hard drive manufacturers.
And the floppy example is amusing, because both designations are wrong. It's either 1.41 MiB or 1.47 MB formatted capacity (exactly 1440 KiB). But neither 1.44 MB nor 1.44 MiB, such a floppy doesn't exist.
 
1 members found this post helpful.
Old 11-14-2014, 03:16 PM   #11
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by jtsn View Post
And the floppy example is amusing, because both designations are wrong. It's either 1.41 MiB or 1.47 MB formatted capacity (exactly 1440 KiB). But neither 1.44 MB nor 1.44 MiB, such a floppy doesn't exist.
Haha... I didn't even catch that on the wikipedia page.
 
Old 11-14-2014, 11:43 PM   #12
EdGr
Member
 
Registered: Dec 2010
Location: California, USA
Distribution: I run my own OS
Posts: 998

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
The difference between 1000^N and 1024^N has become pretty large at N=4. Eventually, the rated capacity of storage devices will have nothing to do with the size reported by the OS.
Ed
 
Old 11-15-2014, 01:01 AM   #13
Totoro-kun
Member
 
Registered: Nov 2010
Location: Kaunas, Lithuania
Distribution: Slackware
Posts: 234

Rep: Reputation: 125Reputation: 125
Please do not forget, that Linux ext file systems reserve 10% of space by default, so if your disk is full you could still work on the system Edit: around 5% of space by default, so root user can login and rescue system in case disk is full /Edit . With big drives this can be insane amount of wasted space. You could use tune2fs command for setting it for example to 0.5%:
Code:
tune2fs -m 0.5 /dev/sdb1
Another issue is unit conversion issue mentioned above.

Last edited by Totoro-kun; 11-15-2014 at 01:14 AM.
 
Old 11-15-2014, 01:08 AM   #14
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
That would be 5%, and is specifically reserved for the root user to be able to logon and rescue the system.
For data partitions, set it to zero.
 
1 members found this post helpful.
Old 11-15-2014, 03:07 AM   #15
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by Totoro-kun View Post
Please do not forget, that Linux ext file systems reserve 10% of space by default, so if your disk is full you could still work on the system Edit: around 5% of space by default, so root user can login and rescue system in case disk is full /Edit .
5 % file system space are reserved to prevent excessive fragmentation on ext2/4 and allow e2fsck to continue to function in case of an almost full disk. This is why this is a percentage. The reason why root can fill up this space, is because he's the super user, who is by definition allowed to do everything including stupid things. Not because it is a good idea to use the last 5 percent.
 
  


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
[SOLVED] New 4TB drive install in debian 6 bcyork Linux - Newbie 6 09-30-2013 04:24 PM
How to format a 4TB external HDD into ext3 in CentOS? jollibee Linux - Newbie 12 08-19-2013 10:45 AM
[SOLVED] 4TB drives and GPT fskmh Slackware 12 06-27-2012 09:54 AM
4Tb Server nutthick Linux - Hardware 6 03-29-2005 01:19 AM
config-2.4.20-8 useable to 2.6? demmylls Linux - General 12 12-24-2003 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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