How to create userdata symbolic link on a NAS
#1
I have a XBMC 9.11 Live system. I am thinking of getting another XBMC Live system sharing the same userdata folder so that they get same database/fanart etc. I would like to move the userdata folder on the XBMC Live system to a NAS that supports CIFS/SMB. And then create a symbolic link called userdata that will point to the NAS location. Is it possible and if yes how to do it? Thanks in advance.
Reply
#2
For the sharing of the database I'd recommend using MySQL, not just pointing to the same userdata files (as the SQLite db may get a bit confused, in my experience!). There is a guide on how to install MySQL and get it running on http://contentwhores.com/media-centers/c...l-library/. It's not platform specific.

For the symbolic links to share the thumbnails, see http://contentwhores.com/media-centers/s...t-systems/.

Hope this helps.
Reply
#3
Thanks for the links. I will try it out.

On a related note, currently my XBMC Live boots from a USB stick. I have made some changes (i.e. USB remote resume etc.) both in the XBMC configuration and OS configuration and I am happy with the current cofiguration. So now I am thinking of installing XBMC Live in the internal HDD of my acer revo wiping out windows XP installation. If I use this USB stick to install XBMC Live on the HDD of the revo, are these configurations also going to be installed? Or does it install the default configuration of OS and XBMC. Thanks.

dc_williamson Wrote:For the sharing of the database I'd recommend using MySQL, not just pointing to the same userdata files (as the SQLite db may get a bit confused, in my experience!). There is a guide on how to install MySQL and get it running on http://contentwhores.com/media-centers/c...l-library/. It's not platform specific.

For the symbolic links to share the thumbnails, see http://contentwhores.com/media-centers/s...t-systems/.

Hope this helps.
Reply
#4
Ok, I was able to mount the CIFS share. I have used this in my /etc/fstab
//192.168.1.80/backup /home/xbmc/nas_backup_share cifs username=guest,password=,file_mode=0777,dir_mode=0777 0 0

After this if I do sudo mount -a the share is correctly mounted and I can see all the contents of my CIFS share in the mounted folder. I can also write to that folder.

I can also create a link to that share while I am in home directory. But when I try to create a link under ~/.xbmc or under ~/.xbmc/userdata the link creation fails. Here is what I did.

(live)xbmc@XBMCLive:~$ ln -s ~/nas_backup_share/Books/ Books
(live)xbmc@XBMCLive:~$ ls -l Books
lrwxrwxrwx 1 xbmc xbmc 34 2010-10-23 17:30 Books -> /home/xbmc/nas_backup_share/Books/
(live)xbmc@XBMCLive:~$ cd .xbmc
(live)xbmc@XBMCLive:/live/image/dotXBMC$ ln -s ~/nas_backup_share/Books/ Books
ln: creating symbolic link `Books': Operation not permitted
(live)xbmc@XBMCLive:/live/image/dotXBMC$ cd userdata/
(live)xbmc@XBMCLive:/live/image/dotXBMC/userdata$ ln -s ~/nas_backup_share/Books/ Books
ln: creating symbolic link `Books': Operation not permitted
(live)xbmc@XBMCLive:/live/image/dotXBMC/userdata$


Please any help will be appreciated. Thanks.
Reply
#5
It looks like you're trying to create the symlink in /live/image/dotXBMC/userdata - is it possible to create files there? Seems not.

Show us out put of the following:
mount
echo ~
ls -ld ~/.xbmc
Reply
#6
It looks like I can create files and folders under .xbmc.

Here is my output

(live)xbmc@XBMCLive:~$ cd .xbmc
(live)xbmc@XBMCLive:~/.xbmc$ cat > temp.txt
sdfd
(live)xbmc@XBMCLive:~/.xbmc$ ls -l temp.txt
-rwxrwxrwx 1 root root 5 2010-10-23 18:24 temp.txt
(live)xbmc@XBMCLive:~/.xbmc$ mount
aufs on / type aufs (rw)
none on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
/dev/sdb1 on /live/image type vfat (rw)
/dev/loop2 on /live/cow type ext3 (rw)
tmpfs on /live type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /tmp type tmpfs (rw)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
tmpfs on /var/log type tmpfs (rw)
tmpfs on /var/tmp type tmpfs (rw)
//192.168.1.80/backup on /home/xbmc/nas_backup_share type cifs (rw,username=guest,password=,file_mode=0777,dir_mode=0777)
(live)xbmc@XBMCLive:~/.xbmc$ echo ~
/home/xbmc
(live)xbmc@XBMCLive:~/.xbmc$ ls -ld ~/.xbmc
lrwxrwxrwx 1 root root 19 2010-10-23 16:42 /home/xbmc/.xbmc -> /live/image/dotXBMC
(live)xbmc@XBMCLive:~/.xbmc$
Reply
#7
okay, so /home/xbmc/.xbmc is a symlink to /live/image/dotXBMC

