calhan
Posts: 5
Joined: Mon Oct 28, 2019 9:55 am

Mounting router USB-drive on pi 4

Mon Oct 28, 2019 10:35 am

Hello,

For about two years ago I decided to try PI 3 and use it for LAN mediastreaming purposes. I attached a WD USB drive on ASUS AC87U router and browsed the internet for instructions how to marry the PI to the router USB drive. I remember it took me many days as an amateur to figure out how to do this but I was successful after many failed attempts. I don´t have access to the PI 3 anymore but I think I remember what I finally put in fstab:

Code: Select all

//192.168.2.1/sda1 /mnt/Share cifs iocharset=utf8,username=username,password=password,vers=1.0 0 0
I´m looking for a proper guide which can help me understand how to mount a WD USB drive (WD Elements 25A1) attached to a ASUS GT-AX11000 router on a PI 4/Raspbian? The kind of guide I´m looking for is one who describes as many steps as possible. Starting from which packages must be installed and what files to be edited before finally editing the fstab (if that is still an option) and try the configuration out with

Code: Select all

sudo mount -a
.

So primary question. Is there is a proper guide out there which is hard to find but maybe someone here knows about?

If not, maybe someone here might be interested in helping out in this thread?

Thanks in advance.

/C

drgeoff
Posts: 9917
Joined: Wed Jan 25, 2012 6:39 pm

Re: Mounting router USB-drive on pi 4

Mon Oct 28, 2019 3:11 pm

Why do you want to do that instead of plugging the USB drive into the RPi?

Kendek
Posts: 128
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: Mounting router USB-drive on pi 4

Mon Oct 28, 2019 3:16 pm

If this really necessary and you using Asuswrt-Merlin firmware on your router, the NFS share is better than Samba:

Code: Select all

192.168.2.1:/tmp/mnt/<sda1>   /mnt/Share   nfs4   noatime,fsc   0   0
Otherwise, if you want the best performance, consider FTP:

Code: Select all

sudo apt install curlftpfs

Code: Select all

curlftpfs#anonymous:anonymous@192.168.2.1/<sda1>   /mnt/Share   fuse   noatime,allow_other   0   0

ejolson
Posts: 3820
Joined: Tue Mar 18, 2014 11:47 am

Re: Mounting router USB-drive on pi 4

Mon Oct 28, 2019 4:39 pm

calhan wrote:
Mon Oct 28, 2019 10:35 am
Hello,

For about two years ago I decided to try PI 3 and use it for LAN mediastreaming purposes. I attached a WD USB drive on ASUS AC87U router and browsed the internet for instructions how to marry the PI to the router USB drive. I remember it took me many days as an amateur to figure out how to do this but I was successful after many failed attempts. I don´t have access to the PI 3 anymore but I think I remember what I finally put in fstab:

Code: Select all

//192.168.2.1/sda1 /mnt/Share cifs iocharset=utf8,username=username,password=password,vers=1.0 0 0
I´m looking for a proper guide which can help me understand how to mount a WD USB drive (WD Elements 25A1) attached to a ASUS GT-AX11000 router on a PI 4/Raspbian? The kind of guide I´m looking for is one who describes as many steps as possible. Starting from which packages must be installed and what files to be edited before finally editing the fstab (if that is still an option) and try the configuration out with

Code: Select all

sudo mount -a
.

So primary question. Is there is a proper guide out there which is hard to find but maybe someone here knows about?

If not, maybe someone here might be interested in helping out in this thread?

Thanks in advance.

/C
The fstab line is the most difficult part of setting this up. You might want to add the option nofail to the others, so the Pi can finish booting even if the network drive is unavailable. Other than that, things should work the same as they always have.

calhan
Posts: 5
Joined: Mon Oct 28, 2019 9:55 am

Re: Mounting router USB-drive on pi 4

Mon Oct 28, 2019 8:20 pm

drgeoff wrote:
Mon Oct 28, 2019 3:11 pm
Why do you want to do that instead of plugging the USB drive into the RPi?
Unfortunately plugging the USB drive into the PI is not an option for me. There is a logical reason for this.

calhan
Posts: 5
Joined: Mon Oct 28, 2019 9:55 am

Re: Mounting router USB-drive on pi 4

Mon Oct 28, 2019 8:33 pm

Kendek wrote:
Mon Oct 28, 2019 3:16 pm
If this really necessary and you using Asuswrt-Merlin firmware on your router, the NFS share is better than Samba:

Code: Select all

192.168.2.1:/tmp/mnt/<sda1>   /mnt/Share   nfs4   noatime,fsc   0   0
Otherwise, if you want the best performance, consider FTP:

