Jump to content

my empty partition is not empty!

Go to solution Solved by TechyBen,

HDDs have overhead required to lay out the sectors and other things the software need to use it.

Think of it as page numbers, chapter headings and indexes. A pack of "paper" is completely empty, but arrange it in a book, and some of the blank space on a page is taken up and used just to fit page numbers on it.

 

So that "in use" is bare min of what is required to run the drive in an operating system. If you blanked it out entirely, it would be "empty" but not useable.

[edit]

Ext4 also has a min file length of 255 bytes. Also "Most SSDs have blocks of 128 or 256 pages, which means that the size of a block can vary between 256 KB and 4 MB".

hello,

 

On a Linux Ubuntu OS I moved all my data from one partition to another drive. While the partition should be empty now I noticed my OS still thinks there is 17% usage. First I checked all the obvious reasons like hidden folders and access permissions, it is an EXT4 file system on a HDD:

 

ls -la EXT4/
total 28
drwxr-xr-x  4 usr    usr     4096 Aug 21 08:09 .
drwxr-x---+ 3 root root  4096 Aug 28 07:47 ..
drwx------  2 usr    usr    16384 Aug  3  2018 lost+found
drwx------  5 usr    usr     4096 Aug  1 11:30 .Trash-1000

 

my trash is empty. The folder properties show there are 50 MB in use:

 

image.png.a1381d0ac0762590e6a73c925b8c0aa1.png

 

before I moved and resized the partition it had been ~10 GB of used capacity. GParted states that 1.12 GiB of capacity is still in use. There are 2 partitions on that drive in total.

 

I am pretty sure there isn't any "real" data on my partition and it is save to reformat, though I cannot make any sense of how the OS is handling this partition.

 

Why does the OS still indicate there is capacity in use? I would expect the usage to be 28 kB due to 5 system folders + root and 0 files on it. If this is caused by fragmentation shouldn't that be abstracted away from the user?

 

Edited by Pumbaa
mentioned storage type in question: HDD
Link to comment
https://linustechtips.com/topic/1098781-my-empty-partition-is-not-empty/
Share on other sites

Link to post
Share on other sites

HDDs have overhead required to lay out the sectors and other things the software need to use it.

Think of it as page numbers, chapter headings and indexes. A pack of "paper" is completely empty, but arrange it in a book, and some of the blank space on a page is taken up and used just to fit page numbers on it.

 

So that "in use" is bare min of what is required to run the drive in an operating system. If you blanked it out entirely, it would be "empty" but not useable.

[edit]

Ext4 also has a min file length of 255 bytes. Also "Most SSDs have blocks of 128 or 256 pages, which means that the size of a block can vary between 256 KB and 4 MB".

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×