now lets see the permissions of that directory:
ls -ld /live/image/dotXBMC
Reply
#8
(live)xbmc@XBMCLive:~$ ls -ld /live/image/dotXBMC/
drwxrwxrwx 11 root root 4096 2010-10-23 18:24 /live/image/dotXBMC/
(live)xbmc@XBMCLive:~$
Reply
#9
You're logging in as guest, you probly do not have write access do the following
Code:
sudo umount /home/xbmc/nas_backup_share
sudo chown -R xbmc:xbmc  /home/xbmc/nas_backup_share
echo username=YOUR HIGH SECURITY USERNAME>/home/xbmc/.smbcredentials
echo password=YOUR HIGH SECURITY PASSWORD>/home/xbmc/.smbcredentials
sudo chmod 600 /home/xbmc/.smbcredentials
sudo nano /etc/fstab
change your file system table to use this
Code:
//192.168.1.80/backup /home/xbmc/nas_backup_share cifs credentials=/home/xbmc/.smbcredentials,file_mode=0777,dir_mode=0  777  0  0
Code:
sudo mount /home/xbmc/nas_backup_share
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply
#10
I have read/write permission to the mounted CIFS share, as guest has been given that permission in my NAS.

(live)xbmc@XBMCLive:~$ cd nas_backup_share/
(live)xbmc@XBMCLive:~/nas_backup_share$ cat > temp.txt
asdf
(live)xbmc@XBMCLive:~/nas_backup_share$ ls -ld temp.txt
-rwxrwxrwx 1 root root 5 2010-10-23 23:15 temp.txt
(live)xbmc@XBMCLive:~/nas_backup_share$ cat temp.txt
asdf
(live)xbmc@XBMCLive:~/nas_backup_share$

And I also have read/write permission in /live/image/dotXBMC folder.

(live)xbmc@XBMCLive:~$ cd /live/image/dotXBMC/
(live)xbmc@XBMCLive:/live/image/dotXBMC$ cat > temp.txt
asdfg
(live)xbmc@XBMCLive:/live/image/dotXBMC$ ls -ld temp.txt
-rwxrwxrwx 1 root root 6 2010-10-23 23:19 temp.txt
(live)xbmc@XBMCLive:/live/image/dotXBMC$ cat temp.txt
asdfg
(live)xbmc@XBMCLive:/live/image/dotXBMC$

I can create sym link under /home/xbmc to ~/nas_backup_share/Books. But I cannot create the same sym link under /home/xbmc/.xbmc (which is /live/image/dotXBMC).

Is it actually possible to create sym link under one mount (/live/image/dotXBMC which is the FAT32 portion of the XBMC USB stick probably) to another mount (~/nas_backup_share/Books)?
Reply
#11
Ok, it has nothing to do with my mounted CIFS share.

(live)xbmc@XBMCLive:~$ cd .xbmc
(live)xbmc@XBMCLive:~/.xbmc$ ln -s /lib/ l
ln: creating symbolic link `l': Operation not permitted
(live)xbmc@XBMCLive:~/.xbmc$

Googling shows me that creating symbolic link under a mounted FAT drive is not possible. If anyone has any idea please let me know. It looks like I have to install the XBMC drive in the HDD instead of booting from a USB stick.
Reply
#12
I just happened to be perusing, but this may help and be easier than what you're thinking about...

http://forum.xbmc.org/showthread.php?tid=83840

This teaches you how to boot your entire system from your NAS (instead of off the HDD), useful if you want a HDDless HTPC for silence -- or "centralised configuration of all media players (think about things like having the same video database on all media players)"

I just happened to read both that thread and this thread today and put 2 and 2 together.

Hope this helps, may be a better/easier method. That and you'll only have to worry about a single install for upgrades and stuff in the future, instead of doing the same work on each machine. Best of luck!
Reply
#13
No, fat32 and NTFS older then Vista do not support symlinks. You must switch to a linux filesystem to support symlinks, or keep the symlinks on the linxu filesystem and reference the fat32 filesystem.

Also, I've found that symlinks do not work across a NAS well, especially those which are required on startup before the connection is established.

I should mention that I do not have that setup on my system. I have alot of files symlinked across my network though.
Use mythicalLibrarian to make a library out of your MythTV files. Leave the recording to MythTV and use XBMC as your library.
Installation and Instructions:http://wiki.xbmc.org/index.php?title=MythicalLibrarian
Technical Support:http://forum.xbmc.org/showthread.php?tid=65644
[url=http://forum.xda-developers.com/showthread.php?tid=1081892][/url]
Reply

Logout Mark Read Team Forum Stats Members Help
How to create userdata symbolic link on a NAS0