Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon

Encrypting Storage Devices

In this hands-on lab, we will learn how to encrypt a storage medium, such as a USB stick or SD card. When a storage device is encrypted, no one can access the data on it without the correct key. That way, even if you lose the device, the data on the device will remain secret.

Google Cloud Platform icon

Path Info

Clock icon Advanced
Clock icon 30m
Clock icon Sep 25, 2018

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Install the `cryptsetup` Utility

    1. Run the following command:
    sudo yum install cryptsetup-luks
  2. Challenge

    Encrypt and Format the Storage Device

    1. List all of the available storage devices.
    sudo fdisk -l
    1. Locate the device that is approximately 3 GB in size and has no partitions.
    2. Encrypt and format the device.
    sudo cryptsetup -y -v luksFormat <DEVICE_NAME>
  3. Challenge

    Configure the Storage Device

    1. Open the device.
    sudo cryptsetup luksOpen <DEVICE_NAME> LA
    1. Check the status of the device.
    sudo cryptsetup -v status LA
    1. Find the header information for the device.
    sudo cryptsetup luksDump <DEVICE_NAME>
    1. Clear the device.
    sudo dd if=/dev/zero of=/dev/mapper/LA bs=128
    1. Create a filesystem on the device.
    sudo mkfs.ext4 /dev/mapper/LA
    1. Create a new directory to serve as the mount point.
    mkdir LA
    1. Mount the filesystem.
    sudo mount /dev/mapper/LA LA/
  4. Challenge

    Unmount and Lock the Device

    1. Unmount the device.
    sudo umount LA/
    1. Lock the device.
    sudo cryptsetup luksClose LA

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans