Loading...
 
Skip to main content

Disks and partition table

A disk is the physical storage device inside your computer or connected to it externally. It can either be a hard disk drive (HDD) or a solid-state drive (SSD). Disks are divided into partitions.

A partition is a logical division of ONE hard disk.

A volume is a logical division that can span MULTIPLE disks and have many partitions.

Unless specified otherwise, Windows initially partitions a drive as a basic disk.
A basic disk can be converted to a "dynamic disk".

A volume can only be created on a dynamic disk.

MBR (Master Boot Record)

Traditionally, basic disks use the MBR (Master Boot Record) to store information about which partitions are on the disk. The MBR is the first addressable sector of a hard disk. It can contain information about up to four primary partitions, or three primary partitions and an extended partition with up to 128 logical drives.

On a disk which uses MBR, a partition cannot exceed 2.2 TB in size.

If you want to boot the computer from the disk, one of the primary partitions must be marked as "active"; this is the bootable partition.

GPT (Guid Partition Table)

GPT is the successor to MBR, and has been used on Windows operating systems since the late 1990s.

GPT stores information about booting and partitions in several places on the disk.

GPT supports up to 128 partitions, and there is no practical limit to the partitions' size.

GPT has a more robust data structure, so it is more resilient to data corruption.

GPT also supports Secure Boot, which enhances security, but can also make troubleshooting more complex.  

While MBR is widely compatible with older operating systems, GPT is the modern standard and is compatible with most modern operating systems. However, some older operating systems may not support booting from GPT disks.

File systems

Before it can store data, a partition has to be formatted using a file system.

The two main file systems used by Windows are FAT32 and NTFS.

FAT32

  • FAT32 is a simple system, which is compatible with many operating systems, including older ones.
  • FAT32 is commonly used for flash drives.
  • FAT32 does not support files larger than 4GB.

NTFS

  • NTFS supports complex file and folder permissions, file compression and encryption.
  • NTFS has a more robust data structure than FAT32, so it is more resilient to data corruption.
  • NTFS is mainly supported by Windows. MacOS has read-only support, and Linux has limited support, requiring extra software or drivers.

Clusters and fragmentation

Storage space in a file system is divided into clusters.

Each cluster in a partition is the same size.

A common cluster size used in Windows is 4 KB.

Most files are much bigger than 4KB, so each file is stored using many clusters.

As a disk fills up, files tend to become fragmented - this means that they are stored in clusters which are scattered throughout the disk, which can lead to slower file access times.

To optimize disk performance and reduce file fragmentation, many file systems provide defragmentation tools that rearrange data clusters, putting the pieces of each file next to each other again.

SSDs do not need defragmentation, as they do not use sectors on spinning platters but flash memory to store data. When you delete a file on an SSD, the operating system marks the file's data blocks as no longer needed. The TRIM process erases unused blocks to maintain performance during idle time.

Although trimming should be done  automatically, it is wise to check sometimes if this has been done.

Windows has a feature called “Optimize Drive” that you can access when you right click a Drive in the Explorer, under Properties\Tools. Depending on whether you have a spinning Drive or an SSD, Windows offers you to either Defrag or Optimize the disk (run the TRIM process).

To access disk management, open the console by using diskmgmt.msc.

To check if your Disk uses MBR or GPT, go to Disk Management, right click on the far left box of the Disk you want to check, and click on Properties, and look at the Volumes tab.

The following operations can be performed only on basic disks:

  • Create and delete primary and extended partitions.
  • Create and delete logical drives within an extended partition.
  • Format a partition and mark it as active.

You can use third party products such as DiskGenius or EaseUS Partition Master which can help you overcome some limitations of diskmgmt.msc and be easier to use than diskpart.

Basic versus dynamic disks

Dynamic disks are useful mainly for servers.

A dynamic disk gives more flexibility than a basic disk because it does not use a partition table to keep track of all partitions. Dynamic disks use volumes instead of partitions.

Dynamic disks provide features that basic disks do not, such as the ability to create volumes that span multiple disks (spanned and striped volumes) and the ability to create fault-tolerant volumes with built-in redundancy (mirrored and RAID-5 volumes).

A basic disk can be easily converted to a dynamic disk without losing any data.

However, converting a dynamic disk back to a basic disk requires deletion of all volumes on the dynamic disk.

Click here to read more about basic and dynamic disks.

 

You might like to view this video:

File Systems

 


Contributors to this page: admin .
Page last modified on Wednesday October 9, 2024 10:08:42 GMT-0000 by admin.
Show PHP error messages