How to create a second disk partition

Hi I have a linux manjaro with XFCE on my laptop. The notebook has two disks - SSD and HDD. The system is installed on an SSD. Now I want to create a second HDD for data (music, movies, clauds, etc.). I found the GParted program in the tools. I created the disc in the program. Now located in / run / media / mkey / hdd2 /

Now I want the drive to connect automatically when the system is plugged in. It is best to keep the disc in the home folder. How to do this? Thank you.

Add to fstab something like:

UUID=<UUID> <mountpoint> ext4 defaults 0 0

where:

  • <UUID> – this is UUID for partition which you want mount, in your case you can find it with sudo blkid | grep sda2
  • <mountpoint> – this is path where you want mount this partition, your probably will be something like: /home/mkey/data – this is example mount partition in mkey home in data folder.
1 Like

Create a directory in your $HOME for this partition ─ e.g. /home/mkey/Data. Next, check the UUID for the new partition with… :arrow_down:

lsblk -o UUID /dev/sda2

Copy the UUID into your clipboard and edit /etc/fstab. Add a line that reads… :arrow_down:

UUID=the-uuid-you-copied  /home/mkey/Data    ext4   defaults   0  0

Save the file and cleanly reboot your system. The new partition will now be available under /home/mkey/Data.

3 Likes

I’m not doing well.
Here is a screenshot. The terminal writes the message that the path /home/mkey/hdd2: is a directory

done, my apology.
I need to edit the file: /etc/fstab and put the values in it. My fault.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.