File System Creation

File System Creation Overview

  • To use a hard drive for storage, it must first be formatted to install a file system.

    • Formatting prepares the disk, creating the root of the directory structure.

    • Both Windows and Linux utilize different utilities and interfaces for file system creation.

Windows 10 File System Creation

Creating Storage Area
  • Steps for storage area creation in Windows 10:

    1. Open the Disk Management console.

    2. Select an unallocated area on the disk (no partitions exist).

    3. Right-click the unallocated area.

    4. Launch the New Simple Volume wizard.

    5. Allocate storage size for the new volume.

Wizard Navigation
  • Windows provides wizards to guide through the process with:

    • Next button to go forward.

    • Back button to return.

    • Finish button to complete configuration.

Assigning Drive Letter
  • Upon reaching the Assign Drive Letter or Path dialog:

    • Three options:

    1. Assign a drive letter: Select from the provided list.

    2. Mount in NTFS folder: Link partition with a folder on another drive (careful: data might be lost).

    3. Delay assignment: Useful for changing an existing letter.

Formatting Partition
  • Format dialog options:

    • Do not format: Skip for later.

    • Format with settings: Choose file system (FAT, FAT32, NTFS), allocation unit size, and volume label.

    • Quick format: Speed up formatting (for known good partitions).

    • Compression: Enable file/folder compression if using NTFS.

  • After selecting options, click Next and then Finish to format.

CentOS 7 File System Creation

File System Usage
  • In CentOS 7:

    • Define the root directory ("/") and swap file during installation.

  • Default directories created include:

    • /bin: Important binaries

    • /etc: Configuration files

    • /home: User home directories

Disks Utility
  • The Disks utility (GNOME Desktop) allows partitioning and formatting:

    • Select drive, check formatting status.

    • Click to format the disk/volume, enter a volume name and admin password.

Command-Line Utilities
  • parted: Command-line for partitioning:

    • Use sudo parted to start.

    • Create partitions using commands such as:

    • mklabel msdos

    • mkpart primary 1 250

  • fdisk: Useful for viewing partition tables:

    • Syntax: fdisk [-a|-v|-s partition] [device]

  • mkfs command: Create file system on partition:

    • Example: mkfs -t ext4 /dev/sdc1

    • Use -c to check for bad blocks when creating file systems.

Mounting a File System
  • Mounting approaches differ in Windows 10 and CentOS 7:

    • Windows: Pre-mounting of storage items (drive letters assigned automatically).

    • CentOS: User must mount drives as needed (more performance-oriented).

Creating a Mounted Drive in Windows 10
  • To create mounted drives:

    1. Use Disk Management console.

    2. Map a drive to an empty NTFS folder rather than assigning a drive letter.

  • This allows flexibility in managing storage as system usage changes.

Activity Suggestions

  • Follow activities such as:

    • Activity 5-3: Creating and Removing a Simple Volume in Windows.

    • Activity 5-4: Create partitions on a virtual machine.

    • Activity 5-6: Mounting Windows File Systems.

Summary of Default Directories in CentOS 7

  • /root: Home directory for the superuser.

  • /usr: Contains binaries, libraries, and source code for programs.

  • /var: Holds files that vary in size (logs, spool files).