# IT Fundamentals/2014/File Systems

File systems are used to control how data is stored and retrieved. Partitions consist of a range of cylinders of a hard disk drive. This lesson covers partitions and file systems.

## Objectives and Skills

Objectives and skills for IT Fundamentals certification are covered in detail in other lessons. This lesson helps you:
* Understand and create partitions
* Understand and format file systems
* Understand file systems permissions
* Mount volumes

## Readings

* Wikipedia: Disk partitioning
* Wikipedia: Master boot record
* Wikipedia: GUID Partition Table
* Wikipedia: File system
* Wikipedia: File system permissions
* Wikipedia: File Allocation Table
* Wikipedia: NTFS
* Wikipedia: HFS Plus
* Wikipedia: ext4
* Wikipedia: Defragmentation

## Multimedia

* YouTube: Partitioning 101
* YouTube: Filesystems
* YouTube: Understanding File Systems

## Activities

These activities may either be completed using virtualization software and virtual hard drives or using connected USB drives. Be extremely careful not to reformat your primary hard drive or any drive with data you want to keep.
* Identify partitions and file systems currently installed on your computer system:
** Windows: Review HowToGeek: Understanding Hard Drive Partitioning with Disk Management. Use the Disk Management utility to identify existing partitions and file systems.
** OS X: Review Wikipedia: Disk Utility. Use the Disk Utility to identify existing partitions and file systems.
** Linux: Review Wikipedia: GNOME Disks. Use the Disks utility to identify existing partitions and file systems.
* Create a virtual disk:
** Windows: Review Microsoft: Create and Use a Virtual Hard Disk. Use the Disk Management utility to create a 1 GB virtual disk. Practice attaching and detaching the virtual disk.
** OS X: Review Apple: Create a Disk Image. Use the Disk utility to create a 1 GB virtual disk. Practice mounting and unmounting the virtual disk.
** Linux: Review The Linux Experiment: Create a Virtual Hard Drive Volume. Create a 1 GB disk image. Use the Disks utility to practice attaching and unmounting the virtual disk.
* Create and format a partition:
** Windows: Review Microsoft: Create and Format a Hard Disk Partition. Using the attached virtual disk from above, use Computer Management's Disk Management utility to initialize the disk, create a partition, and format it as NTFS.
** OS X: Review Apple: Partition a Disk. Using the mounted virtual disk from above, use Disk Utility to create a partition on the disk and format it as Mac OS Extended.
** Linux: Review GNOME.org: Disks. Using the attached virtual disk from above, use the Disks utility to create a partition on the disk and format it as ext4.
* Reformat a USB drive:
** Windows: Review Microsoft: Formatting Disks and Drives. Connect an unused USB drive to your system. Use the Disk Management utility to format the disk. Experiment with both quick and standard formatting using FAT32.
** OS X: Review OS X Daily: Format an External Hard Drive or USB Flash Drive. Connect an unused USB drive to your system. Use the Disk utility to erase (format) the disk. Experiment with different Erase Free Space options using MS-DOS (FAT).
** Linux: Review Ask Ubuntu: How to Format a USB Flash Drive. Connect an unused USB drive to your system. Use the Disks utility to format the disk. Experiment with both quick and slow formatting using FAT.
* Eject a USB drive:
** Windows: Review LifeHacker: Do I Really Need to Eject USB Drives and Microsoft: Safely Remove Devices from Your Computer. Eject the reformatted USB drive.
** OS X: Review LifeHacker: Do I Really Need to Eject USB Drives and LaptopMag: How to Eject USB in OS X. Eject the reformatted USB drive.
** Linux: Review LifeHacker: Do I Really Need to Eject USB Drives and Ask Ubuntu: What is the Difference Between Unmount, Eject, Safely Remove Drive. Eject the reformatted USB drive.
* Determine whether your file system needs defragmenting:
** Windows: Review Wikipedia: Disk Defragmenter (Windows). Use the Disk Defragmenter utility to analyze your hard disk. Consider defragmenting your hard disk if recommended.
** OS X: Review MacObserver: How and Why to Defragment your Mac's Hard Drive.
** Linux: Review Linux Magazine: Defragmenting Linux.

## Lesson Summary