Code: Select all

sudo apt install curlftpfs

Code: Select all

curlftpfs#anonymous:anonymous@192.168.2.1/<sda1>   /mnt/Share   fuse   noatime,allow_other   0   0
Thank you for trying to help.

Asuswrt-Merlin doesn´t support ASUS GT-AX11000 routers from what I´ve read. So no, I´m not using that firmware. I put your code in fstab and when executing "sudo mount -a" nothing happened. The terminal kind of paused, had to ctrl-c it. Does this mean I can´t use NFS share?

The FTP option might be a good idea but just up to a certain point. I also wish to direct transmission downloads to the router USB drive.
Last edited by calhan on Mon Oct 28, 2019 8:42 pm, edited 1 time in total.

calhan
Posts: 5
Joined: Mon Oct 28, 2019 9:55 am

Re: Mounting router USB-drive on pi 4

Mon Oct 28, 2019 8:41 pm

ejolson wrote:
Mon Oct 28, 2019 4:39 pm
calhan wrote:
Mon Oct 28, 2019 10:35 am
Hello,

For about two years ago I decided to try PI 3 and use it for LAN mediastreaming purposes. I attached a WD USB drive on ASUS AC87U router and browsed the internet for instructions how to marry the PI to the router USB drive. I remember it took me many days as an amateur to figure out how to do this but I was successful after many failed attempts. I don´t have access to the PI 3 anymore but I think I remember what I finally put in fstab:

Code: Select all

//192.168.2.1/sda1 /mnt/Share cifs iocharset=utf8,username=username,password=password,vers=1.0 0 0
I´m looking for a proper guide which can help me understand how to mount a WD USB drive (WD Elements 25A1) attached to a ASUS GT-AX11000 router on a PI 4/Raspbian? The kind of guide I´m looking for is one who describes as many steps as possible. Starting from which packages must be installed and what files to be edited before finally editing the fstab (if that is still an option) and try the configuration out with

Code: Select all

sudo mount -a
.

So primary question. Is there is a proper guide out there which is hard to find but maybe someone here knows about?

If not, maybe someone here might be interested in helping out in this thread?

Thanks in advance.

/C
The fstab line is the most difficult part of setting this up. You might want to add the option nofail to the others, so the Pi can finish booting even if the network drive is unavailable. Other than that, things should work the same as they always have.
Thank you for the advice.

I´ve been trying to make things work with cifs but I´m stuck. Maybe you can tell where the problem lies.

fstab code:

proc /proc proc defaults 0 0
/dev/mmcblk0p6 /boot vfat defaults 0 2
/dev/mmcblk0p7 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
//192.168.2.1/sda1 /mnt/Share cifs nofail,vers=3.0,username=username,password=password 0 0


Then I try to mount with "sudo mount -a" and get this error message:

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


Any suggestions?

calhan
Posts: 5
Joined: Mon Oct 28, 2019 9:55 am

Re: Mounting router USB-drive on pi 4

Mon Oct 28, 2019 9:22 pm

[/quote]The fstab line is the most difficult part of setting this up. You might want to add the option nofail to the others, so the Pi can finish booting even if the network drive is unavailable. Other than that, things should work the same as they always have.
[/quote]

Thank you for the advice.

I´ve been trying to make things work with cifs but I´m stuck. Maybe you can tell where the problem lies.

fstab code:

proc /proc proc defaults 0 0
/dev/mmcblk0p6 /boot vfat defaults 0 2
/dev/mmcblk0p7 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
//192.168.2.1/sda1 /mnt/Share cifs nofail,vers=3.0,username=username,password=password 0 0


Then I try to mount with "sudo mount -a" and get this error message:

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


Any suggestions?
[/quote]

I figured out that the mount point "/sda1" was the problem. So I pointed to a folder instead and it worked. Curious though. With the PI 3 it worked fine pointing to the root. Is there a way to point to the root or do I have to point to specific folders?

ejolson
Posts: 3820
Joined: Tue Mar 18, 2014 11:47 am

Re: Mounting router USB-drive on pi 4

Tue Oct 29, 2019 2:33 am

calhan wrote:
Mon Oct 28, 2019 9:22 pm
I figured out that the mount point "/sda1" was the problem. So I pointed to a folder instead and it worked. Curious though. With the PI 3 it worked fine pointing to the root. Is there a way to point to the root or do I have to point to specific folders?
Congratulations! I'm glad you got it working. Whether you can access the share as sda1 or something else depends on how the server--in this case your router--was set up. As a work around, you could create a folder named sda1; however, something more meaningful is likely a better choice.

Return to “General discussion”