LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 10:52 PM   #1
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Rep: Reputation: 31
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 10:57 PM.
 
Old 09-15-2010, 11:25 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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, 03:29 AM   #3
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Original Poster
Rep: Reputation: 31
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 03:41 AM.
 
Old 09-16-2010, 03:51 AM   #4
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Original Poster
Rep: Reputation: 31
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, 04:51 AM   #5
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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, 06:50 AM   #6
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Original Poster
Rep: Reputation: 31
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, 07:04 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
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 07:05 AM.
 
1 members found this post helpful.
Old 09-16-2010, 07:18 AM   #8
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

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


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:51 PM.

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