Writing to a remote directory (Fedora31)

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
tfmeier
Posts: 16
Joined: Sun May 02, 2021 1:48 pm

Writing to a remote directory (Fedora31)

Post by tfmeier »

I'm planning to run Frigate on a Pine A64 running DietPI 7.1.2 and this app writes images and clips to a storage location. As I only have an SD card on the Pine64 I would like write to a Fedora31 server sitting on the same network but this requires to make the remote directory available and I'm not sure how to do that.

Two questions:
  • What do I need to do to be able to access the remote directory from my Pine64
  • Do I need any tools other than what's available by default on DietPI or Fedora?
User avatar
Joulinar
Posts: 4504
Joined: Sat Nov 16, 2019 12:49 am

Re: Writing to a remote directory (Fedora31)

Post by Joulinar »

Basically you have 2 options. You could setup a Samba or a NFS server on your Fedora31 system. On DietPi simply use drive manager to mount the share you have created.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
tfmeier
Posts: 16
Joined: Sun May 02, 2021 1:48 pm

Re: Writing to a remote directory (Fedora31)

Post by tfmeier »

Tried NFS and got an error.

Basically I'm running a surveillance camera system on DietPI that produces images and short clips of events. Given I only have a small SD card on the Pine64 I'm running DietPI on I want to setup an NFS share so that I can copy files from a directory I want to mount a Linux server directory on the DietPI and directly write to that remote directory. Question: Are any images/clips stored on the DietPI and "mirrored" to the server via NFS or are the files directly written to the remote location; i.e. NFS server?

I though I should be able to do this via NFS, right? I have setup the NFS server on the Linux server and want to setup the NFS client on DietPI via DietPI-Drive_Manager but get an error message. Note: 192.168.2.99 is the NFS server, 192.168.2.97 is the NFS client

Code: Select all

 [FAILED] NFS mount failed with the following error output:
│
│ mount.nfs: mount(2): Connection refused
│ mount.nfs: portmap query retrying: RPC: Unable to receive
│ mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused
│ mount.nfs: mount(2): Connection refused
│ mount.nfs: portmap query retrying: RPC: Unable to receive
│ mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused
│ mount.nfs: mount(2): Connection refused
│ mount.nfs: portmap query retrying: RPC: Unable to receive
│ mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused
│ mount.nfs: mount(2): Connection refused
│ mount.nfs: portmap query retrying: RPC: Unable to receive
│ mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused
│ mount.nfs: mount(2): Connection refused
│ mount.nfs: portmap query retrying: RPC: Unable to receive
│ mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused
│ mount.nfs: mount(2): Connection refused
│ mount.nfs: portmap query retrying: RPC: Unable to receive
│ mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused
│ mount.nfs: mount(2): Connection refused
│ mount.nfs: portmap query retrying: RPC: Unable to receive
│ mount.nfs: portmap query failed: RPC: Unable to receive - Connection refused
│ mount.nfs: mount(2): Connection refused
│ mount.nfs: portmap query retrying: RPC: Unable to receive
│ mount.nfs: portmap query failed: RPC: Unable to receive - Success
│ mount.nfs: mount to NFS server '192.168.2.99:/' failed: RPC Error: Unable to
│ receive
│ mount.nfs: timeout set for Fri May  7 14:26:33 2021
│ mount.nfs: trying text-based options
│ 'port=2049,vers=4.2,addr=192.168.2.99,clientaddr=192.168.2.97'
│ mount.nfs: trying text-based options 'port=2049,addr=192.168.2.99'
│ mount.nfs: prog 100003, trying vers=3, prot=6
│ mount.nfs: prog 100003, trying vers=3, prot=17
│ mount.nfs: trying text-based options
│ 'port=2049,vers=4.2,addr=192.168.2.99,clientaddr=192.168.2.97'
│ mount.nfs: trying text-based options 'port=2049,addr=192.168.2.99'
│ mount.nfs: prog 100003, trying vers=3, prot=6

Any idea how to resolve this error?
User avatar
Joulinar
Posts: 4504
Joined: Sat Nov 16, 2019 12:49 am

Re: Writing to a remote directory (Fedora31)

Post by Joulinar »

Did you configure the NFS share to be exported on the server side?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
tfmeier
Posts: 16
Joined: Sun May 02, 2021 1:48 pm

Re: Writing to a remote directory (Fedora31)

Post by tfmeier »

If you mean updating /etc/exports then yes, I have done that
User avatar
Joulinar
Posts: 4504
Joined: Sat Nov 16, 2019 12:49 am

Re: Writing to a remote directory (Fedora31)

Post by Joulinar »

ok let's check the available mounts on the Fedora31 server

Code: Select all

showmount -e 192.168.2.99
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
tfmeier
Posts: 16
Joined: Sun May 02, 2021 1:48 pm

Re: Writing to a remote directory (Fedora31)

Post by tfmeier »

This is what I get

Code: Select all

root@DietPi:~#
root@DietPi:~# showmount -e 192.168.2.99
clnt_create: RPC: Unable to receive
root@DietPi:~#
User avatar
Joulinar
Posts: 4504
Joined: Sat Nov 16, 2019 12:49 am

Re: Writing to a remote directory (Fedora31)

Post by Joulinar »

just to be sure 192.168.2.99 is the IP of your Fedora31 server? because it did not seems to populate a NFS share.

You could use rpcinfo -p <Fedora31_IP> to check if the NFS server is reachable from DietPi side. Basically both commands should looks like this.

Code: Select all

root@DietPi3:~# showmount -e 192.168.0.10
Export list for 192.168.0.10:
/volume1/NFS 192.168.0.0/24
root@DietPi3:~#

Code: Select all

root@DietPi3:~# rpcinfo -p 192.168.0.10
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100005    1   udp    892  mountd
    100005    1   tcp    892  mountd
    100005    2   udp    892  mountd
    100005    2   tcp    892  mountd
    100005    3   udp    892  mountd
    100005    3   tcp    892  mountd
    100024    1   udp    662  status
    100024    1   tcp    662  status
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100021    1   udp   4045  nlockmgr
    100021    3   udp   4045  nlockmgr
    100021    4   udp   4045  nlockmgr
    100021    1   tcp   4045  nlockmgr
    100021    3   tcp   4045  nlockmgr
    100021    4   tcp   4045  nlockmgr
root@DietPi3:~#
On my example 192.168.0.10 is the NFS server. If both commands did not return anything, you would need to check on NFS server side what's wrong.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply