You are on page 1of 17

Ch 9 - Implementing Mass Storage

Understanding Partitioning
- A partition is a logical electronic device readable by an operating system
- Partitions define the location of operating systems,
swap files, and recovery partitions
- Partitions must be created and mounted
- In Windows, partitions manifest as drive letters;
In Linux/macOS, partitions manifest as folders

NVMe M.2 SSD - Installed & Detected in System Setup


It may be great for the computer, but it’s in no condition to work with the OS

We need to take this Physical Device


& turn it into a Logical Device that makes sense to the OS

System sees this Storage Device as nothing but a string of LBA Blocks.

From the perspective of the OS, a Hard Drive has files & folders
that need to be organized.

Partitions - If the Hard Drive is a House,


then Partitioning is Building the Rooms for Storage.

In a Hard Drive, Partitions may be laid out for the


OS; Office Applications; Games;
Swap File (Windows uses a File for Swap; Linux uses a Partition);
Recovery Partition (for cases where any Partition dies/destroyed);

The OS Creates these Partitions with certain tools,


and Mounts the Partitions (User can SEE this Partition)

Windows creates these Partitions with a Drive Letter followed by a :


C:, or C: D: , or C: D: E:, etc
Linux will manifest these Partitions with a Directory Tree
/, or /CDROM, etc

Copyright Robert Mathisen & Total Seminars 2023


MBR Partitioning
- Master Boot Record (MBR) is the oldest type of partition still in use today
- MBR consisted of a boot loader and up to four partitions
with one set as an active partition
- If you need more than four partitions on a single drive,
you create an extended partition and add logical drives to that partition

MBR (Master Boot Record) - When booting up, Computer knows how to
grab the OS from the Storage with MBR (then the OS takes control)
This is the oldest type of Partitioning

MBR defines Partitions & tells the computer where to find the OS

LBA 0 - Assuming this HDD is the first Storage Device in the Boot Order,
LBA 0 is a Sector on the HDD that automatically starts reading
whatever is stored here

MBR - 5 Pieces (limited to only 4 partitions -big problem)


Boot Loader - First code read off of Mass Storage
The other Partitions were for Multiple OS’s,
so we could choose what OS we wanted to load.
Boot Loader points to the beginning of one of these Partitions to be loaded
Boot Loader would need to be Preassigned an Active Partition

Copyright Robert Mathisen & Total Seminars 2023


To see our Hard Drives, look up “Disk Management” (in Windows)

At 4 min 50 sec on video 20 (1002),


Watch Mike set up a new MBR Drive after installing a new HDD
New Volume F Drive,
he then resets this and creates a
New Volume F Drive, and a New Volume E Drive
(Remember, 4 is most partitions we can have on a HDD)

Old limitation with Master Boot Record (MBR) is we couldn’t have more than 4 Partitions

Primary Partitions - Blue Outline are Primary

Extended Partitions - Green Outline is the Extended (Logical Drives/Partitions)


This allows for a 5th Partition!

Copyright Robert Mathisen & Total Seminars 2023


GPT Partitioning
- GUID Partition Table (GPT) has many features that improve upon MBR partitions
- GPT supports up to 128 volumes on a partition
- GPT uses a protective MBR but the GPT starts at the Primary GPT header
and includes a Secondary GPT header

GPT (GUID Partition) - GPT is an upgraded version of MBR


MBR is going to be insufficient for upcoming storage
GPT takes advantage of UEFI BIOS

GPT has the idea of a GUID (Global Unique Identifier)


128bit unique value that defines YOUR Partitioning System,
therefore has advantages in Security & other aspects

GPT allows up to 128 Partitions per Drive


There’s no Primary, or Extended, or Logical, they’re just partitions!
Each Partition can be 18.8 Million TB

In Windows10, MBR is NOT an option. You will be using GPT.

Everything starts with LBA 0


There’s always the chance of this HDD being uninstalled,
and reinstalled in an MBR system. We need compatibility!

Protective MBR - Installing this old HDD in a new system,


the system won’t be able to read the partitions,
but it knows not to erase it.

Copyright Robert Mathisen & Total Seminars 2023


Also, if it’s a GPT capable system,
there’s a piece of info that identifies as a GPT!
Reader will Ignore the first part, and skip to where it’s compatible.

Then, we go to the next LBA value (LBA 1) the Primary GPT Header,
which stores the information that we need for the Partitions
There’s 128 limit of Partitions here,
and it can keep taking more LBA’s as necessary

Copyright Robert Mathisen & Total Seminars 2023


The next LBA value (LBA 2) is the Secondary GPT Header
is a Copy of the Primary GPT Header.
If the Primary is damaged, the Secondary can
take over for the Primary & can rebuild all of the Partitions!

This is protection you’d never have with MBR!

In video 21 (1002), at 4 min 40 sec, Mike sets up a GPT Drive after installing a HDD
(in Disk Management) - Process is very similar to setting up a MBR Drive

Copyright Robert Mathisen & Total Seminars 2023


