How do I configuring a new storage SSD?

Hi, I bought a new SSD to expand my storage. I already have a main SSD of M.2 2280 512GB were Manjaro is installed, a 2TB Hard Drive for files, and a new installed 2TB SSD. Using GParted I created the new partition table and the ext4 partition.
How do I configure this new storage to be usable like the previous two?
and how do I configure the permissions so all programs can access it? This second question comes because some programs like Plex app are not able to see the hard drive, just the 512GB SSD; and others apps but I forgot which ones. Any help is appreciated.

~ >>> inxi -Fxxxz                                                                                                                                            
System:
  Kernel: 5.16.7-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    Desktop: KDE Plasma 5.23.5 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: X570 Steel Legend
    serial: <superuser required> UEFI: American Megatrends v: P2.20
    date: 11/26/2019
CPU:
  Info: 8-core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP smt: enabled
    arch: Zen 2 rev: 0 cache: L1: 512 KiB L2: 4 MiB L3: 32 MiB
  Speed (MHz): avg: 2331 high: 3598 min/max: 2200/4426 boost: enabled
    cores: 1: 3588 2: 2055 3: 2056 4: 2399 5: 2199 6: 2432 7: 2007 8: 2200
    9: 3598 10: 2060 11: 2056 12: 2059 13: 2196 14: 2199 15: 2194 16: 2013
    bogomips: 115246
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]
    vendor: XFX Pine driver: amdgpu v: kernel bus-ID: 11:00.0
    chip-ID: 1002:731f class-ID: 0300
  Display: x11 server: X.Org 1.21.1.3 compositor: kwin_x11 driver:
    loaded: amdgpu,ati unloaded: modesetting,radeon alternate: fbdev,vesa
    resolution: 2560x1440~144Hz s-dpi: 96
  OpenGL: renderer: AMD Radeon RX 5700 XT (NAVI10 DRM 3.44.0
    5.16.7-1-MANJARO LLVM 13.0.0)
    v: 4.6 Mesa 21.3.5 direct render: Yes
Audio:
  Device-1: AMD Navi 10 HDMI Audio driver: snd_hda_intel v: kernel
    bus-ID: 11:00.1 chip-ID: 1002:ab38 class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASRock
    driver: snd_hda_intel v: kernel bus-ID: 13:00.4 chip-ID: 1022:1487
    class-ID: 0403
  Sound Server-1: ALSA v: k5.16.7-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.45 running: yes
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASRock driver: igb v: kernel
    port: f000 bus-ID: 09:00.0 chip-ID: 8086:1539 class-ID: 0200
  IF: enp9s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-2: Intel Wireless-AC 9260 driver: iwlwifi v: kernel
    bus-ID: 0b:00.0 chip-ID: 8086:2526 class-ID: 0280
  IF: wlp11s0 state: down mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Wireless-AC 9260 Bluetooth Adapter type: USB driver: btusb
    v: 0.8 bus-ID: 1-3:3 chip-ID: 8087:0025 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 1 state: up address: see --recommends
