Kodi Community Forum
XBMC script to mount NFS volume - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: XBMC script to mount NFS volume (/showthread.php?tid=77373)



XBMC script to mount NFS volume - iosonogio - 2010-07-18

Hello,

I'd like to have an XBMC script which is executed at XBMC startup and mounts an NFS volume (or safely fails in case the volume is not connected).

I see I have to write that in python? Is that possible to do something like that (mounting a NFS volume at XBMC startup) ?

thank you Smile


- jawilljr - 2010-07-18

Here you go.

That is what I do.

Jerry


- .:B:. - 2010-07-18

Whatever your distro may be, it's easier to add your NFS shares to fstab, and have them mounted at boot (similarly to what is suggested above).


- iosonogio - 2010-07-18

Thank you both!

As for fstab: if NFS is offline at boot, will fstab mount it when it comes up?


- ppic - 2010-07-18

no, it won't


- andy204 - 2010-07-18

depends on your distribution. when using redhat/fedora add _netfs to the mount options and do a
chkconfig netfs on

-andy

no idea how that is achieved unter ubuntu... i just use ubuntu because of the prebuild svn builds Smile (i dont like ubuntu)

-andy


- trolly - 2010-07-19

aufofs is the solution,

link above can help you.


- iosonogio - 2010-07-19

Using the script, works just fine Smile

As for fstab, if anybody knows how to make it automatically mount and unmount as the server is up or down, hints would be appreciated Smile

(for ubuntu Smile )

ops, didnt see the autofs hint: how about the autofs issues (desktop unresponsiveness) which are reported in the page linked by jawilljr ?


- trolly - 2010-07-19

Have you a linux with desktop or a minimal ?

With a minimal should work fine. Not sure, but can remember there's a problem with nautilus.


- iosonogio - 2010-07-19

I have a ubuntu desktop installed on an ION mini-PC.

I use it as a desktop for XBMC. I have the movies and stuff on the NFS volume.


- .:B:. - 2010-07-19

iosonogio Wrote:As for fstab, if anybody knows how to make it automatically mount and unmount as the server is up or down, hints would be appreciated Smile
Fstab is static, it's only read at boot and whenever you call the mount utility. Fstab's syntax is identical between distributions, there's nothing distribution-specific to it.


- Flomaster - 2010-07-19

if you have the drive in your Fstab and its offline you will get an error when booting and have to press "S" to skip and continue with your boot.

-=Jason=-


- iosonogio - 2010-07-20

Trying with autofs also. So far it's working like a charm, and it seems like it's not blocking nautilus or whatever. I used options "soft,intr".
Smile


- .:B:. - 2010-07-20

Flomaster Wrote:if you have the drive in your Fstab and its offline you will get an error when booting and have to press "S" to skip and continue with your boot.

-=Jason=-

Not if you use the 'noauto' option Wink.