Setting up a secondary drive

For example, for my home HDD I use the following entry in /etc/fstab:

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext4 defaults,noatime 0 2

The first three columns are obvious, it’s UUID, mountpoint, filesystem.

To find out the UUID of the drive I prefer lsblk -f instead of bklid (the readout is more clear to me, idk).

Regarding mountpoint, some people prefer to mount stuff in /mnt and then symlink it, but I just mount it directly where it needs to go. Works fine.

The filesystem I use on all of my drives is ext4, it’s good enough for me. :man_shrugging: If you are not sure which filesystem is on your drive, the same command as above, lsblk -f will let you know.

For normal drives I always use defaults,noatime as options, for dump I always use 0 and for pass (fsck order) always 2 (root drive should have 1, swap and efi 0, everything else 2).

That’s pretty much all one needs to do to add a secondary drive.

8 Likes

There is a straight forward easy method

2 Likes

It boots.

No longer shows up under devices, but the directory is there.

I assume it’s simply that.

1 Like

Sounds like it is working. Can you write data to it?

Does it show up in the output of mount or df -h

1 Like

Oh, yup. Precisely what I wanted. I guess I dragged it out pointlessly with my questions lol.

Thank you everyone! :slightly_smiling_face:


Can’t tag multiple replies as a solution so imma do Kresimirs since he did multiple edits to pretty much sum up the topic, in case anyone needs a reference in the future. But y’all were a big help!

6 Likes

To further explain how I did it. I opened Gparted, unmounted the drive, I formatted it to ext4, I remounted it and it was ready. Either I did something terribly wrong but it worked anyway or I did it right.

Do you use it to just store files/pictures ect… ?

I have a 500gig ssd not even being used, I’ve been wanting to set it up to use to store pictures on.

Yes, I use it for storage only.

1 Like

Thanks

1 Like

I used Gparted as well, still won’t let me copy/paste. I right click on a photo on my desktop & go to paste it and can’t select paste cause its greyed out.

Check in Gparted, is their a little lock icon next to the drive? If so unlock it with your root password and make sure its mounted.

click on the drive in your file manager and select mount (after the first parts)

You need to find out where it is mounted in the file system, that is it’s mount-point. Then you need to change the ownership of the mount-point from root to your user according to:

sudo chown $USER:$USER /path/to/mount/point.

2 Likes

There a key next to sda1, its mounted in Gparted.

is sda1 your main partition for the OS? If so, don’t mess with that. Try also what @pebcak said, although I didn’t have to do it:
sudo chown $USER:$USER /path/to/mount/point .

I did a lsblk -f
/run/media/dad/xxxxxx-x

No i have EOS Mate on my nvme

Try:
sudo chown $USER:$USER /run/media/dad/xxxxxx-x

Or if you want that partiton to get mounted automatically at each boot, then do as above in this thread and create a convenient mount point and entry in /etc/fstab.

1 Like

chown: cannot access ‘/run/media/dad/xxxxxxxx-x’: No such file or directory

Could you post the whole output of lsblk -fs? Have terminal open in fullscreen.

1 Like