Add 2nd Drive

Open the terminal.
Identify the disk or partition you want to mount.
$ lsblk

sudo apt install parted
sudo parted /dev/sda mklabel gpt
sudo parted -a opt /dev/sda mkpart primary ext4 0% 100%
lsblk

sudo mkfs.ext4 -L datapartition /dev/sda1
sudo lsblk -o NAME,FSTYPE,LABEL,UUID,MOUNTPOINT

sudo mkdir -p /home/storage
sudo nano /etc/fstab


Determine the filesystem type of the disk or partition.
$ blkid /dev/sdb1
/dev/sdb1: UUID="ccab0f8d-3xxxx18" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="c088a647-01"
Create a directory for the mount point if it does not exist.
$ mkdir home/storage
To mount the disk automatically at startup, edit the /etc/fstab file.
$ sudo nano /etc/fstab
Add an entry for the disk or partition.
UUID=b8e4a1f6-6e8f-4f6e-8b6e-6e8f4f6e8b6e /home/storage ext4 defaults 0 0
Apply the changes by mounting all filesystems.
$ sudo mount -a
Confirm the disk or partition is mounted.
$ df -h


Posted : Monday 15th of September 2025 @ 12:23 AM— Tags : 2ndHDD