Share files on 2 vero+'s

Well I wouldn’t call it a preferred way but the most robust way would be to enable Samba Server (if you don’t want to spent time to setup NFS server) on both Vero’s and then install MySQL server on one of them and configure both to use the MySQL server.
But one question why would you have files on both of them? Why not have all your files on storage connected to one of them?

1 Like

I would have them on one, but thought there may be times I would need to transfer files the other way round, but if it complicates things then not required. I would like to set the download folder on both to the shared folder, so they are all in the same location.

Then just install Samba Server and MySQL Server on one of them. And then point both of them to use the MySQL server and Samba server for the library/sources

Thanks fzinken, but I’m obviously doing something wrong, I have enabled mysql and samba servers but when I go to the library/sources i can see the davesosmc vero and usb card (which i have as the master) but if i click on them it comes up with error file exists.
Just one question on the mysql setup is the IP address, the address of the machine I am setting it on or the one I want to connect to? I have it set to the one I’m on.

Use the IP of the machine you installed the MySQL server on.

For the most reliable system I suggest to use autofs.

Also if using the shared database approach you would need to align the paths between both systems.
When using autofs approach the fastes way is to use path substitution.
https://kodi.wiki/view/Path_substitution

Thanks fzinken,
Have done that but 2 things
1, on auto.master if I have a card “Vero128Gb” in server 1 which is DAVESOSMC I assume that would be DAVESOSMC/Vero128Gb and the ip address would be 192.168.0.9/Vero128Gb/.
2 . I don’t understand how to do the path substitution part.
Must need it as if I test it it i get the following message
ls: cannot open directory ‘/mnt/DAVESOSMC/Vero128Gb’: No such file or directory

Suggest to first do some checks. On the machine that is the client:
Install smbclient

sudo apt install smbclient

and then share the output of

smbclient -L 192.168.0.9 -U osmc

Assuming that 192.168.0.9 is the Vero you installed the server on.

Actually if you mount to the same folder on the client than you can skip path substitution

done that and this is what I got.

Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.16-Debian]

Sharename       Type      Comment
---------       ----      -------
osmc            Disk      OSMC Home Directory
IPC$            IPC       IPC Service (Samba 4.5.16-Debian)
Vero128Gb       Disk      Auto-mount Volume

Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.16-Debian]

Server               Comment
---------            -------
DAVESOSMC            Samba 4.5.16-Debian
FVP-4000T:11         Samba Server

Workgroup            Master
---------            -------
WORKGROUP            FVP-4000T:11

Does that look OK? can’t check just now on vero as my wife has commandeered tv.

Ok so the share is called “Vero128Gb” as expected.

So to avoid the need for path substitution I would suggest this autofs line

/media/Vero128Gb/ -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.0.9/Vero128Gb/

With this the files should be available under same directory on each Vero and you just can use same database/sources settings on both.

BTW, did you reserved the IP 192.168.0.9 for the Vero in your DHCP server (normally your router) so that you ensure the IP doesn’t change?

Its that auto.fs in the auto.master or auto.shares file?

In the auto.shares

Now after a extremely long pause I get
ls: cannot open directory ‘/mnt/DAVESOSMC/Vero128Gb’: No such file or directory

my file looks like this
/mnt/DAVESOSMC/Vero128Gb -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.0.9/Vero128Gb/

/mnt/BEDROOMOSMC/128Gb -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.0.17/128Gb/

/media/Vero128Gb/ -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.0.9/Vero128Gb/

but on 3 lines without the gaps.

Also on vero file manager takes a couple of minutes to open and won’t display anything in left hand window.
Have rem the last line and file manager back working.

Ok, you first need to decide if you want to go down the path substitution path or you would like to avoid that.

Secondly you now seems to have 2 server defined not one? Can you give an overview of all you clients servers you plan to have?

Also (especially if you have more than one system ensure that you fixed/reserved the IP addresses.

Re path substitution will go with whatever is recommended as I don’t know enough about it.
I didn’t realise I had 2 servers as I just followed the instructions on setting up autofs, but now I see that it was for setting up 2 servers. While it would be nice to read/write or delete stuff I watched on the memory card on vero 1 from both vero’s, I can live without it, if it makes it more complicated.
Re fixed ip my virgin media doesn’t have a setting to do that. On my other devices i have manually set the addresses and did the same on the vero’s. They have kept the same addresses when i tested them by pulling the power connector.

Ok let’s start from back to front. Never do that, always shutdown or reboot properly.

Ok that means you use fixed IPs which is OK unless they overlap with the DHCP range.

Well let’s do one by one.
I suggest you start with just the last line (that I provided) in your autofs for the initial test.

Let’s first start without not to make it more complicated

Thanks fzinken I’ll consider myself told off…
Right done that got the following message
osmc@Davesosmc : ~ $ ls -lah /mnt/DAVESOSMC/Vero128Gb

total 8.0K

dr-xr-xr-x 2 root root 4.0K Dec 8 12:41 .

dr-xr-xr-x 3 root root 4.0K Dec 8 12:41

Rebooted both vero’s and when I use file manager to look at BEDROOMOSMC/Vero128 directory I get message can’t connect to network server. Happens other way round from BEDROOMOSMC to DAVESOSMC as well

If you now have only left one line left as suggested and that line is

/media/Vero128Gb/ -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://192.168.0.9/Vero128Gb/

Then for testing do ls -lah /media/Vero128Gb/

How does this look?
osmc@Davesosmc : ~ $ ls -lah /media/Vero128Gb/

total 1.1M

drwxrwxrwx 1 osmc osmc 128K Jan 1 1970 .

drwxr-xr-x 3 root root 4.0K Dec 9 15:51

drwxrwxrwx 1 osmc osmc 128K Sep 3 18:40 Backup

drwxrwxrwx 1 osmc osmc 128K Dec 9 09:39 Movies

drwxrwxrwx 1 osmc osmc 128K Nov 10 15:37 Music

drwxrwxrwx 1 osmc osmc 128K May 16 2019 Photos

drwxrwxrwx 1 osmc osmc 128K Dec 9 12:37 Shows

drwxrwxrwx 1 osmc osmc 128K Dec 26 2018 System Volume Information

-rw-rw-rw- 1 osmc osmc 16 Apr 26 2019 .vbt5