Skip to main content

Add a New Filesystem to the Server

Hands-On Lab


Photo of Terrence Cox

Terrence Cox

Senior Vice President of Content





In this learning activity, we will put our knowledge of creating Linux filesystems into practice. Understanding how to work with and mount new filesystems is a key concept in understanding how to secure them. Once completed, you will have a firm grasp of how to create a basic filesystem and mount it on system boot.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

In your role as a system administrator, you have been called upon to add a small new filesystem to an existing server that will be used for some testing. As a result, you have been provided the IP address and access credentials for a CentOS 7 server that will have the primary root disk, where the operating system itself is, and an additional unconfigured 5gb drive ready to be configured.

Once you have logged in, list the available disk devices on the system. Identify the unpartitioned 5gb disk and note the drive name. Partition the device as a Linux filesystem and save the partition (a single 5gb partition should do the trick).

After you complete the partitioning, format this new drive for use as an XFS filesystem. Create a new mount for this drive in the /mnt directory, call the new mount 'newvol'. Once that mount point is created, mount the drive and verify you can access it, then unmount it.

Finally, add an appropriate entry in the /etc/fstab file so that the filesystem will mount at the /mnt/newvol location on any system restart. Run the 'mount' command on that directory after you create the entry to be sure it works as expected and then turn over the system for your team to use.