Configuring SSD

If the ordered product includes an SSD, users can create partitions, format, and mount it as needed.

Creating Partitions

Preparation:

It has been confirmed that the device includes an SSD.

Steps:

  1. Execute the following command to view all disks on the device.
sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL

The information displayed after executing the command is as follows:

In the figure, the disk with "NAME" as nvme0n1 represents the SSD. As shown below, the SSD is not partitioned.

image-20241126175110532
  • UUID, NAME, FSTYPE, SIZE, MOUNTPOINT, LABEL, and MODEL are the disk parameters to be listed.
  • The MOUNTPOINT types are "/" and "/boot".
  • LABEL indicates the corresponding disk model.
  • FSTYPE indicates the included file system type.
  1. Execute the following command to create a partition on the SSD.
sudo fdisk /dev/nvme0n1

Follow the prompts to set the partition parameters:

image-20241126175157546
  1. Execute the following command to verify whether the partition was created successfully.
lsblk
image-20241126175211140
  • If the TYPE column displays "part" in the output, the partition was successful.
  • If the TYPE column does not display "part" in the output, the partition failed.

Formatting

The SSD installed by default on the device has no pre-set format. After partitioning, it needs to be formatted to the ext4 format.

Preparation:

SSD partitioning has been completed.

Steps:

Execute the following command to format the SSD named nvme0n1p1 to the ext4 format.

sudo mkfs.ext4 /dev/nvme0n1p1
image-20241126175300792

Mounting the SSD

The SSD installed by default on the device needs to be mounted to a specific folder location through configuration, typically under the /mnt folder, for example /mnt/SSD.

Preparation:

SSD partitioning and formatting have been completed.

Steps:

  1. Execute the following command to view all disk partitions on the device.
sudo lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODEL

The information displayed after executing the command is as follows:

In the figure, the disk with "NAME" as nvme0n1p1 represents the SSD to be mounted.

image-20241126175323386
  • UUID, NAME, FSTYPE, SIZE, MOUNTPOINT, LABEL, and MODEL are the disk parameters to be listed.

  • The MOUNTPOINT types are "/" and "/boot".

  • LABEL indicates the corresponding disk model.

  • FSTYPE indicates the included file system type.

  1. Execute the following command to obtain the location of the disk partition.
sudo blkid

The information displayed after executing the command is as follows, where the SSD partition is shown as "/dev/nvme0n1p1".

image-20241126175359224
  1. Create a target folder as the mount point for the SSD. Assuming the mount point name is SSD and the directory to be mounted is "/mnt", execute the following command:
sudo mkdir /mnt/SSD
  1. Mount the storage device at the created mount point by executing the following command:
sudo mount /dev/nvme0n1p1 /mnt/SSD
  1. Verify whether the storage device was mounted successfully by executing the following command:
lsblk
image-20241126175429991
  • If the output lists the mount point /mnt/SSD, the mount was successful.
  • If the output does not list the mount point information, the mount failed.