Good morning all. Sorry to bother you all with what I am sure is the same question being asked for the 1000th time. But I'm having some serious issues trying to mount my external hard drive to my pie.
I have my plex server up and running on it and now I just need the hard drive part done.. the problem I'm having is the when I connect the hard drive to the Pi it auto mounts in /media/pi and not in /mnt folder.. nothing I've tried has worked to get it to the right folder.
My goal is to get it mounted then set it up so it can be seen across my network so I can add files to it from my laptop.
The hard drive is a Toshiba canvio desktop 3tb and it is formatted as ntfs.
Any ideas?
Re: Mounting External Hard Drive
Use a text editor to open /etc/usbmount/usbmount.conf. Check out MOUNTPOINTS.
My advice applies to RaspiOS only. Please mention if you use another OS.
Re: Mounting External Hard Drive
No go with that. Nothing shows up.
Re: Mounting External Hard Drive
I got my 2TB usb drive to mount in /mnt with this.
edit: I got it to mount and allow access with this. Set up the directory to mount it to:
Them mount it.
Code: Select all
$ sudo mount /dev/sda1 /mnt
Code: Select all
sudo mkdir /mnt/usb
sudo chown -R pi:pi /mnt/usb
sudo chmod -R 775 /mnt/usb
sudo setfacl -Rdm g:pi:rwx /mnt/usb
sudo setfacl -Rm g:pi:rwx /mnt/usb
Code: Select all
sudo mount -o uid=pi,gid=pi /dev/sda1 /mnt/usb
My advice applies to RaspiOS only. Please mention if you use another OS.
Re: Mounting External Hard Drive
The problem may be the USB chip. Use a different enclosure for the disk or debug the USB. Use lsusb to see what device is attached. if using lsusb for the first time, run lsusb before plugging the disk in then again after you plug in the disk. There should be an extra line for the disk. You cab then search for problems with USB disks using the device model or USB id.
Re: Mounting External Hard Drive
Add a suitable entry in /etc/fstab and (re)boot with the drive attached.
Is your pi running headless or is it booting into a graphical desktop? From what you describe, I suspect you're getting the behaviour expected from the desktop's auto mounter.
Putting an entry in /etc/fstab and having the drive connected at boot time should see it mounted before the desktop gets started.
I'm mounting a 3TB hdd on debian with this entry in /etc/fstab: SATA rather than USB but that shouldn't make a difference.
Edit: You'll need to substitute appropriate values for UUID and the mount point to match your requirements. with the HDD connected should give you the UUID.
Is your pi running headless or is it booting into a graphical desktop? From what you describe, I suspect you're getting the behaviour expected from the desktop's auto mounter.
Putting an entry in /etc/fstab and having the drive connected at boot time should see it mounted before the desktop gets started.
I'm mounting a 3TB hdd on debian with this entry in /etc/fstab:
Code: Select all
UUID=46061E60061E50F3 /media/shared ntfs defaults 0 0
Edit: You'll need to substitute appropriate values for UUID and the mount point to match your requirements.
Code: Select all
sudo blkid
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
Re: Mounting External Hard Drive
Hello folks. I'm actually having the same problem as the OP. I've run my Pi with the same hard drive before with no trouble, but due to a configuration snafu, I've had to start from scratch with everything. I actually reformatted the hard drive (separate power source) just to make sure everything was clean, but once I plugged it into the Pi, it auto mounted to /media/Pi/[the UUID]. When I run:
Then when I unmount and run (the dir name is 'cause I'm running a music server):
I tried @thagrol's suggestion, and while that avoided the auto booting to /media/pi, the drive didn't show up at that point, though running sudo blkid showed that sda1 was in use.
Any help you could provide at all would be good. I'm halfway thinking that it might be an issue of permissions, but I'm totally unsure and it's frustrating as all hell.
I get this: https://www.dropbox.com/s/lkcagg1nc1o36 ... 8.jpg?dl=0sudo blkid
Then when I unmount and run (the dir name is 'cause I'm running a music server):
I get this: https://www.dropbox.com/s/4hn3hkq16gmjl ... 2.jpg?dl=0sudo mount -t vfat -o uid=pi,gid=pi /dev/sda1 /media/funkhub
I tried @thagrol's suggestion, and while that avoided the auto booting to /media/pi, the drive didn't show up at that point, though running sudo blkid showed that sda1 was in use.
Any help you could provide at all would be good. I'm halfway thinking that it might be an issue of permissions, but I'm totally unsure and it's frustrating as all hell.
Re: Mounting External Hard Drive
Couple of things:
Your blkid output doesn't show a /dev/sda1 it does show a /dev/sdb1
Your blkid output shows /dev/sdb1 as ntfs but you're trying to mount it as vfat.
Tryinstead.
Your blkid output doesn't show a /dev/sda1 it does show a /dev/sdb1
Your blkid output shows /dev/sdb1 as ntfs but you're trying to mount it as vfat.
Try
Code: Select all
sudo mount -t ntfs -o uid=pi,gid=pi /dev/sdb1 /media/funkhub
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides
Re: Mounting External Hard Drive
Linux assigns disk designators as it finds the disks, so a disk will not always show up as the same sda or sdb as it did the last time you plugged it in.
It is one of Linux's little quirks. That is why you should use the disk id in your fstab file.
It is one of Linux's little quirks. That is why you should use the disk id in your fstab file.

