Day 3
Session Summary β Disk Management, Swap & Cron Jobs Timeline
00:00 β 01:05 | AWS EBS Volume Types (GP2 vs GP3)
-
Introduction to IOPS (Input/Output Operations Per Second)
-
GP2 vs GP3 comparison
-
Performance benefits of GP3 volumes
-
Creating a 50GB EBS volume
01:05 β 03:15 | Attaching Volume to EC2 Instance
-
Attaching volume from AWS console
-
Device naming under
/dev -
Checking attached disks using:
-
lsblk -
df
-
03:15 β 05:10 | Understanding Volumes vs Partitions
-
Concept of block devices
-
What is a partition
-
Dividing a disk into smaller partitions
-
Example use case: separate partitions for databases
05:10 β 07:30 | Viewing Existing Partitions
-
Using
lsblkto inspect disks and partitions -
Understanding partition labels like
xvdf1,xvdf2
07:30 β 09:10 | Partitioning Tool: parted Utility
-
Introduction to
parted -
Warning about selecting correct device
-
Importance of using the right block device
09:10 β 11:30 | Disk Labels: MBR vs GPT
-
Differences between MBR and GPT
-
Partition limits in MBR
-
Why GPT is the modern standard
-
Creating a GPT disk label
11:30 β 15:15 | Creating Disk Partitions
-
Using
mkpartto create partitions -
Naming partitions
-
Defining start and end sizes
-
Creating multiple partitions
15:15 β 16:20 | Reloading Partition Table
-
Using
partprobe -
Making partition changes persistent
-
Verifying partitions with
lsblk
16:20 β 18:55 | Formatting Partitions with File System
-
Need for formatting before use
-
File system types: ext3, ext4
-
Using
mkfs.ext4to format partitions -
Understanding file system performance
18:55 β 22:40 | Mounting Partitions
-
Creating mount directories
-
Using
mountcommand -
Writing data to mounted partition
-
Verifying mounts with:
-
df -h -
df -Th
-
22:40 β 24:30 | Disk Management Flow Recap
-
Steps covered:
-
Attach volume
-
Create partition
-
Format
-
Mount
-
-
Real-world use cases
24:30 β 28:20 | Best Practices for Data Storage
-
Avoid storing app data on root volume
-
Use separate volumes for databases
-
Data recovery advantages
-
Disk expansion vs shrinking
28:20 β 29:30 | Introduction to LVM (Logical Volume Management)
-
Extending partitions dynamically
-
Volume groups and logical volumes
-
Use cases for LVM
29:30 β 31:20 | Persistent Mounting with fstab
-
Editing
/etc/fstab -
Making mounts survive reboots
-
Unmounting disks with
umount
Swap Memory Section
31:20 β 33:10 | Introduction to Swap Memory
-
What is swap
-
Using disk as temporary RAM
-
When swap is useful
33:10 β 37:30 | Swappiness Configuration
-
Checking swappiness value
-
Impact on performance
-
Recommended values:
-
General systems: default (~60)
-
Databases: lower values (5β10)
-
-
Tuning via system configuration
Cron Job Automation Section
37:30 β 39:00 | Introduction to Cron Jobs
-
Automating tasks in Linux
-
Example: nightly backups
39:00 β 41:30 | Cron Syntax Explained
-
crontab -eusage -
Five-field cron structure:
-
Minute
-
Hour
-
Day of month
-
Month
-
Day of week
-
-
Examples:
-
Every minute
-
2:30 AM daily
-
Weekend jobs
-
41:30 β 44:20 | Creating a Cron Job Script
-
Writing a test shell script
-
Making script executable
-
Adding cron entry
44:20 β 47:40 | Verifying Cron Execution
-
Redirecting output to log file
-
Using
tail -fto monitor logs -
Seeing script run every minute
47:40 β End | Session Wrap-Up
-
Use cases of cron jobs
-
Q&A
-
Session closing