LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-15-2010, 11:52 PM   #1
ethereal1m
Member
 
Registered: Jan 2010
Distribution: slackware 13.0 64
Posts: 259

Rep: Reputation: 30
Question Some Allocated Disk Space When Formatting A Device


Dear all,
what is the allocated disk space for system files in a new formatted device?

Suppose I install a IDE hard drive with size of 40Gig and connect it to PC via SATA to IDE converter into SATA port. After the device is formatted (I format the whole thing without being partitioned) and mounted, it left with space of around 37.2Gig, which I suppose less than 2.8Gig are allocated for system files.

Is 2.8Gig allocation a normal size for system files? Can its size be minimized?

Regards,
ethereal1m

Last edited by ethereal1m; 09-15-2010 at 11:57 PM.
 
Old 09-16-2010, 12:25 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
there are 2 things to consider:

1. manufacturers often quote in figures based on powers of 10 vs actual size which is a power of 2. The difference increases as the size of the disk in qn grows.
http://en.wikipedia.org/wiki/Binary_prefix

2. Linux (and Unix) reserve an amt (typically 5%) for use by root only (ie unavail to regular users) on the disk in case it fills up. It may also be used by the OS (briefly) to minimise fragmentation when adding to/changing a file layout.

Quote:
-m reserved-blocks-percentage
Specify the percentage of the filesystem blocks reserved for the super-user. This avoids fragmentation, and allows root-owned daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the filesystem. The default percentage is 5%.
http://linux.die.net/man/8/mkfs.ext3
 
1 members found this post helpful.
Old 09-16-2010, 04:29 AM   #3
ethereal1m
Member
 
Registered: Jan 2010
Distribution: slackware 13.0 64
Posts: 259

Original Poster
Rep: Reputation: 30
hmm, I'm using XFS filesystem and looking at mkfs.xfs command, I find a hard time to locate reserve-block-percentage option. I try to minimize this. Any idea?

Last edited by ethereal1m; 09-16-2010 at 04:41 AM.
 
Old 09-16-2010, 04:51 AM   #4
ethereal1m
Member
 
Registered: Jan 2010
Distribution: slackware 13.0 64
Posts: 259

Original Poster
Rep: Reputation: 30
actually I run mkfs.xfs with option
Code:
-i maxpct=1
which suppose to allocate inode size, in this case 1 %, but after I execute the command, the remaining disk space is the same as before.
 
Old 09-16-2010, 05:51 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
As the other poster said above, maybe all the "problem" is a different way to meassure things. How are you meassuring the disk space? Which tool?

Please, post the output for fdisk -l as well.
 
1 members found this post helpful.
Old 09-16-2010, 07:50 AM   #6
ethereal1m
Member
 
Registered: Jan 2010
Distribution: slackware 13.0 64
Posts: 259

Original Poster
Rep: Reputation: 30
I use "df -h"
Code:
/dev/sda               38G  9.6M   38G   1% /data
fdisk -l shows
Code:
Disk /dev/sda: 40.0 GB, 40019582464 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/sda doesn't contain a valid partition table
I didn't partition this device, not sure if this causing a problem though.....
 
Old 09-16-2010, 08:04 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
fdisk and df meassure the disk capacity in different ways, it's what the other person said above.

Try "df -H" and they'll match. It's just a matter of using GB vs GiB, 1024 vs 1000, powers of 2 instead of powers of 10, whatever you prefer. There's nothing wrong with your disk or your fs.

ps. The fact that you didn't partition is will never be a problem for Linux, it could be for some other OSes, but not for Linux. It really doesn't matter if you use the raw device, a partition or any other kind of file (because in linux you can mkfs any arbitrary file, nost just these under /dev/sd*).

Last edited by i92guboj; 09-16-2010 at 08:05 AM.
 
1 members found this post helpful.
Old 09-16-2010, 08:18 AM   #8
ethereal1m
Member
 
Registered: Jan 2010
Distribution: slackware 13.0 64
Posts: 259

Original Poster
Rep: Reputation: 30
ok, very good, thanks for the clarification
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] Change disk space allocated for system use? xcgates Linux - General 2 07-17-2009 02:18 PM
lost my disk space after formatting the fedora installed usb pheonix7597 Linux - Newbie 4 11-17-2008 10:06 AM
Can be changed the allocated space smartgupta Solaris / OpenSolaris 5 10-02-2008 09:23 PM
Increasing hard-disk space allocated to user guam Linux - General 10 03-01-2005 08:31 AM
allocated space of a directory Dave31836 Programming 8 10-04-2004 07:07 PM


All times are GMT -5. The time now is 06:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration