LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices



Reply
 
Search this Thread
Old 03-28-2009, 12:41 PM   #1
jinnstar
LQ Newbie
 
Registered: Feb 2009
Location: Philadelphia, Pa
Distribution: Linux Mint 6
Posts: 5

Rep: Reputation: 1
Question Disk size/partitions


So I'm feeling a little stupid trying to understand where my disk space is allocated.

My drive is 320 gigs.

Code:
~ $ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             292G  142G  135G  52% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
varrun                2.0G  304K  2.0G   1% /var/run
varlock               2.0G     0  2.0G   0% /var/lock
udev                  2.0G  2.8M  2.0G   1% /dev
tmpfs                 2.0G  576K  2.0G   1% /dev/shm
lrm                   2.0G  2.4M  2.0G   1% /lib/modules/2.6.27-11-generic/volatile
When I did the LM6 install I choose the whole disk option.

all of the 2.0G entries in the df code above, are they taking space from the 292G /dev/sda1 mounted as root? In case you are wondering I have 2G of swap space as well.

292G + 2.0G(6) + 2.0G = 306G
root + var. folders + swap = X

Where is the remaining 14G?

cfdisk shows

Code:
                                                                                                  cfdisk (util-linux-ng 2.14)

                                                                                                      Disk Drive: /dev/sda
                                                                                               Size: 320072933376 bytes, 320.0 GB
                                                                                     Heads: 255   Sectors per Track: 63   Cylinders: 38913

           Name                             Flags                            Part Type                    FS Type                                       [Label]                                 Size (MB)
 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-->        sda1                             Boot                              Primary                     Linux ext3                                                                            317923.53
           sda2                                                               Primary                     Linux swap / Solaris                                                                    2146.80
It should be noted that this machine came with Vista, set to install on first boot. I made the backup as requested then installed LM6 using the entire disk.

Any help with this is greatly appreciated.

Last edited by jinnstar; 03-28-2009 at 01:27 PM.
 
Old 03-28-2009, 01:48 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
ooops

Last edited by stress_junkie; 03-28-2009 at 01:52 PM.
 
Old 03-28-2009, 01:49 PM   #3
mesiol
Member
 
Registered: Nov 2008
Location: Lower Saxony, Germany
Distribution: CentOS, RHEL, Solaris 10, AIX, HP-UX
Posts: 731

Rep: Reputation: 137Reputation: 137
Hi,

seems to be all ok. Your disk is 320GB with 317GB on sda1, after creating a filesystem you will loos around 5-7% of total partition size. This make the 292 GB available, where 142gb is used from, rest free.

So where is the problem?
 
Old 03-28-2009, 02:15 PM   #4
jinnstar
LQ Newbie
 
Registered: Feb 2009
Location: Philadelphia, Pa
Distribution: Linux Mint 6
Posts: 5

Original Poster
Rep: Reputation: 1
Forgive me if I'm just not understanding but I see a discrepancy btw what shows in fdisk and whats actually allocated in fstab.

Why would creating a filesystem cause a loss of 5-7% of total partition size?

baobab usage analyzer shows 291.4G

Last edited by jinnstar; 03-28-2009 at 02:27 PM.
 
Old 03-28-2009, 06:09 PM   #5
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by jinnstar View Post
Forgive me if I'm just not understanding but I see a discrepancy btw what shows in fdisk and whats actually allocated in fstab.

Why would creating a filesystem cause a loss of 5-7% of total partition size?

baobab usage analyzer shows 291.4G
fstab mounts a lot of virtual file systems. These are things like /proc and they do not take up any disk space. They reside in RAM and the listed sizes are not valid. These things account for most of what you see when you issue the mount command with no argument. It would be more helpful for newbies if the mount command just showed the mounted disk file systems. If that were the case then your output to mount would be something like

/dev/sda1 mounted on /

That would be the extent of it since that is the only disk file system that is mounted in the Linux file structure starting at /.

When you create a file system you place a data structure on the disk. A raw disk just has blocks. A file system has a list of the files on the disk. This list takes up space. In fact, when you mkfs the file system all of the places to list files are allocated at that time. These are called inodes and they take up space on the disk. The same thing is true in Windows so don't think that you get more storage space on Windows for a given disk size.

Your original post shows that you have one disk drive and two partitions on that disk drive. The first partition is where all of your files are stored including the Linux system files. It is mounted at /. The second partition is a swap partition. It is normally not visible since it is not linked into the file system. There should be a record for it in the fstab file with the file system type shown as swap.
 
Old 03-28-2009, 11:56 PM   #6
jinnstar
LQ Newbie
 
Registered: Feb 2009
Location: Philadelphia, Pa
Distribution: Linux Mint 6
Posts: 5

Original Poster
Rep: Reputation: 1
Informative but...

Thank you for the informative, yet inordinately assumptive response. I haven't used a Windows machine full-time since 2002. While you have given me a good refresher on file systems, at no point did I state I was expecting either OS would allow for more storage space on a given drive.

The only reason I mentioned Windows was because I suspected there might be a hidden partition to be used for system restore since the machine came with Vista installed. I didn't check the disk space in Windows before installing Linux, I had no need to.

5-7% of 320g is 2.24g, much less than the 14g thats missing.
 
Old 03-29-2009, 11:58 AM   #7
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
Originally Posted by jinnstar View Post
Thank you for the informative, yet inordinately assumptive response. I haven't used a Windows machine full-time since 2002. While you have given me a good refresher on file systems, at no point did I state I was expecting either OS would allow for more storage space on a given drive.
I did not assume anything. I only stated that Windows file systems did not have any advantage regarding losing disk space to file system data structures preallocated when the partition is formatted. I think you are being overly critical when I only tried to help you.

Quote:
Originally Posted by jinnstar View Post
The only reason I mentioned Windows was because I suspected there might be a hidden partition to be used for system restore since the machine came with Vista installed. I didn't check the disk space in Windows before installing Linux, I had no need to.
The cfdisk output shows two partitions. Both are being used by Linux.

Quote:
Originally Posted by jinnstar View Post
5-7% of 320g is 2.24g, much less than the 14g thats missing.
In fact I did the calculation. It turns out to be about 8%. The cfdisk output shows 318GB data + 2GB swap = 320GB. The df command shows 292GB for the data partition. Add the 2GB for the swap partition and you have 294GB. 29400/320=92% which leaves 8% difference and that's allowing for 26GB to be "missing". That is not so far from the 5%-7% stated by mesiol.

Why are you so confrontational? We're only trying to help you.

Last edited by stress_junkie; 03-29-2009 at 12:15 PM.
 
  


Reply

Tags
mint, partitions


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
What size USB disk is boot rescue disk? Lufbery Slackware - Installation 11 12-02-2007 03:36 PM
Size of partitions ? ////// Mandriva 4 11-26-2005 09:47 AM
Partitions; how many and what size? managerdan Linux - Newbie 2 05-27-2005 08:07 PM
removed disk partitions - disk is now too small jordanthompson Linux - Software 18 12-09-2004 04:07 PM
Why should you give the size of the swap disk as twice the size of RAM vmniza Linux - Newbie 3 09-17-2004 03:13 AM


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