SlackwareThis Forum is for the discussion of Slackware 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.
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?
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.