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
Labs

Storage Management

In this lab, we’re going to go over managing and formatting partitions. Having a solid understanding of how to use these tools is a fundamental component of a Linux sysadmin career. *This course is not approved or sponsored by Red Hat.*

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 0m
Published
Clock icon Apr 05, 2019

Contact sales

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

Table of Contents

  1. Challenge

    Create a 2 GB GPT Partition

    1. Create the partition:

      gdisk /dev/nvme1n1
      
    2. Enter n to create a new partition.

    3. Accept the default for the partition number.

    4. Accept the default for the starting sector.

    5. For the ending sector, enter +2G to create a 2 GB partition.

    6. Accept the default partition type.

    7. Enter w to write the partition information.

    8. Enter y to proceed.

    9. Finalize the settings:

      partprobe
      
  2. Challenge

    Create a 2 GB MBR Partition

    1. Create the partition:
    ```
    fdisk /dev/nvme2n1
    ```
    
    1. Enter n to create a new partition.

    2. Accept the default partition type.

    3. Accept the default for the partition number.

    4. Accept the default for the starting sector.

    5. For the ending sector, type +2G to create a 2 GB partition.

    6. Enter w to write the partition information.

    7. Finalize the settings:

      partprobe
      
  3. Challenge

    Format the GPT Partition with XFS and Mount the Device persistently

    1. Format the partition:

      mkfs.xfs /dev/nvme1n1p1
      

    Getting It Ready for Mounting

    1. Run the following:

      blkid
      
    2. Copy the UUID of the partition at /dev/nvme1n1p1.

    3. Open the /etc/fstab file:

      vim /etc/fstab
      
    4. Add the following, replacing <UUID> with the UUID you just copied:

      UUID="<UUID>" /mnt/gptxfs xfs defaults 0 0
      
    5. Save and exit the file by pressing Escape followed by :wq.

    Create a Mount Point

    1. Create the mount point we specified in fstab:

      mkdir /mnt/gptxfs
      
    2. Mount everything that's described in fstab:

      mount -a
      
  4. Challenge

    Format the MBR Partition with ext4 and Mount the Device.

    Format the MBR Partition with ext4 and Mount the Device on /mnt/mbrext4

    1. Format the partition:

      mkfs.ext4 /dev/nvme2n1p1
      

    Create a Mount Point

    1. Create the mount point:

      mkdir /mnt/mbrext4
      
    2. Mount it:

      mount /dev/nvme2n1p1 /mnt/mbrext4
      
    3. Check that it's mounted:

      mount
      

      The partition should be listed in the output.

    4. Mount the disk:

      mount /dev/nvme2n1p1 /mnt/mbrext4
      

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