Drives:
  Local Storage: total: 4.1 TiB used: 1.12 TiB (27.2%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 2TB
    size: 1.82 TiB speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXM7 temp: 47.9 C scheme: MBR
  ID-2: /dev/nvme1n1 vendor: Intel model: SSDPEKNW512G8 size: 476.94 GiB
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 002C temp: 37.9 C
    scheme: GPT
  ID-3: /dev/sda vendor: Western Digital model: WD20EZAZ-00GGJB0
    size: 1.82 TiB speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 0A80 scheme: GPT
Partition:
  ID-1: / size: 459.5 GiB used: 225.2 GiB (49.0%) fs: ext4
    dev: /dev/nvme1n1p2
  ID-2: /boot/efi size: 299.4 MiB used: 280 KiB (0.1%) fs: vfat
    dev: /dev/nvme1n1p1
Swap:
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme1n1p3
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: amdgpu temp: 51.0 C
    mem: 52.0 C
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 716
Info:
  Processes: 407 Uptime: 27m wakeups: 0 Memory: 15.55 GiB
  used: 4.5 GiB (28.9%) Init: systemd v: 250 Compilers: gcc: 11.1.0
  clang: 13.0.1 Packages: 2036 pacman: 1987 flatpak: 35 snap: 14 Shell: Zsh
  v: 5.8 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.12
~ >>>
1 Like

Thanks for the links. I search online and the search box here and those links did not appeared. But I am not able to understand what to do even after looking at those instructions. According to the instructions I shout do:

sudo mkdir -p /run/media/joel/ba9ddb22-b1d3-4302-8fcb-03943f48dd34/

?
and if so why does it have such a long name (ba9ddb22-b1d3-4302-8fcb-03943f48dd34/)? Did I missed something when formatting it?

and then:

sudo chmod ugo+rwx /run/media/joel/ba9ddb22-b1d3-4302-8fcb-03943f48dd34/

?

The 2 TB hard-drive is already mounted in the /media/joel/ so I worry that trying to mount the new SSD may erase the hard-drive content.

With all due respect for the other contributors — and not to toot my own horn — I think my own three tutorials higher up will be the easiest to understand and follow up on, even though they are quite a long read.

(Note: If it involves /run/media then it doesn’t come out of any of my tutorials. :stuck_out_tongue: )

1 Like

Paths to /run/media/<user> is typical of a path generated by your file manager, from the partition’s UUID, in order to mount removable partitions.
Though if you make your own mount configuration, you can mount (almost) anywhere, with whatever name you want.

What you may need is indeed to give that folder the right permissions, as you pointed out in the second part.


Mounting does not erase data. If you mount a partition to a folder which contains data, the system will show the partition content instead of the original data, but that original data is left untouched.

After partitioning the drive it appeared in the file manager as /run/media/joel/ba9ddb22-b1d3-4302-8fcb-03943f48dd34 See picture.


But I am still as clueless as in the beginning. What should I do to have the new ssd accessible?
a tutorial told me to mount it, but it appears is already mounted? then you wrote that if I mount it to media my data from the hard-drive will not erased but it will not be accessible?
and the tutorial-working-with-additional-drives section 3. SETTING UP A STATIC MOUNTPOINT does not actually tell me how to do it. That tutorial also suggest I should mount it on /srv as is non-removable media. But is the drive not already showing up on /media? Should I change it? and if so How? Please help.

You set up a static mountpoint by…

  • first creating a directory where you want to mount it. If it is for a single-user system with no other user accounts, best is to create a folder in your home directory, e.g. /home/sproid/Data; and then…

  • adding a record for the partition in /etc/fstab, which mounts the filesystem to the folder suggested here-above at boot time, e.g. :arrow_down:

UUID=long-string-of-characters  /home/sproid/Data  ext4  defaults,ssd,noatime   0  0

The above presumes that you’ve formatted the partition as ext4, of course.

After completing those two steps, you reboot and it’ll be mounted at /home/sproid/Data.

Anything mounted at /run/media is not persistent, because /run is on a tmpfs, a memory-based filesystem. Therefore it’s pointless to try setting permissions there, because they will not persist across reboots.

How will it be for all users access, not just single-user?
I thought it needed to be on /srv not on /home/sproid/Data . I take it it could be either?
Why is /home/sproid/Data instead of shorter like /home/sproid/ ?

/home/<user> is a user’s personal folder. So if you want the mount to be shared among multiple users, you shall put it outside /home.

Now, if the filesystem contains files that are to be shared among multiple user accounts, then there are two possible other locations where you can set up a mountpoint, i.e.:

  • a directory under /srv for filesystems on non-removable media; or
  • a directory under /media for filesystems on removable media.
1 Like

So on the terminal I shoud do:
UUID=ba9ddb22-b1d3-4302-8fcb-03943f48dd34 /srv/sproid ext4 defaults,ssd,noatime 0 0
That should mount and apply the permissions so apps like Nexcloud, Plex, Jellyfish, etc can access it?

This only configures the mount.
The folder serving as mount point must be created and its permissions set (once) before mounting.

Like this?

sudo mkdir -p /srv/sproid
sudo chmod ugo+rwx /srv/sproid
UUID=ba9ddb22-b1d3-4302-8fcb-03943f48dd34 /srv/sproid ext4  defaults,ssd,noatime   0  0

i wouldnt go that liberal even if this box is in a cave, i would recommend rather;
sudo chmod ugo+rw /srv/sproid

i hope you know by now this should go in /etc/fstab

Computer bricked.


This is what I did:
sudo mkdir -p /srv/sproidssd
sudo chmod ugo+rw /srv/sproidssd
sudo cp -v /etc/fstab /etc/fstab.backup
sudo nano /etc/fstab
There I added and saved the line:
UUID=ba9ddb22-b1d3-4302-8fcb-03943f48dd34 /srv/sproidssd ext4 defaults,ssd,noatime 0 0

How can I unbrick my system?

Did you read “Give root password for maintenance” ?

  1. You should enter your root password.
  2. What is the output of lsblk -f?
  3. Show us cat /etc/fstab

Restore your backup copy of /etc/fstab, or directly fix it (check all information are correct), and you should be good.

This is the problem - must be:
UUID=ba9ddb22-b1d3-4302-8fcb-03943f48dd34 /srv/sproid ext4 defaults,noatime 0 0

1 Like

I guess that UUID ba9ddb22-b1d3-4302-8fcb-03943f48dd34 is wrong.
There is no option ssd for ext4: fstab - Debian Wiki