Week 4

Storage and Backup

OPS3 - Virtualization and Cloud Infrastructure

Welcome to Week 4!

What You'll Learn This Week

1. Block Devices and Partitions

1.1 Examining Storage

Figure 1: Linux Block Devices and Partitions - How the kernel represents different storage types (SATA, NVMe, and their partitions)

1.2 Managing Partitions (fdisk)

To create a formatted space on a disk, we use fdisk or parted.

Section 1 Checkpoint

Reflection: Consider why NVMe drives have names like nvme0n1 instead of sda. What happens if you attempt to partition a disk that is already mounted and actively in use?

Resources:

2. Logical Volume Manager (LVM)

2.1 The LVM Hierarchy

The three-tier architecture of LVM provides the flexibility that traditional partitions lack. As shown in the diagram below, the hierarchy flows from physical disks to virtual volumes:

Figure 2: LVM Three-Tier Hierarchy - Physical Volumes (PV) combine into Volume Groups (VG), which are divided into Logical Volumes (LV)

2.2 Hands-On LVM Commands

Proxmox uses LVM extensively. Here is how you manage it manually.

Section 2 Checkpoint

Summary: LVM adds significant flexibility over static partitions, enabling dynamic resizing and storage pooling. The architectural flow moves from PV (Physical Volume) to VG (Volume Group) to LV (Logical Volume), and Proxmox installs to LVM by default to take advantage of these capabilities.

Reflection: Can you shrink an LVM volume while it is online and actively in use? What is the difference between standard LVM and LVM-Thin provisioning?

Resources:

3. ZFS: The Enterprise Standard (New Material)

3.1 Why ZFS?

The illustration below compares traditional write operations (which overwrite data in place) versus ZFS's Copy-on-Write approach:

Figure 3: ZFS Copy-on-Write (CoW) - Traditional filesystems overwrite data in place; ZFS writes to new blocks and updates pointers

The self-healing process is visualized below, showing how ZFS detects, validates, and repairs corrupted data blocks:

Figure 4: ZFS Self-Healing - Checksums detect corrupted blocks, which are automatically repaired from redundant copies

3.2 Basic ZFS Commands

Proxmox installs ZFS tools by default.

3.3 The Power of Instant Snapshots

Section 3 Checkpoint

Reflection: Why does ZFS need direct access to the disk (passthrough) rather than working through a traditional RAID controller? What is the "ARC" in ZFS terms, and how does it improve performance?

Resources:

4. Virtual Disk Formats

4.1 Raw (.raw)

4.2 QCOW2 (QEMU Copy On Write)

4.3 Summary Comparison

The visual comparison below highlights the key differences between Raw and QCOW2 disk formats:

Figure 5: Virtual Disk Formats - Raw disks offer maximum performance while QCOW2 provides flexibility with snapshots and thin provisioning

Feature Raw (.raw) QCOW2
Performance Highest (Near Native) High (Slight Overhead)
Space Usage Fixed (Pre-allocated) Dynamic (Grow on demand)
Snapshots Requires ZFS/LVM support Built-in (Internal)
Portability Universal (Byte stream) QEMU Specific
### Section 4 Checkpoint
Summary:

Reflection:

Resources:

8. Additional Resources

9. Lab Exercises

Summary

Review the key concepts covered in this week's material

Questions?