* Disk partitioning is the act of dividing a hard disk drive (HDD) into multiple logical storage units referred to as partitions, to treat one physical disk drive as if it were multiple disks, so that a different file system can be used on each partition.
* Multiple partitions can be used to separate operating systems, separate operating systems from data, and improve performance under specific usage scenarios.
* Multiple partitions can reduce space available, increase fragmentation, and reduce performance under more general usage scenarios.
* A disk that is partitioned using the traditional Master Boot Record (MBR) partitioning scheme supports up to four partitions. All four can be primary partitions, or one can be an extended partition.
* Primary partitions support a single file system, and may be used to boot the computer when the given partition is selected as the active partition.
* An extended partition is not bootable, but may be subdivided into multiple logical partitions.
* MBR partitions are limited to a maximum size of 2 TB.
* Partitions larger than 2 TB may be created using the GUID Partition Table (GPT) partitioning scheme supported by UEFI (rather than the legacy BIOS) firmware.
* For maximum portability, removable disks should be either unpartitioned or partitioned with MBR, have a maximum partition size of 2 TB, 512-byte sectors, and formatted using the FAT/FAT32 file system.
* A file system (or filesystem) is used to control how data is stored and retrieved.
* File systems manage space allocation, directories, file names, properties, and access permissions.
* The FAT file system is a legacy file system originally used with personal computer DOS, which is supported for compatibility reasons by nearly all current personal computer operating systems and many mobile devices and embedded systems.
* FAT is the default file system for removable media (other than optical disks).
* FAT includes FAT12, FAT16, and FAT32, the difference being the number of bits used to maintain each entry, and therefore the maximum disk size supported.
* The maximum disk size limit for FAT32 is 2 TB using 512-byte sectors.
* NTFS is the default file system for Windows NT, Windows 2000, and later Windows operating systems.
* NTFS improvements over FAT include improved support for metadata, advanced data structures to improve performance, better reliability and disk space utilization, security access control lists (ACL), and file system journaling.
* APFS (Apple File System) serves as the primary file system for macOS (superseded HFS+).
* ext4 is currently the default file system for most Linux distributions, and also the file system used by Android.
* Fragmentation occurs when a file system cannot or will not allocate enough contiguous space to store a complete file as a unit, but instead puts parts of it in gaps between existing files. Larger files and greater numbers of files also contribute to fragmentation and consequent performance loss.
* Defragmentation may occasionally be necessary on FAT and NTFS partitions. Fragmentation control is built into HFS+ and ext4, making defragmentation (generally) unnecessary on those systems.
* Defragmentation should not be performed on solid state drives (SSDs). It causes unnecessary wear on these devices without significantly improving performance.

## Key Terms
### Boot Configuration Data

    A firmware-independent database for boot-time configuration data used by Microsoft Windows Vista and later which replaces the boot.ini that was used by NTLDR.

### boot loader

    A computer program that loads an operating system or some other system software for the computer after completion of the power-on self-tests.

### boot sector

    A region of a hard disk, floppy disk, optical disc, or other data storage device that contains machine code to be loaded into random-access memory (RAM) by a computer system's built-in firmware.

### cylinder

    A division of data in a disk drive, based on concentric, hollow, slices through the platters, collecting the respective circular tracks aligned through the stack of platters.

### cluster

    Allocation units for data on various file systems, consisting of one or more sectors.

### Disk Management

    A logical disk volume manager used in Microsoft Windows.

### disk signature

    A 32-bit value that is intended to uniquely identify a hard disk.

### Disk Utility

    A logical disk volume manager used in OS X.

### GNOME Disks

    A logical disk volume manager used in Linux.

### GUID (Globally Unique Identifier)

    A unique reference number used as an identifier in computer software, typically implemented as a 128-bit value.

### head

    A device that reads and writes data in a hard drive by manipulating the magnetic medium that composes the surface of an associated disk platter.:

### Logical block addressing (LBA)

    A common scheme used for specifying the location of blocks of data stored on computer storage devices, generally secondary storage systems such as hard disks, and which replaced physical cylinder-head-sector addressing schemes.

### partition

    A logical storage unit on a hard disk drive, originally created as a collection of cylinders.

### platter

    A physical disk inside a disk drive.

### sector

    The smallest unit of data that can be read or written by a disk drive, traditionally 512 bytes, but 4,096 bytes is becoming more common.

### track

    A thin concentric circular strip of sectors.

