LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-14-2011, 10:51 AM   #1
martdj
Member
 
Registered: Feb 2005
Distribution: Fedora 20
Posts: 30

Rep: Reputation: 1
Attaching an external drive to a server should be picked up by (XBMC) client


I post this here cause I have simply no idea to set this up. The problem is this: My movie collection is growing that large that it no longer fits on the 3TB storage I have available for it in my server. I therefore want to start using external disks, but as I don't want to waste electricty I want to switch this drive on only when I want to watch a movie which is on this drive. This drive will be connected to my server running Fedora 15 x64. The movies will (most likely) be played by a machine running XBMC on an Ubuntu minimal install (10.04). Currently I use NFS to create a mount on this machine to my media folder.
The question: How can I best setup this external drive and shares etc so to have these movies available from my XBMC machine when I switch on the drive, but nothing crashing when the drive is off (while the XBMC machine stays on)?
 
Old 07-14-2011, 04:19 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,297

Rep: Reputation: 205Reputation: 205Reputation: 205
It shouldn't crash. The most that should happen is a slight hang/pause while xbmc checks for the presence of the shares. After not finding them it will simply timeout.
 
Old 07-15-2011, 02:29 AM   #3
martdj
Member
 
Registered: Feb 2005
Distribution: Fedora 20
Posts: 30

Original Poster
Rep: Reputation: 1
Ok, but would XBMC notice if I switch the drive on in the sense that it will find the drive then? Also will the Fedora server be ok if a drive that's shared over NFS is switched off?

Last edited by martdj; 07-15-2011 at 02:47 AM.
 
Old 07-15-2011, 09:22 AM   #4
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,297

Rep: Reputation: 205Reputation: 205Reputation: 205
Quote:
Originally Posted by martdj View Post
Ok, but would XBMC notice if I switch the drive on in the sense that it will find the drive then?
There would be no need for xbmc to find the drive as the path to the share should already be defined by you in your xbmc.

For example on the server you connect the drive to, the drive it mounts to a directory called '/media/customvideos'. You create a share for /media/customvideos via NFS or Samba.

In xbmc you would browse to the share on the remote server and save that as a source for video content.

If the drive is not connected to the server and you try to access the share in xbmc, it will simply fail because there is no content to display.

When you connect the drive to the server, if the drive automounts to /media/customvideos, the share you created for it becomes active. So now if you try to access it via xbmc it will work. I hope that explaination helps.

Quote:
Also will the Fedora server be ok if a drive that's shared over NFS is switched off?
I can't speak for Fedora, but I shouldn't think it would matter. The best way to know is to try it and see.
 
Old 07-15-2011, 03:25 PM   #5
martdj
Member
 
Registered: Feb 2005
Distribution: Fedora 20
Posts: 30

Original Poster
Rep: Reputation: 1
I've run into a problem I'm afraid. My external harddisk is formatted in NTFS. The rights on the directory I want to share are root:root drwx...... In other words only the root user can access those files and I can't change those rights using chmod or chown. My xbmc machine when I mount the drive through NFS there complains about Access denied. Any ideas other than changing my drive to Ext2/4?
 
Old 07-15-2011, 03:41 PM   #6
tekhead2
Member
 
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
I think you may find this post of interest http://www.linuxquestions.org/questi...onroot-119700/
 
Old 07-15-2011, 04:00 PM   #7
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,297

Rep: Reputation: 205Reputation: 205Reputation: 205
If you cannot change the permissions on the mount point whilst the drive is mounted, diconnect the drive then chmod the mount point. There should be no need to change the file format of the drive being mounted. The NFS error Access denied is a permissions thing. I don't know how skilled you are at the terminal but webmin is a good web based admin tool. No I don't work for them and there are others. This is the one I use I can recommend it.

This is what you type to automount external devices as read/write by default: Gnome
Code:
sudo ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs
KDE su or su - to root first then do:
Code:
ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs

Last edited by {BBI}Nexus{BBI}; 07-15-2011 at 04:20 PM.
 
Old 07-15-2011, 05:45 PM   #8
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 3,958

Rep: Reputation: 606Reputation: 606Reputation: 606Reputation: 606Reputation: 606Reputation: 606
wow, i have a setup quite similar:
- xbmc-live downstairs connected to my tv (acer revo) wifi
- fedora-14 upstairs (acer revo) ethernet
- - i took a 100mb disk from my old pc reformatted it as ext2 and got a ide -> usb cable (resting on a hitch hikers g2 dvd cover (it doesnt get that hot so i keep it plugged in)

i use sshfs with ssh keys on my xbmc machine and i put this in my .profile:
Code:
while [ 1 ]
do
 if [ ! -d /home/xbmc/hyper/tv/boondocks ]
 then
  sudo /etc/init.d/networking restart
  sshfs schneidz@192.168.1.25:/media/win/stuff /home/xbmc/hyper
 fi
 sleep 10
done &
it essentially checks if it can see my tv directory every 10 seconds and if not it restarts my wifi connection and tries to remount the drive.

Last edited by schneidz; 07-15-2011 at 05:47 PM.
 
Old 07-18-2011, 08:41 AM   #9
tekhead2
Member
 
Registered: Apr 2004
Distribution: slackware/FreeBSD/Vector
Posts: 291

Rep: Reputation: 52
Wow schneidz thats a really neat setup. I never thought of that.. I keep forgetting about the profile config. I'm going to be using that a lot more often!
 
  


Reply

Tags
nfs, xbmc


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bad start-up after attaching external monitor K Mishra Linux - Newbie 5 02-27-2010 01:41 PM
Can't see files located on an external NTFS drive when on NFS Client RickRick Linux - Newbie 2 10-27-2009 06:00 PM
Attaching Xbox Hard drive to Mandriva. cjdw Mandriva 5 06-27-2005 07:24 AM
DVD drive isn't being picked up endfx Linux - Hardware 2 01-12-2005 11:32 PM
SusE 9.0 - hangs at Installation-bootup (while attaching my SATA drive...) tokugawa Linux - Hardware 4 10-25-2003 04:17 PM


All times are GMT -5. The time now is 11:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration