Share files on 2 vero+'s

It behave similar but not identical.
Autofs seems more robust for times were the server disappear and reappear.

The systemd team seem to ignore issues that have long been handled by the previous solutions for many different areas.
Read they treat the last 2 fstab fields as true/false, ignoring the 0, 1, 2 specific settings for specific purposes.

Have now had some time available to do this.
If I go to System/media/library I now have BEDROOM-MOVIES and BEDROOM-TV but they show files on the vero128Gb (DAVESOSMC) vero not the bedroom one. Same if I go into auto mounted drives just the Vero128Gb one there. There is also BEDROOMOSMC Folder there which has the 128Gb drive there but if I select this I get file exists message.

Lets take a step back and just clarify exactly what you are doing so you should be able to troubleshoot this with a bit more ease.

Running a shared MySQL database without dealing with path substitution requires all machines to point to the same place. If you add for example “Zone Troopers” to your library on the first machine, and the path to that file is /media/Vero128Gb/movies/Zone Troopers (1985).mkv then the second computer has to be able to go to the exact same file path and find that same file.

On the first machine this is already taken care of as /media/Vero128Gb/is being auto generated as that is where the system is mounting the SD card. We don’t need anything else done here other than to be running the SMB Server.

On the second machine we need to add a mount so when you go to /media/Vero128Gb/ it pulls up that folder on the first machine. You were given instructions for this earlier in this thread. At this point you should be able to go to /media/Vero128Gb/ on either machine and see the exact same thing.

Once you have gotten the above out of the way you then add sources in Kodi pointing to /media/Vero128Gb/movies/ and /media/Vero128Gb/TV/ setup your scrapers and scan. You are required to do this setup only on one machine if you wish to only update your library from one machine. If you add the sources to the second machine it will allow updating the library from that machine as well.

Darwindesign, thanks for your help, but although I may have been given instructions about adding a mount, I seem unable to follow them, and as I’m now extremely confused I will give this a rest and transfer files using a memory stick and maybe try again later.

I understand that, and that is why I posted what I did. It seemed to me from just skimming over this thread that you may not have fully understood the what and why of everything you were doing which would make figuring out where something went wrong very challenging. I think if you went back over everything step by step with an understanding of what exactly your trying to accomplish at each step you could get it sorted.

Also realise there is already quite a bit of information to be found by searching this forum. Two of particular interest to you are probably…

I have done a backup then restored a previous backup from before I started trying to change all this. I did this because the system was extremely slow i think when reading the memory cards, to the point where it seemed to be locked up.
This has put the system back working. I have also renamed the memory cards as Lounge and Bedroom so as to avoid confusion and also if I ever get the sharing working I can put a bigger sd card in with the same name.
I have gone through the system files I changed to reflect the new names.
I have the following files in the shares files on both machines

/mnt/DAVESOSMC/Lounge -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://

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

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

When I go to system/Media/Videos Both machines had Bedroom-MOVIES and Bedroom-TV but which if I went into edit source pointed to /media/lounge/movies and /media/lounge/tv

Is there anything I missed or did wrong as still can’t add sources and its not auto mounting other Vero’s which I think it should.

While we normally recommend that you put the mounts in /mnt when using autofs, in your case you want the mounts to be in /media, since that’s where the USB mounts are. That way it’s in the same place in the filesystem on both Vero’s. The ultimate goal is to have /media/Lounge and /media/Bedroom to be exactly the same on both systems. So the bedroom autofs entry should be:

/media/Lounge/ -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://<IP of Lounge>/Lounge/

and the Lounge would be:

/media/Bedroom/ -fstype=cifs,rw,credentials=/home/osmc/.smbcredentials,iocharset=utf8,uid=osmc,gid=osmc ://>IP of Bedroom>/Bedroom/

I assume thats in the shares folder, in that case would they be the only entry in that file, i.e. I should delete the previous ones?
If so still can’t share the files.

