Dragontail281
Posts: 47
Joined: Thu Mar 07, 2019 8:56 pm

Trying to mount network drive not working

Sat Mar 07, 2020 7:21 pm

Hi all,
I am trying to mount my shared network drive to my RPI 3B+.
The drive is connected to my Netgear Nighthawk AC1900 router as a READYSHARE.
I have done an update/upgrade and have the most current cifs-utils.
I created the mnt/share/readyshare folder.
When I enter

sudo mount.cifs //192.168.1.1/READYSHARE/USB_Storage /mnt/share/readyshare -o user=xxx,pass=xxx

I get mount error(112): Host is down
I don’t have the drive set up to not need the password, and when I tried the same script minus the -o user etc, it asked me for the password, and when I entered the routers password, I got the same error.
If I go to the File Manager, Go, Network, I can access the drive, and read or write to it after connecting “anonymously”, and it shows up as an icon on the desktop.
This goes away when I shutdown, hence the reason I am trying to make the mount permanent.
I know there is another step after this, but I can’t get past this point.
Any ideas???

Thanks
RPI3B+ - Raspberry Pi OS -general "playing" and/or RetroPi
RPI0W#1 - MotionEyeOS - yard surveillance
RPI0W#2 - Driveway gate monitor - coming soon
RPI0W#3 - ?????

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

Re: Trying to mount network drive not working

Sun Mar 08, 2020 2:15 am

have you tried mounting the share drive via /etc/fstab?
"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!"

Dragontail281
Posts: 47
Joined: Thu Mar 07, 2019 8:56 pm

Re: Trying to mount network drive not working

Sun Mar 08, 2020 2:45 am

No I have not.
Most of the instructions I have found have been the way I was trying.
How does the fstab way work?
Again, I’m trying to permanently mount the drive so it shows up every time I boot.

Thanks
RPI3B+ - Raspberry Pi OS -general "playing" and/or RetroPi
RPI0W#1 - MotionEyeOS - yard surveillance
RPI0W#2 - Driveway gate monitor - coming soon
RPI0W#3 - ?????

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

Re: Trying to mount network drive not working

Sun Mar 08, 2020 3:37 am

to mount it you'll need
HDD's UUID (you can check this via sudo blkid)
mount point (ex. /mnt/mydrives/drive1)
file type (vfat? ntfs? ext4? exfat?)

example below for fstab method

Code: Select all

UUID=xxxxx-yyyyyy-zzzzz-12345    /mnt/mydrive/yourdrive   ext4  defaults,noatime,nofail  0  0
you'll also need to set raspbian to "wait for network", this can be done in the raspbian configuration (or raspi-config on the command line)

for more information about fstab

Code: Select all

man fstab

there is another way called the systemd method
have not tried it yet (simply because fstab is not giving me problems)

if you still can't mount the drive... just post the fstab entry you made and we'll see how we can fix it.
"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!"

User avatar
thagrol
Posts: 4258
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Trying to mount network drive not working

Sun Mar 08, 2020 11:23 am

LTolledo wrote:
Sun Mar 08, 2020 2:15 am
have you tried mounting the share drive via /etc/fstab?
Switching to fstab is unlikely to help. It just runs the mount command during the boot sequence. Given that the current manual mount fails post boot, the same mount will likely fail in fstab.

Get the mount working manually then convert that to an fstab entry.

Edited to correct typos.
Last edited by thagrol on Sun Mar 08, 2020 11:36 am, edited 1 time in total.
Arguing with strangers on the internet since 1993.

All advice given is based on my experience. it worked for me, it may not work for you.
All GPIO pin numbers are BCM numbers.

User avatar
thagrol
Posts: 4258
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Trying to mount network drive not working

Sun Mar 08, 2020 11:24 am

LTolledo wrote:
Sun Mar 08, 2020 3:37 am
to mount it you'll need
HDD's UUID (you can check this via sudo blkid)
It's a network mount. Mounting via UUID isn't possible.
Arguing with strangers on the internet since 1993.

All advice given is based on my experience. it worked for me, it may not work for you.
All GPIO pin numbers are BCM numbers.

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

Re: Trying to mount network drive not working

Sun Mar 08, 2020 11:35 am

ah... my bad, was thinking of locally attached drive....

it should be

IP address and
share name

so changing the example to:

Code: Select all

IPaddress/sharename   /mnt/mydrive/yourdrive   cifs  user=user,password=password,nofail,vers=1.0,x-systemd-automount  0  0
"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!"

