XBMC Community Forum
2 XBMC PCs and 1 Database on the shared NAS - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+---- Forum: Windows support (/forumdisplay.php?fid=59)
+---- Thread: 2 XBMC PCs and 1 Database on the shared NAS (/showthread.php?tid=70603)



- markus101 - 2010-12-22 07:07

You would need to the the exact same thing, advancedsettings.xml for the library and symlink for the thumbnails. Since there is a bug with windows paths and MySQL with XBMC I assume you are connecting to your shares with smb://server/share which shouldn't have an issue with the Live version either. (I still need to convert over to smb:// from mapped network drives so I can get mysql working.

-Markus


- myrison - 2010-12-22 16:46

markus101 Wrote:You would need to the the exact same thing, advancedsettings.xml for the library and symlink for the thumbnails. Since there is a bug with windows paths and MySQL with XBMC I assume you are connecting to your shares with smb://server/share which shouldn't have an issue with the Live version either. (I still need to convert over to smb:// from mapped network drives so I can get mysql working.

-Markus

This is exactly what I do and it works fine. From my experience, your paths to your video content needs to be the same on all machines needs (i.e. use the same 'source' list and map them the same way "SMB://server/share/" on every machine so that the stored path list in MySQL and the hashes for the thumbnails work on every machine in your house. If you set it up this way, you can share libraries between Windows & Linux machines without issue. I have one Windows 7 machine and two XBMC-live Revos all sharing the same library that is running on a Windows 2008 Server. It's a beautiful thing that all of those operating systems can get along so well. Smile


- zosky - 2010-12-28 10:18

im using 2 ubuntu boxes, one stand-alone (xbmc-live) & the other is my kde desktop, both with xbmc 10 svn35648. the mySQL db runs on a 3rd ubuntu box which is mounted -on both- via NFS as /mnt/homeNAS (no SMB). cron kicks off 1 bash script @hourly to keep thumbnail cache rsync'ed. anotther script runs @monthly to back-up the mySQL.db...
Code:
#!/bin/bash
## xbmc lib backup & auto-remove if 3month old
mysqldump --skip-lock-tables -q -e -u${mysqluser} -p${mysqlpass} ${mysqldb} | gzip - > ${loc}/$(date +%y%m%d)_db.sql.gz
find ${loc} -name "*gz" -type f -mtime +70 -delete  ## remote 70days+ old
( ps: a third script runs @monthly which queries the library for movies without a trailer URL & searches dtrailer.com Nerd ... converting this to work with mySQL from myVideo34.db was annoying for a noob like me Rolleyes )


this new feature rocks!!! if there's a better way to do this stuff please let me know.


- ti_gusus - 2011-01-10 02:43

Is anyone could explain how to create Symbolic link (shortcut) from LiveCD install to my Network Thumbnails folderConfused
Thank for your help


- zosky - 2011-01-10 03:58

ti_gusus Wrote:Is anyone could explain how to create Symbolic link (shortcut) from LiveCD install to my Network Thumbnails folderConfused
Thank for your help

it should be as simple as droping to a console (cntrl+f1/f2.../f6) then moving your current cache & linking the Network forlder in its place...
Code:
mv ~/.xbmc/userdata/Thumbnails ~/.xbmc/userdata/Thumbnails.BACKUP
ln -s [/path/to/server/cache/] ~/.xbmc/userdata/Thumbnails

EDIT: you can then return to XBMC with cntrl+f7

this way if anything goes wrong you can undo easily (rm ~/.xbmc/userdata/Thumbnails && mv ~/.xbmc/userdata/Thumbnails.BACKUP ~/.xbmc/userdata/Thumbnails)

i through about doing this too, but i'm worried about seek time & how it would impact the UI when scrolling through large lists (~1k movies)... thats why i've kept the cache local to each box & setup cron to rSync @hourly (per my last post).

when you get this working, would you please let me know if there's any merit to my concerns

cheers
~z


- ti_gusus - 2011-01-10 04:20

Do I need to mount my network share ?
or just

ln -s //192.168.1.108/public/video/Thumbnails home/htpc/.xbmc/userdata/Thumbnails

By doing this, the Thumbnails folder is created but do not acess the remote location...
Any other tricks for this Confused


- zosky - 2011-01-10 04:45

//server-ip/path/ only works in win... so yeah that wont work here... you've create a sim-link that goes nowhere.

you do need to mount it via fstab or (slightly more complex but more robust) autoFS which will handle reconnecting to the server as needed


- ti_gusus - 2011-01-10 05:05

Could you please provide line by line command. I'm new with linux.
Thank for your help...


- darkscout - 2011-01-10 05:16

You need to either use autofs and /net/server/path/

OR just use mount.* and mount it to the directory to the thumbnails drive.


- zosky - 2011-01-10 06:12

ti_gusus Wrote:Could you please provide line by line command. I'm new with linux.
Thank for your help...

  1. backUP (move) the cache folder as noted previously
  2. make a new mount point ... sudo mkdir /media/samba
  3. open /etc/fstab ... sudo nano /etc/fstab
  4. add a new line (at the end of the file) & edit to match your setup...here's the ex from ubuntu's wiki
    Quote://server/share /media/samba cifs user=user,uid=1000,gid=100 0 0
    # "Server" = Samba server (by IP or name if you have an entry for the server in your hosts file
    # "share" = name of the shared directory
    # "user" = your samba user
    # This set up will ask for a password when mounting the samba share. If you do not want to enter a password, use a credentials file.
    # replace "user=user" with "credentials=/etc/samba/credentials" In the credentials file put two lines
    # username=user
    # password=password
    # make the file owned by root and ro by root (sudo chown root.root /etc/samba/credentials && sudo chmod 400 /etc/samba/credentials)
  5. close nano... cntrl+x ... save = y
  6. mount all (mount -a) or restart (sudo shutdown -R now)
  7. simLink your cache folder ... ln -s /media/samba/[path/to/cache] /home/htpc/.xbmc/userdata/Thumbnails