Automate Drive Provisioning With a Shell Script
Turn the manual storage provisioning workflow into an automation script: partition, format, mount, and persist a blank drive with a single non-interactive script.
Focused, hands-on problems for sharpening your DevOps and server-side skills. Some teach specific concepts while others mirror real-world scenarios. Every challenge includes hints, feedback, and automated solution checks.
Turn the manual storage provisioning workflow into an automation script: partition, format, mount, and persist a blank drive with a single non-interactive script.
A MariaDB deployment and its PVC were accidentally deleted. The PersistentVolume survived due to its Retain policy. Restore the database by rebinding the existing PV without losing any data.
Observe the Delete and Retain reclaim policies in action, recover a Released PV by patching claimRef, and recover data by creating a new PV pointing to the same storage directory.
Explore how the DefaultStorageClass admission controller injects storage classes, explicitly name a StorageClass, switch the cluster default, and inspect where local-path stores volumes on the node.
Learn the three static PV binding patterns - generic match, label selector, and bidirectional claimRef - then use a no-provisioner StorageClass with WaitForFirstConsumer to pin storage to a specific node.
Create a StatefulSet and a Headless Service for a distributed caching system. Verify that Pods are created with stable ordinal names.
Discover that a simple mount command doesn't survive a reboot and learn how to make mount points persistent using /etc/fstab or systemd.
Practice creating a fresh GPT partition, formatting it as ext4, and mounting it on the filesystem tree.