Skip to content

Storage Stack

Definition

The storage stack is the layered architecture that manages data storage in a computer system, from the physical hardware up to the application level. Each layer in the stack has specific responsibilities and functions, ensuring efficient, reliable, and scalable data storage and access.

Layers of the Storage Stack

1. Physical Storage

  • Description: The actual hardware where data is stored.
  • Components: Hard Disk Drives (HDDs), Solid State Drives (SSDs), NVMe drives, and other storage media.
  • Function: Provides the raw storage capacity for data.

2. Device Drivers

  • Description: Software that controls the physical storage devices.
  • Components: Kernel modules, drivers specific to storage hardware (e.g., SATA, NVMe drivers).
  • Function: Facilitates communication between the operating system and physical storage devices.

3. RAID (Redundant Array of Independent Disks)

  • Description: Combines multiple physical disks into a single logical unit for redundancy and performance.
  • Components: Hardware RAID controllers, software RAID solutions (e.g., mdadm in Linux).
  • Function: Provides data redundancy, improved performance, and fault tolerance.

4. Volume Management

  • Description: Abstracts physical storage into manageable units.
  • Components: Logical Volume Manager (LVM), ZFS.
  • Function: Allows for dynamic resizing, snapshots, and flexible storage management.

5. File Systems

  • Description: Manages how data is stored and retrieved on a storage device.
  • Components: EXT4, XFS, NTFS, Btrfs.
  • Function: Organizes data into files and directories, providing a method for data access and management.

6. Block Layer

  • Description: Manages block-level storage devices.
  • Components: Device-mapper in Linux, which includes LVM and DM-Crypt.
  • Function: Provides a mapping between the file system and physical storage, supporting features like encryption and snapshots.

7. Storage Area Network (SAN) and Network Attached Storage (NAS)

  • Description: Networked storage solutions.
  • Components: SAN uses Fibre Channel or iSCSI; NAS uses network protocols like NFS and SMB.
  • Function: Provides shared storage across multiple servers or clients, enhancing data availability and scalability.

8. Caching

  • Description: Improves storage performance by temporarily storing frequently accessed data.
  • Components: Cache memory, hybrid storage solutions (SSDs used as cache for HDDs).
  • Function: Reduces latency and improves read/write speeds.

9. Data Protection and Management

  • Description: Ensures data integrity, availability, and security.
  • Components: Backup solutions, snapshot tools, encryption mechanisms.
  • Function: Protects against data loss, corruption, and unauthorized access.

Example of the Storage Stack in Action

Scenario: Saving a File

  1. Application Layer: User saves a file through a text editor.
  2. File System Layer: File system (e.g., EXT4) organizes the file into blocks and directories.
  3. Volume Management Layer: LVM maps the logical volume where the file resides.
  4. Block Layer: Device-mapper translates file system requests to physical storage requests.
  5. RAID Layer: RAID ensures redundancy and performance optimization.
  6. Device Driver Layer: Storage driver communicates with the physical device.
  7. Physical Storage Layer: Data is written to the actual storage hardware.

Summary

  • Storage Stack: A multi-layered architecture managing data storage from physical hardware to application level.
  • Layers: Includes physical storage, device drivers, RAID, volume management, file systems, block layer, SAN/NAS, caching, and data protection.
  • Function: Ensures efficient, reliable, and scalable data storage and access.

Understanding the storage stack helps in designing, managing, and troubleshooting complex storage environments effectively.

Multipath

Multipathing in the storage stack refers to the use of multiple physical paths to connect a server to a storage device. This redundancy enhances fault tolerance and improves performance by providing alternative paths for data to travel in case one path fails or becomes congested.

Purpose

  • Fault Tolerance: Ensures continuous access to storage even if one or more paths fail.
  • Load Balancing: Distributes I/O operations across multiple paths to optimize performance.
  • Increased Bandwidth: Combines the bandwidth of multiple paths to enhance data throughput.

How Multipathing Works

Multipathing software manages the multiple connections between the server and storage, presenting a single virtual device to the operating system. It dynamically selects the best path for data transfer based on path availability and performance.

Components of Multipathing

1. Physical Paths

  • Description: Multiple physical connections (cables) linking the server to the storage device.
  • Examples: Fibre Channel, iSCSI, SAS cables.

2. Multipathing Software

  • Description: Software that manages the multiple paths and provides a single device interface to the operating system.
  • Examples: Device Mapper Multipath (DM-Multipath) in Linux, Multipath I/O (MPIO) in Windows.

3. Path Selection Policies

  • Description: Algorithms used to determine the best path for I/O operations.
  • Examples:
  • Round Robin: Cycles through available paths.
  • Least Queue Depth: Chooses the path with the fewest outstanding I/O requests.
  • Failover: Uses a primary path until it fails, then switches to a secondary path.

Stratis

  • https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/managing_storage_devices/setting-up-stratis-file-systems#setting-up-stratis-file-systems

Definition

Stratis is a local storage management solution for Linux, designed to simplify the management of complex storage configurations. It provides a high-level interface for managing storage, abstracting the underlying complexity of technologies like LVM and XFS.

Key Features

  • Ease of Use: Simplifies storage management with a user-friendly command-line interface.
  • Advanced Features: Supports thin provisioning, snapshots, and data integrity.
  • Abstraction Layer: Hides the complexity of the underlying storage technologies.

Components of Stratis

1. Stratisd

  • Description: The daemon that manages Stratis storage.
  • Function: Provides the backend functionality for creating and managing storage pools and filesystems.

2. stratis CLI

  • Description: Command-line interface for interacting with Stratis.
  • Function: Allows users to perform various storage management tasks through simple commands.

How Stratis Works

Stratis creates and manages storage pools made up of one or more physical storage devices. From these pools, filesystems can be created and managed, benefiting from advanced features like snapshots and thin provisioning.

Stratis vs LVM (Logical Volume Manager)

Overview

Both Stratis and LVM are tools used for managing storage on Linux systems, but they have different approaches and features. Here's a comparison to help you understand their differences and when to use each.

Stratis

Key Features

  • Ease of Use: Designed to simplify storage management with an easy-to-use command-line interface.
  • Advanced Features: Supports thin provisioning, snapshots, and data integrity out of the box.
  • Abstraction Layer: Abstracts the complexity of the underlying storage technologies (LVM, XFS).
  • Unified Management: Provides a unified interface for managing pools and filesystems.

Advantages

  • User-Friendly: Simplifies complex storage tasks, making it easier for less experienced users.
  • Automatic Management: Handles many details automatically, reducing the need for manual intervention.
  • Modern Features: Built-in support for modern storage features like thin provisioning and snapshots.

Disadvantages

  • Limited Flexibility: May not offer the same level of granular control as LVM for advanced users.
  • Newer Technology: Relatively newer and may not be as widely adopted or tested as LVM.

LVM (Logical Volume Manager)

Key Features

  • Flexibility: Provides granular control over physical volumes (PVs), volume groups (VGs), and logical volumes (LVs).
  • Scalability: Can manage large, complex storage environments with ease.
  • Advanced Management: Supports features like striping, mirroring, and snapshots.
  • Mature Technology: Widely used and well-tested over many years.

Advantages

  • Granular Control: Offers detailed control over every aspect of storage management.
  • Mature and Stable: Long history of use in production environments, ensuring stability and reliability.
  • Advanced Capabilities: Supports a wide range of advanced storage management features.

Disadvantages

  • Complexity: Can be complex to set up and manage, requiring a deeper understanding of storage concepts.
  • Manual Management: Requires more manual intervention and knowledge of LVM commands.