Skip to content

Storage

Thanyu edited this page Jul 18, 2023 · 1 revision

Add New SSD more than 2TB

Check the new disk

After physically installing the new SSD, we need to format it and mount it to the system.

sudo fdisk -l

The new drive should show up in the list of devices. Copy the device name, in my case it is /dev/sdb.

Create a partition

Follow the instructions to create a new partition on the new drive. The default options are fine, just press Enter to accept the default value.

sudo gdisk /dev/sdb
>>> n (create a new partition)
>>> p (check the partition table)
>>> w (save the changes and exit)

Format the new partition

sudo mkfs.ext4 /dev/sdb

Create Mount Point

sudo mkdir /mnt/mydisk
sudo mount /dev/sdb /mnt/mydisk

Auto-mount the new drive

sudo blkid

Copy the UUID of the new drive. Then, edit the /etc/fstab file and add the following line:

UUID=your-uuid /mnt/mydisk ext4 defaults 0 0

Confirm everything is working

ls /mnt/mydisk

Change the owner of the new drive

sudo chown -R username:username /mnt/mydisk