Re: Mounting External Hard Drive
@thagrol
Thank you for the reply. The screen grabs were from a few tries prior to my last attempt, when it was showing sda1 rather than sdb1, I used the appropriate line, but uploaded the wrong pics. As for the file format, when I attempt to use ntfs in the line, I get an invalid file system error.
Thank you for the reply. The screen grabs were from a few tries prior to my last attempt, when it was showing sda1 rather than sdb1, I used the appropriate line, but uploaded the wrong pics. As for the file format, when I attempt to use ntfs in the line, I get an invalid file system error.
Re: Mounting External Hard Drive
Alright, found my error. Apparently, ntfs-3g wasn't installed. For anyone else running into an issue, if you're getting:
Install ntfs-3g by running:
The first time I set my Pi up just running the initial upgrades seemingly took care of that I thought, but maybe it slipped my mind.
In any case, thanks for jumping in and listening.
Code: Select all
mount: unknown filesystem type 'ntfs-3g'
Code: Select all
sudo apt-get install ntfs-3g
In any case, thanks for jumping in and listening.

-
- Posts: 45
- Joined: Sat Jul 16, 2016 12:23 pm
- Location: Stoke-On-Trent
Re: Mounting External Hard Drive
Hi everyone,
I know the OP has done what he wants to do but I think some further information might help others with this.
Now the OP has mounted the drive in /mnt this stops the auto mounting from occuring as it recognises the drive as already being mounted. This is the same result if you add an entry in fstab. The boot mount prevents any automount.
But, the reason the auto mount occurs, and which hasnt been explained here, is down to the file manager PCManFM. The file manager is the program causing the automount in /media/pi. To prevent automounts, do the following:
Hope that helps someone out there!
I know the OP has done what he wants to do but I think some further information might help others with this.
Now the OP has mounted the drive in /mnt this stops the auto mounting from occuring as it recognises the drive as already being mounted. This is the same result if you add an entry in fstab. The boot mount prevents any automount.
But, the reason the auto mount occurs, and which hasnt been explained here, is down to the file manager PCManFM. The file manager is the program causing the automount in /media/pi. To prevent automounts, do the following:
- Open the filemanager. Easiest way is click Menu, Accessories, File Manager
- Click on Edit, then click Preferences
- In the menu on the left, select Volume Management
- Untick the option Mount removable media automatically when they are inserted
Hope that helps someone out there!
Main Computer: RPi3
BOINC Server: RPi2
Torrent Box: RPi2 + 2TB WD Green HDD via USB Dock
Web + Email Server: RPi2
Home Automation Server: RPi2 + Edimax EW-7811Un
Decomissioned: 2 x RPi Model B
BOINC Server: RPi2
Torrent Box: RPi2 + 2TB WD Green HDD via USB Dock
Web + Email Server: RPi2
Home Automation Server: RPi2 + Edimax EW-7811Un
Decomissioned: 2 x RPi Model B
Re: Mounting External Hard Drive
Thanks for chiming in! I know in my case, I was definitely looking for a setting to keep that from happening to begin with. Don't know why I didn't think to check the file manager, heh. I'll certainly keep it in mind for the future.
-
- Posts: 45
- Joined: Sat Jul 16, 2016 12:23 pm
- Location: Stoke-On-Trent
Re: Mounting External Hard Drive
When it first happened to me, I just assumed automount would be a kernal thing. I ignored it for a while and as I was changin some preferences, I found the volume management section in file manager and my prayers were answered! Im lucky I remembered it though as Ive set that once about two years ago and never thought about it until today. every additional Pi ive had since has been headless so no file manager, no automountsdeep86 wrote:Thanks for chiming in! I know in my case, I was definitely looking for a setting to keep that from happening to begin with. Don't know why I didn't think to check the file manager, heh. I'll certainly keep it in mind for the future.

Main Computer: RPi3
BOINC Server: RPi2
Torrent Box: RPi2 + 2TB WD Green HDD via USB Dock
Web + Email Server: RPi2
Home Automation Server: RPi2 + Edimax EW-7811Un
Decomissioned: 2 x RPi Model B
BOINC Server: RPi2
Torrent Box: RPi2 + 2TB WD Green HDD via USB Dock
Web + Email Server: RPi2
Home Automation Server: RPi2 + Edimax EW-7811Un
Decomissioned: 2 x RPi Model B
-
- Posts: 1
- Joined: Wed Oct 17, 2018 12:37 am
Re: Mounting External Hard Drive
I get this error when tying to use a USB Storage device. Any guidance is appreciated. I get a similar error with an external hard drive.
Error mounting /dev/sda1 at /media/pi/76E8-CACF: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro" "/dev/sda1" "/media/pi/76E8-CACF"' exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'
Error mounting /dev/sda1 at /media/pi/76E8-CACF: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro" "/dev/sda1" "/media/pi/76E8-CACF"' exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'