1

Problem: new hard drive doesn't show up in file system where I can easily access data and save stuff.

I am trying to install and mount a new SATA SSD hard drive for additional file storage.

I used gparted to partition and mount the disk. I followed the advice from this question to partition and mount.

This is my output from sudo parted -l

(base) john@john-linux:~$ sudo parted -l
Model: ATA Samsung SSD 860 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags 1 1049kB 1000GB 1000GB ext4

Model: Samsung SSD 970 EVO 1TB (nvme) Disk /dev/nvme0n1: 1000GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags:

Number Start End Size File system Name Flags 1 1049kB 538MB 537MB fat32 EFI System Partition boot, esp 2 538MB 1000GB 1000GB ext4

Here's a screenshot of my file system in my Other locations tab in file manager. I thought I could expect to see my new SATA SSD here after partitioning and mounting. However, all it shows is my M.2 SSD.

Here is the output from system-info. I've mounted the partition to /mnt. Which I've been able to find but cannot read or write data to it.

civdex
  • 15
  • 1
  • 5
  • 1
    Please download and run the Ubuntu Forum's system-info script and let it upload the result to a pastebin. Then edit your original question to show a link to the pastebin. That information will help me and others understand what you have (software and hardware) and it will help us help you. – sudodus Sep 23 '22 at 16:05
  • 1
    It seems the partition was correctly created but isn't mounted. – ChanganAuto Sep 23 '22 at 16:07
  • @ChanganAuto My "Mount Point" as per gparted is /hdd, not sure if that mount point is in the wrong place for file access – civdex Sep 23 '22 at 16:15
  • 1
    Yes, it's "wrong". Additional data partitions are typical mounted under /media or /mnt,,, And it's great that you followed a commands only answer but then you must understand a few things that are only implicit there. Nowadays unless you're managing a headless server you don't need to know any of that. You don't even need GParted! Ubuntu already installs by default the Disks tool. With it all you have to do is to select the blank drive, click "+" to add one or more partitions a choose the file type. When done click the "play" button to automatically mount it under /media. – ChanganAuto Sep 23 '22 at 16:26
  • 1
    As you have now - assuming your info is correct - you'll find it by opening "computer"... Problem: Any partition created by GParted is owned by root, not your user. You'd need then to "chown" that mount point which, again, is problematic in this "snaps" era (snaps can only access $HOME and mount points under /media or /mnt and that with special permissions). Knowing Ubuntu is moving (fast) towards snaps it's impractical to have mount points such as yours. You're creating problems for yourself for no good reason whatsoever. – ChanganAuto Sep 23 '22 at 16:35
  • @ChanganAuto Alright, makes sense. I changed the mount point to /mnt. – civdex Sep 23 '22 at 16:36
  • @ChanganAuto So to access this drive I'd go to /mnt. I guess I was thinking I'd still expect to see it in "Other locations" next to my M.2 SSD. But from this file structure, it feels like I'm accessing it from the M.2. SSD and moreover the file indicating the size and memory consumption of my M.2 SSD doesn't seem to be increased by the /mnt storage and still shows a maximum of 1000 GB (size of the M.2), which I would expect would increase to 2000 GB if /mnt and therefore the new SSD is located within that directory. Not sure if that makes sense! – civdex Sep 23 '22 at 16:39
  • Ah, actually I was able to select under Settings symbol -> mount options -> "show in user interface" and now it shows up in my file system manager, which is really all I wanted. Thanks for your help and guidance to the Disks tool, that was really helpful. – civdex Sep 23 '22 at 16:44
  • @sudodus, I've posted the results from system-info but wasn't able to post it to pastebin so I posted it to termbin instead, hope that's alright. – civdex Sep 23 '22 at 16:52
  • Again: In strictly "technical" terms there's nothing wrong in creating a mount point as /hdd. But nowadays thanks to the SNAPS users shouldn't do that. Snaps CAN'T access /hdd, that's the problem. – ChanganAuto Sep 23 '22 at 16:56
  • @civdex, If you need [more] help, please put a link to the termbin web page with the output from the system-info script. – sudodus Sep 23 '22 at 17:42
  • @sudodus, alright thanks. Here is the link: https://termbin.com/b3wc I've been able to mount it to a different spot where I can find it but I'm not able to read/write to it – civdex Sep 23 '22 at 17:43
  • @civdex, You should have exited with 'q' from less and let the system-info script write to the pastebin instead of copy-pasting from the less window. That way some sensitive data would be removed for example about networking. Now you have published those data. Please remove the comment with the link (I have the relevant data about the drive already). – sudodus Sep 23 '22 at 18:00

1 Answers1

1

This answer describes how to manage a partition with a Linux file system (in this particular case ext4).


The "Mount Details of '/etc/fstab'" and "Current Mount Details of 'mount'" are useful. The drive is mounted with read/write permissions (for the owner).

I think that only the superuser root has privilages to write to the drive at the top level /mnt. You can live with that and create a [sub]directory

sudo mkdir /mnt/mydir

and modify the ownership

sudo chown "$USER":"$USER" /mnt/mydir

After that you should be able to create/modify/delete files and directories there. You can test with

cd /mnt/mydir
echo 'Hello World' > hello
cat hello
mkdir testdir
ls -l
rm hello
rmdir testdir
ls -l
sudodus
  • 46,324
  • 5
  • 88
  • 152
  • Please let me know if it works to create/modify/delete files with these simple commands, but also if it works with other (maybe graphical) tools, that may be installed as snaps. – sudodus Sep 23 '22 at 18:22
  • 1
    It's great, the only thing I'd like is if I could remove the "unmount" option in the graphical interface. Found a solution that said if I moved the mountpoint but then I can't see how much storage is left in the Other locations file system interface. So I'll just leave it as is as this is good enough for me, thanks. – civdex Sep 23 '22 at 18:47