Understanding File Systems
- A file system is applied to a partition by formatting
- A partition must be formatted before they are usable
- All file systems have a data structure
that keeps track of the location of files & folders
- File systems often have a problem with fragmentation

Back to the House analogy


House = Storage; Partitioning = Rooms;
Formatting = Creating Organized Shelves for Folders & Files in the Room

For Storage, you will Partition it, then you will Format it
There’s no way around this process

FAT (File Allocation Table) - it’s like an Index Card at the beginning of every Partition
that keeps track on a LBA-by-LBA basis
where all your stuff is on that Partition

This is a binary table with LBA Values from 0000-FFFF

FAT16 - Looks like a 2 Column Spreadsheet


Left side - LBA Values for every Block on that Drive
Right side - defines the content of that LBA Value

Copyright Robert Mathisen & Total Seminars 2023


Formatting runs through a Quality Control process
where it checks all the blocks are functioning properly.
It can’t fix any blocks, but it can recognize damaged ones.

For 0003, we get a Code FFF7 indicating this is a bad block


and to NEVER use this block

Formatting is finished once all the blocks are marked,


and we can begin storing files & folders!

FAT32 - Notice we have 8 Hexadecimal Characters for this 32bit File Allocation Table
(FAT16 only has the 4 Hexadecimal Characters)

File Allocation Table System


NTFS - Windows
HFS - MacOS

Copyright Robert Mathisen & Total Seminars 2023


Each block can store ~4000bytes of data Letter to Mom is about 2.5 blocks worth

The first available block to store anything is 03213ABB


We’ll start writing into this block & we know it’ll be completely filled.

We then look below it and see this block is free.


The value of this new block is written to the right of the prev block
alerting us to look for the 2nd part of the letter in this block!!

We skip the next block because we recognize the damaged block.

The 3rd block will just be partially used (need just 2.5 blocks),
and will denote that it’s the end with “FFFF”

We’re NOT storing any data in these File Allocation Tables


We’re just letting people know where the data is stored!!

Copyright Robert Mathisen & Total Seminars 2023


Another 2 Examples of files written on the system

Lets say we delete the 2nd file, and replace it with another file
We have to “jump” down below the other file,
and it’s in 2 separate spaces on the table (ended twice with “FFFF”)
This is Fragmentation!
For HDD’s, the arm needs to go all over the hard drive to retrieve it

Copyright Robert Mathisen & Total Seminars 2023


Popular File Systems
- FAT32 and exFAT are handy for thumb drives
- NTFS is the primary file system for Windows, supporting 16 exabytes
and is often supported by other file systems
- NTFS supports compression, encryption, and folder/file security
- CDFS is for optical media
- I.c. ext3 and ext4 are Linux file systems
- HFS+ is unique to macOS

FAT32 - Supports up to 8TiB Volumes (tebibyte) & each file as large as 4 GiB
(gibibytes)
Supported by many OS’s, but only for Small HDD, or Thumb Drives

NTFS (New Technology Filing System) - For Windows - Constantly being improved
Popular even with other OS’s
Up to 16EiB Volumes (exabytes) & each file as large as 256 TiB

NTFS doesn’t use a FAT, it uses a…

MFT (Master File Table) - Sits in the middle of the volume (very strong place),
impossible to erase, and very powerful

NTFS supports u.c. Compression for files & folders,


supports u.c. Encryption (password protection),
supports Individual System and Network Security

It’s great for Larger Storage with Large Partitions,


but it’s kind of overkill for something like a Thumb Drive.
So, there is a version which is between a FAT32 & NTFS called...

ExFAT - Supports same sizes as NTFS,


but it gets rid of Compression & Encryption

CDFS (Compact Disc File System) - works great with BluRay & DVD as well
Designed to allow u.c. Optical Discs to organize a filing system
that we can read with our OS.
Standard for all Optical Media. Files up to 4GiB.

Copyright Robert Mathisen & Total Seminars 2023


ext3 - For Linux - Supports up to 32TiB Volumes & 2 GiB Files

ext4 - Supports up to 2EiB Volumes & 16TiB Files

HFS+ (Hierarchical File System Plus) - For MacOS


Supports up to 8EiB Volumes & 8EiB Files

Don’t memorize these numbers. Just know which OS is for which Filing System.

Formatting in Action

- Windows uses Disk Management to partition and format disks


- New drives must first be initialized in Windows
- There is no single Linux tool for partitioning & formatting - choose one you like

Video 24 is all about Formatting Storage Device - rewatch to see how this works

Dynamic Disks

- Dynamic disks are unique to Windows


- Drives must be converted from basic to dynamic in Disk Management
- Dynamic disks enable shrinking, extending, and spanning volumes
without losing the data on the disk

Microsoft started getting frustrated with the limitations of MBR (Master Boot Record)
Style Partitions. GPT had not yet been invented. So, Microsoft came out with…

Dynamic Disks - Unique to MS Windows (not avail to any other OS)


Allows us to do things you can’t do with a “Basic Disk” such as...
Shrink or Expand/Extend the Volume, and a lot of extra features
Must set Drives from “Basic” to “Dynamic” in Disk Management