Also on the DAVESOSMC vero in system/Media/Videos in auto mounted drives I now have a folder Bedroom but it won’t open or show content.
On the bedroom machine same location just the bedroom folder which does open

Your SD card gets mounted by the system to /media/[label] and Kodi will automatically add all folders found in /media to the “Videos” section of Kodi. You only need to add mounts for the remote machine. So…

Bedroom Vero
/media/bedroom (this is automatic)
/media/lounge (this you need to make the system mount for)

Lounge Vero
/media/lounge (this is automatic)
/media/bedroom (this you need to make the system mount for)

To test I would use the file manager in settings or just navigate in the terminal. Don’t start messing with the Kodi paths until after you have verified that all four paths are working and showing up where they should.

If you try to mount to a folder that already has something mounted to it then things will likely not work as you want.

Just to make sure I’m putting the files in
sudo nano /etc/auto.smb.shares

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

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

if so not showing up with file manager

In file manager did you add the source? In file manager you click on “add source” then browse>root file system>media (you should be able to see them but don’t click on them) then click “OK” and then “OK”. You will now have the media folder in file manager that you can easily access and play thing from if you wish. Note that this is completely separate from sources and everything else in Kodi. Be aware that everything in Linux is case sensitive.

Thanks, got the source added, but when I click on it it says path not found or invalid, and the reported free space is wrong this is on both veros.

just to clarify, when you go to the file manager on the bedroom Vero the /media folder shows two folders, “Bedroom” and “Lounge” and you can access the former and get an error on the latter? Ditto on the lounge Vero but vice versa? Try using these in their respective places…

/media/Lounge -fstype=cifs,rw,username=osmc,password=osmc,iocharset=utf8,uid=osmc,gid=osmc ://

/media/Bedroom -fstype=cifs,rw,username=osmc,password=osmc,iocharset=utf8,uid=osmc,gid=osmc ://

If that doesn’t work after the changes and rebooting both machines then post the output of…

sudo systemctl stop autofs
sudo automount -f -v -d

Excellent, Both machines play and delete files ok.
Thank you Darwindesign and (everybody else) for your patience.
Would never have managed it without your guidance.
Just one last question does backup save these changes to the system files or do I need to back them up separately

The backup utility in the My OSMC add-on only backs up Kodi userdata. If you were to have to redo your system from scratch in the future you would need to setup the SMB server, MySQL, and autoFS again. If you think it would be an issue I would probably recommend just making a how-to file for yourself with your information in it.

Are you sorted with the MySQL part of your setup? Did you manage to make an advancedsettings.xml file (on both machines) that is pointing to the machine you installed it on?

Just a note in response to an earlier comment about maybe getting a larger SD card in the future. I would strongly suggest that if you are needing more room in the future a better option would be to get large external hard drive with its own power supply.

I have a spare 750gb hd already, but not sure about if it will permanently stay on. Don’t keep most things once I watch them anyway but will give it a try.

Re mysql I did enable it on both machines, with the lounge ip address on both and I did make a advancesettings.xml on the lounge vero but couldn’t remember how I did it when I tried on the bedroom one. Will have another go tomorrow. Is this something that is needed now ?

It depends on what you want to do. If your not going to have a library at all (ie you only play stuff from Videos or the file manager) then there is no reason to use MySQL. If you wanted to have separate libraries (ie you are pulling from the same set of files but they have to be updated separately with no shared watched status) then you don’t need MySQL. If you however wanted to have a single library with the same content and watched status on both, then MySQL has to be setup.

It is also not necessarily an either/or situation. I personally use a library for the bulk of my content but I do have some things that I only plan on watching once and then deleting. I keep a seperate folder in Videos for this content that does not get scraped.

If you setup the MySQL in My OSMC then you shouldn’t have to mess with an advancedsettings.xml file for that. I have been doing it the manual way for so long I keep forgetting that option is there.