LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Mint (https://www.linuxquestions.org/questions/linux-mint-84/)
-   -   Disk size/partitions (https://www.linuxquestions.org/questions/linux-mint-84/disk-size-partitions-715119/)

jinnstar 03-28-2009 11:41 AM

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.

stress_junkie 03-28-2009 12:48 PM

ooops

mesiol 03-28-2009 12:49 PM

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?

jinnstar 03-28-2009 01:15 PM

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

stress_junkie 03-28-2009 05:09 PM

Quote:

Originally Posted by jinnstar (Post 3490786)
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.

jinnstar 03-28-2009 10:56 PM

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.

stress_junkie 03-29-2009 10:58 AM

Quote:

Originally Posted by jinnstar (Post 3491182)
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 (Post 3491182)
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 (Post 3491182)
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.


All times are GMT -5. The time now is 04:44 PM.