0

I'm trying to mount an external HDD for setting up a Plex server. When I try to do this it get the error:

mount: /home/pi/media: special device /dev/sda1 does not exist.

I found things online about the problem I am having. People said that this has something to do with that the HDD has to ramp up before it will get recognized by the system. I can confirm this with the fact that when I run the command fdisk -l and it takes a couple seconds before it shows up. They found a fix for this and are talking about a script and put sleep in there. But I never found a script.

I also correctly formatted the drive with fdsik fyi. And Raspbian is installed and up-to-date.

Edit: The output I am getting with the lsblk command, output. The other output i get with df -h gives me this

15
  • Are you getting that error when booting? or when running a mount command manually? or something else? Commented Feb 23, 2021 at 21:28
  • When the drive is connected and it wont boot from the SD card that is in it. But when i unplug it, it just boots up fine. I get the same message when I want to mount manually, so "mount: /home/pi/media: special device /dev/sda1 does not exist." and I use the command "sudo mount -t ext4 -o defaults /dev/sda1 /home/pi/media" Commented Feb 23, 2021 at 21:33
  • but sudo fdisk -l shows sda1 as existing? another question, does the external HDD have its own power supply? Commented Feb 23, 2021 at 21:43
  • 2
    Please add the output as pasted text direct into your question. It is bad practice to follow external links to understand a question.
    – Ingo
    Commented Feb 24, 2021 at 12:04
  • 2
    @JasonDeckmyn You wrote it by yourself. To get more/better help you should present your question with information as simple as possible. You burden the reader to have it easier for you. That's not a good approach to get answers for free. And additional information should not given by comments. I have down voted the question.
    – Ingo
    Commented Feb 24, 2021 at 18:18

3 Answers 3

2

The questioner answered his question within the question. To have a final solution I cut and pasted it here into an answer. @JasonDeckmyn wrote:

I found out what the problem was with mounting my HDD. Apparently it was already mounted to a certain folder. I found this out with sudo mount -l | grep sda1. But I restarted my system but I messed up the system with fstab and it wont boot any more. I reinstalled everything and it worked fine. I also formatted the drive on my Windows machine to exFAT. I was able to mount it to the folder I wanted.

7
  • If sda was already mounted, why wasn't the mount point listed in the lsblk output?
    – Seamus
    Commented Feb 24, 2021 at 19:23
  • @Seamus Do you ask me? There is no lsblk output in the question. I do not follow links to understand a question.
    – Ingo
    Commented Feb 27, 2021 at 8:52
  • Yes - I assumed you had followed the link to the OP's lsblk output. It's not a clear question as I read it - just wondered if I had missed something.
    – Seamus
    Commented Feb 27, 2021 at 9:00
  • @Seamus I am not interested in helping here.
    – Ingo
    Commented Feb 27, 2021 at 14:25
  • I don't blame you - it seems like a total waste of time. My apologies for asking questions.
    – Seamus
    Commented Feb 27, 2021 at 22:58
1

If /dev/sda is there but not /dev/sda1, it means the disk is not partitioned, or the partition table is not readable.

Connect the disk to a different system. If it gets mounted and you see the data, then the problem is Pi-related. Maybe the power supply is too weak.

If nothing shows up on other computers as well, you'll have to repeat the partitioning (fdisk) and the formatting (mkfs) before you can use the disk. Note that you should flush the disk cache (sync) after making changes to the partition table, and wait a few seconds to give the disk enough time to complete the write before you disconnect it. Then disconnect the disk, reconnect it, and re-run fdisk to confirm that the partition table is correct.

If you prefer a more user-friendly experience, use gparted.

3
  • The drive and partition is showing up when I use sudo fdisk -l. Device Start End Sectors Size Id Type Flags /dev/sda1 0 900684224 900684225 429.5G 83 Linux native | this is the output it gives me for the drive. I can't test if the drives show up on other pc's right now. Commented Feb 24, 2021 at 12:40
  • What do you see when you run sudo partprobe -s? Commented Feb 24, 2021 at 13:46
  • /dev/sda: msdos partitions 1 /dev/mmcblk0: msdos partitions 1 2 | I get this as my output. But I ran the command sudo mount -l | grep sda1 and I saw it was already mounted to a folder. I rebooted my pi and I messed up my fstab file and it wont boot again. But I got it to work. I'll edit my main post with what I did and realised. Commented Feb 24, 2021 at 14:40
-1

What's the output from df -h? Do you see your expected disk [sda1] listed?

Spinning up the disk should only take a couple of seconds, and the mount point should still appear in your OS, even while the disk is power saving and not spinning.

2
  • 1
    Output, this is the output I am getting from df -h. And the disk is not there I think because I am unable to mount it. Commented Feb 24, 2021 at 7:54
  • 1
    df won't show info for unmounted filesystems ... since the problem is the inability to mount the filesystem, df isn't going to tell you anything Commented Feb 24, 2021 at 20:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.