User avatar
thagrol
Posts: 4258
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Trying to mount network drive not working

Sun Mar 08, 2020 11:35 am

A quick web search for "mount error(112): Host is down" suggests you try specifying the samba version in your mount command.

In light of that try:

Code: Select all

sudo mount.cifs //192.168.1.1/READYSHARE/USB_Storage /mnt/share/readyshare -o user=xxx,pass=xxx,vers=2.0
You could try vers=1.0 but that's an old and insecure version of the protocol. Or vers=3.0.

If that works, try this in /etc/fstab:

Code: Select all

//192.168.1.1/READYSHARE/USB_Storage /mnt/share/readyshare cifs defaults,_netdev,nofail,vers=2.0,user=xxx,pass=xxx,vers=2.0 0 0
"_netdev" tells the mounter that the mount depends on the network being up.
"nofail" tells it not to stop the boot process if the mount fails.
Arguing with strangers on the internet since 1993.

All advice given is based on my experience. it worked for me, it may not work for you.
All GPIO pin numbers are BCM numbers.

Dragontail281
Posts: 47
Joined: Thu Mar 07, 2019 8:56 pm

Re: Trying to mount network drive not working

Sun Mar 08, 2020 12:54 pm

Thanks all, I will try again when I get “free time”, wifey has a lot of honey do’s for me today. ;)
RPI3B+ - Raspberry Pi OS -general "playing" and/or RetroPi
RPI0W#1 - MotionEyeOS - yard surveillance
RPI0W#2 - Driveway gate monitor - coming soon
RPI0W#3 - ?????

Dragontail281
Posts: 47
Joined: Thu Mar 07, 2019 8:56 pm

Re: Trying to mount network drive not working

Sat Mar 14, 2020 3:01 am

Ok, so I tried adding the version, used 1, 2, and 3, and still got the 112 error.
Even tried it, with ver 2, and omitting the -o user=xxx,pass=xxx.
It asks me for the password, and then I get the 112 error.
I know the path is correct, because if I leave the IP off, it tells me could not resolve address for READYSHARE: unknown error.
Any more guesses?
RPI3B+, most current version of Raspbian, update/upgrade every time I log on,
It’s not super important at this point, as I’m still learning, but at some point I would like to try and mount the drive to my RPI0W running MotionEyeOS.
RPI3B+ - Raspberry Pi OS -general "playing" and/or RetroPi
RPI0W#1 - MotionEyeOS - yard surveillance
RPI0W#2 - Driveway gate monitor - coming soon
RPI0W#3 - ?????

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

Re: Trying to mount network drive not working

Sat Mar 14, 2020 3:19 am

error 112 means "host is down"?

can you verify with your router's setting that the drive is shared and online?

also if you are using the desktop version... can you try accessing the shared drive using
pcManFM's Go--->Network method?
"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!"

Dragontail281
Posts: 47
Joined: Thu Mar 07, 2019 8:56 pm

Re: Trying to mount network drive not working

Sat Mar 14, 2020 3:29 am

Router/drive working.
I have no problem accessing it from my Win 10 machine in the office.
Actually transferred some roms earlier to a UBS stick for my retro pie build.
Also, as I said in my original post, I can mount it with the Go—>Network method, I just want it to be mounted when I turn it on instead of having to do the extra steps.
RPI3B+ - Raspberry Pi OS -general "playing" and/or RetroPi
RPI0W#1 - MotionEyeOS - yard surveillance
RPI0W#2 - Driveway gate monitor - coming soon
RPI0W#3 - ?????

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

Re: Trying to mount network drive not working

Sat Mar 14, 2020 4:39 am

well.... it so happens that my router has a USB 2.0 port and has a NAS function as well
and plugged a FAT32 formatted USB drive to it and shared it.

and I was able to have (another SBC running debian) automatically mount it on boot.

if I were to translate my fstab to your version it becomes something like:

Code: Select all

//192.168.1.1/USB_Storage	/mnt/share/readyshare 	cifs 	credentials=/root/.netpass,uid=pi,gid=pi,nofail,vers=1.0,x-systemd.automount	0 0
notice anything different?
"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!"

User avatar
thagrol
Posts: 4258
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Trying to mount network drive not working

Sat Mar 14, 2020 12:00 pm

Since we're comparing notes on mounting shares from routers, here's what I use to mount mine (the router is an ISP supplied one - Plusnet branded).

