gilhuguley
Posts: 11
Joined: Mon Jan 21, 2019 3:21 pm

USB drive not mounted where I need it!

Sat Mar 28, 2020 8:58 pm

I've learned a lot, but still a newbie. I am trying to make my Pi 4 a NAS and am almost there, but I need some help.

When I start Raspbian Buster on my Pi4, my USB drive shows up on the desktop. According to file manager, this USB drive is mounted at /media/pi/NAS2. Samba is running, but Win10 cannot find the drive there. Windows CAN connect to my Samba share under /home/pi/shared. How can I get the USB drive to /home/pi/shared?

Thanks.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5623
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: USB drive not mounted where I need it!

Sat Mar 28, 2020 10:20 pm

gilhuguley wrote:
Sat Mar 28, 2020 8:58 pm
I've learned a lot, but still a newbie. I am trying to make my Pi 4 a NAS and am almost there, but I need some help.

When I start Raspbian Buster on my Pi4, my USB drive shows up on the desktop. According to file manager, this USB drive is mounted at /media/pi/NAS2. Samba is running, but Win10 cannot find the drive there. Windows CAN connect to my Samba share under /home/pi/shared. How can I get the USB drive to /home/pi/shared?

Thanks.
As I don't use samba to transfer files between different computer types (prefer SFTP methods and tools) I can't confirm whether this will/can work but you could try creating a symbolic link between /home/pi/shared and /media/pi/NAS2. Possibly better may be not to automount the USB drive (especially if it's always plugged in before booting up) but to mount it directly via an fstab entry - something like what I did in thes old notes here: https://www.cpmspectrepi.uk/raspberry_p ... 29_Methods
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

User avatar
Botspot
Posts: 1263
Joined: Thu Jan 17, 2019 9:47 pm
Location: Texas
Contact: Website

Re: USB drive not mounted where I need it!

Sat Mar 28, 2020 10:28 pm

gilhuguley wrote: How can I get the USB drive to /home/pi/shared?
Easy. File manager (pcmanfm) auto-mounts usb drives to /media/pi.
You can easily manually mount a drive anywhere in your filesystem using the terminal:
To mount a drive, run a command like this:

Code: Select all

sudo mount /dev/sda1 /home/pi/shared/mounted_disk
What is /dev/sda? It's the path to the usb device. Yours may be different, so to see all available usb drives, run this command:
lsblk -o path,mountpoint,size
What is the 1 in /dev/sda1? That's the partition number.
A normal USB drive will only have one partition (fraction of the disk space to store files), but a Raspbian SD card will have 2 partitions. Partition 1 is /boot, and partition 2 is root (/).
I've developed the most intuitive RaspiOS img editor on the planet.
With a GUI similar to Gparted, managing imgs and sd cards is a breeze!
Boot it in a VM, Flash from the Internet at top speed, Mount (to drop in files), Shrink/Expand, Repair, and more.
https://github.com/Botspot/Pi-Power-Tools
> 400 users! 8-)

LTolledo
Posts: 3432
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: USB drive not mounted where I need it!

Sun Mar 29, 2020 1:30 am

you might try editing your smb.conf file to reflect the correct path to the USB drive you installed

Code: Select all

[My HDD share]
   comment = my share (not yours, get your own!)
   path = /home/pi/NAS2
   browseable = yes
   read only = no
   create mask = 0775
   directory mask = 0775
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Return to “Beginners”