Networking and System AdministrationUnit 46 min read
File Systems & Storage: Types, Hierarchies, and Management
Unit 4 of Networking and System Administration explores file system architectures (FAT, NTFS, ext4), storage technologies (HDD/SSD/NAS), partitioning, RAID levels, and backup strategies—essential for system administrators managing data integrity, performance, and security in real-world deployments.
Core Concepts: What is a File System?
A file system is the method and data structure that an operating system uses to control how data is stored and retrieved. It organizes data into files and directories, manages access permissions, and ensures efficient storage usage.
How File Systems Work
- Logical Organization: Files are stored as sequences of blocks on disk, with metadata (name, size, permissions) tracked in a file allocation table (FAT) or inode table.
- Physical Storage: Data is written to sectors (512 bytes) on disks, grouped into clusters (e.g., 4KB) for allocation.
- Hierarchy: Uses a tree structure (root → directories → files) for navigation.
classDiagram
class FileSystem {
+Organizes data into files/directories
+Manages metadata (permissions, timestamps)
+Handles storage allocation (FAT/inode)
}
class StorageDevice {
+HDD/SSD/NAS
+Stores data in sectors/clusters
}
FileSystem --> StorageDevice : "Uses"File System Types: Comparison Table
| Type | OS Support | Features | Use Case |
|---|---|---|---|
| FAT32 | Windows, Linux | Simple, no journaling, max 4GB file size | USB drives, legacy systems |
| NTFS | Windows | Journaling, security descriptors, large files (16EB), compression | Windows servers, enterprise storage |
| ext4 | Linux | Journaling, large files (16TB), snapshots, advanced permissions | Linux servers, cloud storage |
| APFS | macOS/iOS | Space sharing, encryption, fast cloning | Apple devices |
| ZFS | Linux (Solaris) | RAID-Z, snapshots, checksums, scalability | High-end storage, virtualization |
Storage Technologies: HDD vs SSD vs NAS
1. HDD (Hard Disk Drive)
- Mechanism: Magnetic platters + read/write heads.
- Speed: 50–150 MB/s (rotational latency).
- Capacity: 500GB–20TB.
- Cost: Cheaper per GB.
stateDiagram-v2
[*] --> HDD: Spinning
HDD --> Seek: Head moves to track
Seek --> Read/Write: Data transfer
Read/Write --> [*]2. SSD (Solid State Drive)
- Mechanism: NAND flash memory (no moving parts).
- Speed: 300–3500 MB/s (no seek time).
- Capacity: 120GB–16TB.
- Cost: Expensive per GB but faster.
3. NAS (Network-Attached Storage)
- Definition: Dedicated file-level storage device on a network (e.g., Synology, QNAP).
- Use Case: Centralized storage for multiple users/devices (e.g., home media servers, backups).
- Protocols: NFS, SMB, AFP.
Partitioning and Mounting
Why Partition?
- Logical separation: Isolate OS, apps, and data.
- Performance: Different file systems for different needs (e.g.,
/booton FAT32,/homeon ext4). - Security: Restrict access to sensitive partitions.
How to Partition (Linux Example)
- Create partitions using
fdiskorgparted:sudo fdisk /dev/sdb - Format with a file system:
sudo mkfs.ext4 /dev/sdb1 - Mount to a directory:
sudo mount /dev/sdb1 /mnt/data
RAID Levels: Redundancy and Performance
RAID (Redundant Array of Independent Disks) combines multiple disks for speed, capacity, or fault tolerance.
| Level | Description | Use Case |
|---|---|---|
| RAID 0 | Striping (no redundancy) | Speed (e.g., video editing) |
| RAID 1 | Mirroring (100% redundancy) | Critical data (e.g., databases) |
| RAID 5 | Striping + parity (fault tolerance) | Server storage |
| RAID 10 | RAID 1 + RAID 0 (mirrored + striped) | High performance + redundancy |
Backup Strategies: 3-2-1 Rule
Goal: Protect against data loss (hardware failure, ransomware, human error). Rule:
- 3 copies of data.
- 2 different media (e.g., HDD + cloud).
- 1 offsite backup.
Backup Types
| Type | Description | Example Tools |
|---|---|---|
| Full | All data copied | rsync, tar |
| Incremental | Only changes since last backup | rsnapshot, BorgBackup |
| Differential | Changes since last full backup | Time Machine (macOS) |
In the Real World
eSewa (Nepal):
- Uses RAID 10 for transaction databases to ensure zero downtime during peak hours (e.g., Dashain/Tihar).
- ext4 file system for Linux servers to handle high I/O from payment processing.
Ncell (Nepal):
- Deploys SSDs in core routers to reduce latency in 4G/5G networks (critical for real-time calls/data).
- ZFS storage for backup systems to enable instant snapshots of customer data.
Daraz (Alibaba Group):
- NAS clusters store product images and inventory data across multiple regions for low-latency access.
- RAID 5 for user uploads (photos/videos) to balance cost and redundancy.
Worked Example: Kathmandu Traffic Route Optimization
Scenario: A city’s traffic management system uses partitioned storage to log GPS data from vehicles.
- Partitioning:
/var/log/traffic(ext4) for real-time data./backup/traffic(RAID 1) for historical analytics.
- File System: ext4 (journaling to prevent corruption during power outages).
- Backup: Daily incremental backups to an offsite NAS.
Exam Tip
- Diagrams: Always draw partition layouts or RAID configurations in exams (e.g., "Show RAID 5 with 4 disks").
- Commands: Know
fdisk,mkfs,mount, andrsyncsyntax for practical questions. - Comparisons: Memorize FAT32 vs NTFS vs ext4 features (e.g., "Which supports large files?").
- Real-World Links: Connect concepts to eSewa (RAID), Ncell (SSD), or Daraz (NAS) in short-answer questions.
- 3-2-1 Rule: Expect questions on backup strategies (e.g., "Design a backup for a hospital’s patient records").
flowchart TD
A["File System"] --> B["FAT32<br/>NTFS<br/>ext4"]
A --> C["Storage<br/>HDD/SSD/NAS"]
B --> D["Partitioning"]
C --> E["RAID<br/>0/1/5/10"]
D --> F["Mounting<br/>/boot, /home"]
E --> G["Backup<br/>3-2-1 Rule"]
G --> H["Tools<br/>rsync, Borg"]Based on the TU BIM syllabus for Networking and System Administration (IT271), unit 4.
Discussion
Loading…