Code: Select all

//pnhub1/USB1   /media/pnhub1/usb1      cifs    defaults,_netdev,nofail,guest,file_mode=0777,dir_mode=0777,vers=1.0     0       0
_netdev,nofail: as mentioned previously
guest: the router doesn't require a password so don't ask for one.
file_mode=0777: force permissions on files to allow full access to all local users.
dir_mode=0777: force permissions on directories to allow full access to all local users.
vers=1.0: that seems to be all my router supports

I'm not providing an explict user name, instead letting it use the default one. I don't believe my router has the ability to specify users for the NAS function anyway. I've also opted to force open permissions rather than set a local username as thats easier with multiple users though obviously less secure.

@Dragontail281: I don't have the same router you do so can't offer suggestions on that end of things. At this point all I can really suggest is that you find out what mount options are being used with the "Go—>Network method" and apply those to your fstab. Can't help directly with that either as I don't use it (or even have it installed). Running "mount" with no arguments will return a list of all mounted devices including the mount options used for each of them.
Arguing with strangers on the internet since 1993.

All advice given is based on my experience. it worked for me, it may not work for you.
All GPIO pin numbers are BCM numbers.

Dragontail281
Posts: 47
Joined: Thu Mar 07, 2019 8:56 pm

Re: Trying to mount network drive not working

Sat Mar 14, 2020 4:26 pm

Thanks for all the suggestions guys.
I’ll try them when I get another chance.
RPI3B+ - Raspberry Pi OS -general "playing" and/or RetroPi
RPI0W#1 - MotionEyeOS - yard surveillance
RPI0W#2 - Driveway gate monitor - coming soon
RPI0W#3 - ?????

blue_t-shirt
Posts: 2
Joined: Mon Jul 13, 2020 4:25 pm

Re: Trying to mount network drive not working - solved

Mon Jul 13, 2020 4:45 pm

Hi,

I've just been around in circles for the last few hours trying to sort this. I have 4 Raspberry Pis (...yes I know!) and an iMac. I use VNC to log into them from the iMac. I wanted to be able to easily move data from one Pi to another so put a USB memory stick into my Netgear router which supports Readyshare. After trying lots of fstab options, none of them worked. So I took another route, which is really obvious:

Go into Finder on the iMac, hit command k and connect to the router very easily, it's pretty obvious what to do
Go into the router and enable FTP on port 21 - no password (as I only need to do this within my home)
Go into the Pi and open File Manger then Go > Connect to server then select type = FTP, select "Login as:" and enter your router's username, click "OK", you will be prompted for your password

Enjoy.

Dragontail281
Posts: 47
Joined: Thu Mar 07, 2019 8:56 pm

Re: Trying to mount network drive not working - solved

Mon Jul 13, 2020 6:06 pm

blue_t-shirt wrote:
Mon Jul 13, 2020 4:45 pm
Hi,

I've just been around in circles for the last few hours trying to sort this. I have 4 Raspberry Pis (...yes I know!) and an iMac. I use VNC to log into them from the iMac. I wanted to be able to easily move data from one Pi to another so put a USB memory stick into my Netgear router which supports Readyshare. After trying lots of fstab options, none of them worked. So I took another route, which is really obvious:

Go into Finder on the iMac, hit command k and connect to the router very easily, it's pretty obvious what to do
Go into the router and enable FTP on port 21 - no password (as I only need to do this within my home)
Go into the Pi and open File Manger then Go > Connect to server then select type = FTP, select "Login as:" and enter your router's username, click "OK", you will be prompted for your password

Enjoy.
i haven't messed with this in a while.
I can mount the drive using the File Manager-> Go route, but what I was having problems with was permanently mounting it, so that when I reboot I don't have to "re-mount" it.
Thanks for the suggestions though.
One of these days I will try again, just not as important as other things right now as I'm not using it for anything that I have to access that drive for.
RPI3B+ - Raspberry Pi OS -general "playing" and/or RetroPi
RPI0W#1 - MotionEyeOS - yard surveillance
RPI0W#2 - Driveway gate monitor - coming soon
RPI0W#3 - ?????

blue_t-shirt
Posts: 2
Joined: Mon Jul 13, 2020 4:25 pm

Re: Trying to mount network drive not working

Mon Jul 13, 2020 7:00 pm

Ah, I just rebooted as a test, yes, I needed to login again, so you have a fair point, but it's still a small step forwards.

Return to “Beginners”