You can Extend the Volume from 10GB to 20GB if you wanted to,
As opposed to deleting that volume with the data in it and re-creating
a 20GB volume.
The data in the 10GB volume is safe/untouched when it gets expanded!!

Copyright Robert Mathisen & Total Seminars 2023


Shrinking works the same way. MS tells you how much you can shrink it,
considering the data you have currently saved in that drive!

Spanned Volume - Takes 2 Drives and “combines” them into 1 Drive.


You fill up one drive, then start filling up the other drive (continuation)

The ONLY time you’d do this is when...


you completely fill up a drive, then install another drive,
and Span it to that existing Drive.
This is a temporary fix until you get a larger Hard Drive.
This is bad because now we have 2 points of potential failure!!!
If EITHER of these drives die, you lose everything!!

Use Span as an Emergency feature, not as a luxury.

Striped Volume - Takes 2 Drives and “combines” them into 1 Drive.


You save data quickly by saving files alternating between both drives.
(aka RAID 0)

Once again, if you lose either drive, you lost everything.

Mirrored Volume - Takes 2 Drives to create a Copy/redundancy


You make a copy on each drive.

If either drive dies, you still have access to the data through the other drive
It’s a backup drive (a copy)

GPT best practices that MS will recommend….


Keep Windows Boot Drive Basic, not Dynamic
Set Boot Drive to GPT (more features & flexibility than MBR)
Choose usage of Dynamic Drives carefully
If going from Dynamic Drive to Basic, you’re going to lose all your data

Copyright Robert Mathisen & Total Seminars 2023


New Installation – First Drive
- The first drive on a system relies on the OS install program
to provide partition and format functions
- The partitioning and formatting tools in installation programs
provide a subset of tools when compared with their main tools
- Installation tools may provide features not normally seen anywhere else
(such as swap file creation)

For a BRAND New Computer, you won’t have Windows already on the system to be
able to go into Disk Management to be able to assign Partitioning & Format the Drives
How do we do this?
Mike is installing the OS during the Optical Media installation!

Seems like a pretty simple process - Video 43 (1001)

Partitioning & Formatting must always happen before using any Mass Storage

Already have an OS, use the tools built into the OS (in Disk Management)
to allow you to Partition & Format the Mass Storage

New Computer/No OS, installation of the OS itself


should have some Partitioning & Formatting Tools to Install the OS

Software RAID in Storage Spaces


- Software RAID uses the operating system to configure the RAID array
- Windows comes with a powerful tool called Storage Spaces
to configure advanced software RAID arrays
- Storage Spaces provides superb flexibility

Video 26 talks about RAID’s (Striped Volume), 2-Way & 3-Way Mirrors, and Pools
Kind of confusing

Storage Spaces - Software RAID tool built into most copies of MS Windows
Gives you a lot more flexibility, can do RAID5 (Parity), and more
(Control Panel → System & Security → Storage Spaces)

Pool - Preassigned Group of Drives that work together

Copyright Robert Mathisen & Total Seminars 2023


Encrypting Mass Storage
- File-based encryption encrypts files and folders;
disk-based encryption encrypts entire drives
- Windows uses Encrypting File System (EFS) to encrypt folders and files
- Windows uses Bitlocker to encrypt entire hard drives
- Bitlocker requires a system with a Trusted Platform Module (TPM) chip

Software feature built into the OS that allows you to….


File-Based Encryption - choose a specific File, or Folder, for encryption
Use EFS

Disk-Based Encryption - choose a specific Drive for encryption


Use Bitlocker

For Windows, we use…


EFS (Encrypting File System) - built into the NTFS
As long as the Drive is formatted with NTFS, you can use EFS

Right click file → Properties → Advanced (under Attributes) → Encrypt Contents

TPM (Trusted Platform Module) Chip holds a BitLocker Key

Copyright Robert Mathisen & Total Seminars 2023


Maintaining Storage Disks
- Error checking runs chkdsk on a disk partition to check for bad sectors
- Trimming allows data to be written in individual pages termed "available for
use"
- Optimizing trim block in SSDs allows new data to be written
into partially filled blocks

Right click a Drive → Properties → Tools

Error Checking - looking for Errors on HDD’s & SSD’s


Windows will check the File Table for a Partition (D Drive),
verify each entry in the File Table was in good order.

It checks every one of the LBA Blocks to verify it can Read & Write Data.

GREAT way to verify your drives are good!!!!

Optimization/Disk Defragment/Defrag - Organize our HDD’s & to lesser extent SSD’s,


so they run more efficiently

Trimming takes place during Optimization/defrag,


which allows new data to be written into partially filled Blocks,
(Individual Pages called “Available for Use”)

Copyright Robert Mathisen & Total Seminars 2023


I hope you’re enjoying this Notes Course.

I’d really appreciate it if you were to rate & review this course.

Thank you and keep up the good work!


Robert Mathisen

Copyright Robert Mathisen & Total Seminars 2023

You might also like