### volume

    A single accessible storage area with a single file system, created as a collection of one or more partitions.

## Review Questions

* Disk partitioning is _____, so that _____. Disk partitioning is the act of dividing a hard disk drive (HDD) into multiple logical storage units referred to as partitions, to treat one physical disk drive as if it were multiple disks, so that a different file system can be used on each partition.
* Multiple partitions can be used to _____. Multiple partitions can be used to separate operating systems, separate operating systems from data, and improve performance under specific usage scenarios.
* Multiple partitions can _____. Multiple partitions can reduce space available, increase fragmentation, and reduce performance under more general usage scenarios.
* A disk that is partitioned using the traditional Master Boot Record (MBR) partitioning scheme supports up to _____ partitions. All _____ can be _____ partitions, or _____ can be _____. A disk that is partitioned using the traditional Master Boot Record (MBR) partitioning scheme supports up to four partitions. All four can be primary partitions, or one can be an extended partition.
* Primary partitions support _____, and may be used to _____. Primary partitions support a single file system, and may be used to boot the computer when the given partition is selected as the active partition.
* An extended partition is _____. An extended partition is not bootable, but may be subdivided into multiple logical partitions.
* MBR partitions are limited to a maximum size of _____. MBR partitions are limited to a maximum size of 2 TB.
* Partitions larger than_____ may be created using the _____ partitioning scheme supported by UEFI (rather than the legacy BIOS) firmware. Partitions larger than 2 TB may be created using the GUID Partition Table (GPT) partitioning scheme supported by UEFI (rather than the legacy BIOS) firmware.
* For maximum portability, removable disks should be either unpartitioned or partitioned with _____, have a maximum partition size of _____, _____ sectors, and formatted using the _____ file system. For maximum portability, removable disks should be either unpartitioned or partitioned with MBR, have a maximum partition size of 2 TB, 512-byte sectors, and formatted using the FAT/FAT32 file system.
* A file system (or filesystem) is used to _____. A file system (or filesystem) is used to control how data is stored and retrieved.
* File systems manage _____, _____, _____, _____, and _____. File systems manage space allocation, directories, file names, properties, and access permissions.
* The FAT file system is _____. The FAT file system is a legacy file system originally used with personal computer DOS, which is supported for compatibility reasons by nearly all current personal computer operating systems and many mobile devices and embedded systems.
* FAT is the default file system for _____. FAT is the default file system for removable media (other than optical disks).
* FAT includes FAT12, FAT16, and FAT32, the difference being _____. FAT includes FAT12, FAT16, and FAT32, the difference being the number of bits used to maintain each entry, and therefore the maximum disk size supported.
* The maximum disk size limit for FAT32 is _____. The maximum disk size limit for FAT32 is 2 TB using 512-byte sectors.
* NTFS is the default file system for _____. NTFS is the default file system for Windows NT, Windows 2000, and later Windows operating systems.
* NTFS improvements over FAT include _____. NTFS improvements over FAT include improved support for metadata, advanced data structures to improve performance, better reliability and disk space utilization, security access control lists (ACL), and file system journaling.
* HFS Plus (or HFS+) serves as the primary file system for _____. HFS Plus (or HFS+) serves as the primary file system for OS X.
* ext4 is currently the default file system for _____. ext4 is currently the default file system for most Linux distributions, and also the file system used by Android.
* Fragmentation occurs when a file system _____. Fragmentation occurs when a file system cannot or will not allocate enough contiguous space to store a complete file as a unit, but instead puts parts of it in gaps between existing files. Larger files and greater numbers of files also contribute to fragmentation and consequent performance loss.
* Defragmentation may occasionally be necessary on _____ partitions. Fragmentation control is built into _____ and _____, making defragmentation (generally) unnecessary on those systems. Defragmentation may occasionally be necessary on FAT and NTFS partitions. Fragmentation control is built into HFS Plus and ext4, making defragmentation (generally) unnecessary on those systems.
* Defragmentation should not be performed on _____. It causes unnecessary wear on these devices without significantly improving performance. Defragmentation should not be performed on solid state drives (SSDs). It causes unnecessary wear on these devices without significantly improving performance.

## Assessments

* Flashcards: Quizlet: IT Fundamentals - File Systems
* Quiz: Quizlet: IT Fundamentals - File Systems

## See Also

* HowToGeek: What is a file system and why are there so many of them