Operations 3 min read

How to Mount a New Linux Disk: Step‑by‑Step Guide

This guide walks you through checking a new Linux disk, creating a partition with fdisk, formatting it, mounting it temporarily, configuring /etc/fstab for automatic mounting, and verifying the setup after a reboot.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
How to Mount a New Linux Disk: Step‑by‑Step Guide

Linux Disk Mounting

1. Check Disk Partition Status

Run fdisk -l or lsblk to list disks. In the example, /dev/sdb has no partitions.

2. Add a Partition to the New Disk

Execute fdisk /dev/sdb and follow the interactive prompts to create a partition.

3. Format the Partition

Format the newly created partition with XFS using mkfs.xfs /dev/sdb1.

4. Verify Filesystem Types

Run blkid to list all filesystem types and confirm the new partition.

5. Mount the Partition to a Directory

Mount it temporarily with mount /dev/sdb1 /ynat/. This mount will disappear after a reboot.

Note: This is a temporary mount; it will be lost after a reboot.

7. Configure Automatic Mount on Boot

First, obtain the partition UUID with blkid and copy it. Then edit /etc/fstab (using vi or another editor) to add a line that references the UUID, ensuring fields are separated by spaces.

8. Reboot to Apply Changes

Reboot the system (e.g., reboot) and verify the mount persists with df -h. If the mount is missing, revisit step 6 to correct the /etc/fstab entry.

Source: https://www.cnblogs.com/nicoKie/p/18034736

(Copyright belongs to the original author; removed if infringed)

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxSystem Administrationfdiskfstabdisk mounting
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.