ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 146 1172713+ 83 Linux
/dev/sda2 147 268 979965 fd Linux raid autodetect
/dev/sda3 * 269 30401 242043322+ fd Linux raid autodetect
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 146 1172713+ 83 Linux
/dev/sdb2 147 268 979965 fd Linux raid autodetect
/dev/sdb3 * 269 30401 242043322+ fd Linux raid autodetect
Space is reserved for root and don't forgot inode's and all the other good stuff..
Example: I have a 123.5 GB drive in one of my servers, this is the output of fdisk -l:
Code:
Disk /dev/hdb: 123.5 GB, 123522416640 bytes
16 heads, 63 sectors/track, 239340 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 239340 120627328+ 83 Linux
And this is the output of df -h:
Code:
Filesystem Size Used Avail Use% Mounted on
/dev/hdb1 114G 35G 74G 32% /data
This is totally normal behavior.. even if you have a 300GB drive in Windows and you format it as NTFS, the drive will end up being 279GB usable space available.
This is totally normal behavior.. even if you have a 300GB drive in Windows and you format it as NTFS, the drive will end up being 279GB usable space available.
Aiight, I get the point... that's why there's 228GB of the 250GB disk in the DF command output, BUT that doesn't explain why I can't use 12GB within these 228GB?
BUT that doesn't explain why I can't use 12GB within these 228GB?
Like trickykid posted. An ext2/ext3 file system by default reserves 5% for roots use. This is supposed to reduce fragmentation and allow root to access the filesystem to perform maintenance in case it becomes full. (228 * .05 = 11.4GB)
You can tune2fs to reduce the amount of reserved space.
Aiight, I get the point... that's why there's 228GB of the 250GB disk in the DF command output
No, that's because a kilobyte is not a kilobyte. HD manufacturers specify HDs in such a way that 1000 bytes is 1kB, but computers calculate with 1024 bytes for 1kB.
The real size of your HD = 250*1000*1000*1000/(1024*1024*1024) = 232GB.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.