1 (edited by craig_kidwell 2022-11-29 09:12:41)

Topic: Formatting using GParted Live / Different sizes

Hi,

I am new to this software and so far it's looking very useful. However, I have a few questions regarding formatting disks.

When I format (NTFS) my 16GB USB flash drive using Windows DiskPart (using the cmd "format fs=ntfs quick"), the disk properties within Windows 10 shows that 44.0MB as used space. When I take the same USB drive to view properties in GParted, it shows that 40.08MB is used.

If I do this process the other way, where as I use GParted to format NTFS, it will show 64.89MB used space within GParted properties, and then by taking the same USB drive to view in Windows, the disk properties shows 86.2MB used space.

Similar results arise from formatting using FAT32 as well. Using Windows to format the USB Drive, it shows 32KB used space in Windows, and in GParted the same drive shows 16.03MB used space.

Why is this happening? I have always used Windows and am starting to get interested in Linux based operating systems, so the understanding is not quite there yet. I have also tried this on a 250GB external SSD drive and they show file size differences too.

Also, is a format using Gparted supposed to be the same as "quick format" in Windows?

Your help and advise will be greatly appreciated.

Regards,
CraigK

2

Re: Formatting using GParted Live / Different sizes

Really. I don't think I have answers to all your questions.

The actual ntfs version is 3.1, and this since October 2001. Perhaps the general filesystem specification didn't change since then, however even the Microsoft implementations in its various OSs (user or serer versions) weren't the same, each OS version including its own features.
From the other side, the Linux ntfs implementations were more than one. The actual most used ntfs implementation in Linux systems (ntfs-3g) didn't stop to get updates and bug fixes (even within 2022, as I learn), and is the result of fusions between several projects. The ntfs-3g group could give better info. I'm not at all sure that every Linux distribution uses exactly the same implementation. Anyway the Microsoft code for ntfs remains closed, and so no open source projects have access to it.

About the different used space reported by Linux or Windows, it seems that the two operating systems calculate it in a different manner. Furthermore, I think that Windows doesn't count the entire MFT (master file tables) and metadata space as used although reserved, and it is possible that part of that space is given to the file data space it the latter is exhausted (for instance, due to the presence of many big files.

Concerning FAT and FAT32, it seems that the initially reported used space of 32KB is just one clauster (the minimum allocation space unit under the FAT filesystems family; in bigger drives the clauster size is bigger in order to not reach the maximum allowed number of clausters). The file table becomes bigger and bigger as long as new files are written to the filesystem. From the other hand, it seems that Linux prefers to report the initially reserved space as used.
Furthermore, it is possible to make a FAT filesystem by using different clauster size values, besides the deafault values used by the o.s. depending to the partition size. For each value a different used space would be reported.
Given that the FAT family is quite old (from the 1980s) and not adequate for today's storage units, I don't expect much to be done respecting eventual problems. Perhaps the only use we can expect in new systems is the filesystem of the EFI partition in EFI systems, that is identical to FAT32.

*** It is highly recommended to backup any important files before doing resize/move operations. ***