Please Help this Linux noob!!!!
#1
Trying to mount NFS share (server:Synology DS207+) to my Dharma USB live (attached to Zotac Hd11 machine)....
Managed somehow to mount my share and can see in the XBMC terminal and in XBMC...but don't know how to use /etc/fstab command....
I need to enter (for NFS to automatically mount after reboot) this:

192.168.1.102:/volume1/video /media/misc nfs soft,intr,rsize=8192,wsize=8192

When i run /etc/fstab....it opens another window like this below...i need to know how and where exactly (which line) i need to enter the above command/code.

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>

aufs / aufs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
~
thanks in advance!!
Regards,
satfan
Reply
#2
Code:
sudo nano /etc/fstab
enter this line at the end:
Code:
//192.168.1.102:/volume1/video /media/misc nfs rw,soft,intr,rsize=8192,wsize=8192  0 0

save the file, then
Code:
sudo mount -a
mount -l

you should see your nfs share mounted.
Reply
#3
You're perhaps confusing /etc/fstab (the file that contains the filesystem details) with mount (the command that processes ad-hoc ... well, mount requests).

Adding lines to /etc/fstab means they get processed every time you boot, which is what you want. If you want to just do it as a one-off, though, use the same syntax as the fstab entry but use mount from the command line: this is the "somehow" you must have floundered through to get the filesystem to mount in the first place.

The last two commands that wsnipex lists firstly force a full-reprocessing of fstab (mount -a : this has to be run as root to work, hence sudo), and then secondly list all of your current mounted filesystems (mount -l).

Alternatively, you could use the UPNP functionality of the Synology box and then add it as a source in XBMC (although I'm no personal fan of this and like NFS mounts).
Reply
#4
still having hard time doing this...

This is what i'm doing........

sudo vi /etc/fstab

opens another window with this in it:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>

aufs / aufs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0

But i can't move a thing there...how to get to bottom of the list and then how to type on it the said command...seems like it accepts unique language...
please help...would like to know what exactly i have to press on keyboard to get this command in place and then saved and exit. Loosing patience now....
thanks!
satfan
Reply
#5
i also tried this and it worked till i reboot...and then it says on XBMC: Path not found or invalid. This is exactly i tried as per this link by kees667 on this forum: The only difference is that instead of hard drive i installed on USB which is connected to my Zotac HD11 machine and i used my ip and my share locations):

http://forum.xbmc.org/showthread.php?tid=61224&page=3


Noob guide for using NFS on XBMC LIVE (installed on harddisk)


Mounting an NFS drive in XBMC Live 9.11 beta 1 (installed to harddisk on Asrock 330)
Using a Western Digital Mybook World II 1 TB nas specifically, for other NAS the NAS setup part might be different

Getting ready - NAS
The NAS needs to be set up correctly.
-On your NAS: create a user that matches your XBMC user/password, and allow it access to the share you want to see in XBMC
-Under settings allow the XBMC machine's ip-address access
-Find out the full path to your NFS share. I stumbled here. My ip is 192.168.1.30, and my share name is "Private" but when I combine the two they are not my NFS path, there was a diskname in between. I found my correct path using "showmount -e 192.168.1.30" from a windows machine, which just showed me the paths available on the NAS. My path was "192.168.1.30:/DataVolume/Private" and will be used in the rest of the guide. I think it is case sensitive!

Getting ready - XBMC

Code:
sudo apt-get install nfs-common (went well for me)

Then,

Code:
sudo mkdir /media/misc (went well)

Code:
sudo mount -t nfs 192.168.1.30:/private /media/misc (went well)

Code:
ls /media/misc (went well i can see my movie both in terminal and XBMC)

First try - how do I open this location in XBMC?
In XBMC when you select add source and browse you see mostly network paths, but you need to browse to /media/misc. Do "add source" and then instead of "browse" just type /media/misc in the window that says <none>. Give it a name you want on a bottom window and you are all set. (Went well)

Getting your machine to do this everytime at boot (This is what not working for me. Although did exactly as it said..at least i think))

Code:
sudo pico /etc/rc.local (went well)

The last line should read "exit 0" - before that insert these two lines so that it looks like this:

Code:
mount -t nfs 192.168.1.30:/private /media/misc
sleep 10
exit 0

Reboot and try if you can browse the share using:
Code:
ls /media/misc or in XBMC. (DID NOT WORK)

I did insert line that way and pressed ctrl O to save and cntrl x to exit. It gave me some reply like "12 lines wrote"..something like this and then i exit back to main terminal. Then i entered "exit" again to close the terminal and reboot the machine from XBMC. But, then on reboot i get this message: Path not found or invalid and also it fails to accept "ls /media/misc" command on xbmc terminal saying that "no such file or directory exists". And then to get to the level where "ls /media/misc" code works again, i need to start from "sudo ap-get update" and then "sudo apt-get install nfs-common" and so on..also after new (apt-get install) when i run "sudo mkdir /media/misc" code it says that it already exists. But then on the smae time on reboot (and before apt-get install) it says file does not exists...??

Really frustrated...have already spent at least 20 hours if not more....please help....also wonder if i'll have to do this with every share (photos, videos, music etc on my NAS)...help me please....

Getting confused with so many different types of command to do the same thingHuh?

Regards,
Satfan
Reply
#6
satfan Wrote:still having hard time doing this...

This is what i'm doing........

sudo vi /etc/fstab

opens another window with this in it:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>

aufs / aufs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0

But i can't move a thing there...how to get to bottom of the list and then how to type on it the said command...seems like it accepts unique language...
please help...would like to know what exactly i have to press on keyboard to get this command in place and then saved and exit. Loosing patience now....
thanks!
satfan

don't use vi if you do not know how to use it Smile
the steps you need are in my 1st post...
*hint* type CTRL+O and CTRL-X in nano to save and exit.
Reply
#7
To me it sounds like the '/etc/rc.local' file is being run before the network is up.

Try changing the '/etc/rc.local' to look like this:

Code:
while ! ping -q -c1 192.168.1.30 &>/dev/null; do
    sleep 1
done
mount -t nfs 192.168.1.30:/private /media/misc
exit 0

Then reboot, and check your network connection.

What that does ping the server until the PC's network is up.

Or use autofs.

Jerry
Reply
#8
As Jerry said use autofs...some details posted here:

http://forum.xbmc.org/showthread.php?tid...ofs&page=2

It works very well for NFS mounts.
If I helped out pls give me a +

A bunch of XBMC instances, big-ass screen in the basement + a 20TB FreeBSD, ZFS server.
Reply
#9
AutoFS is the best option.
-
Don't use Vi or search google for "how to use vi"
-

Quote:Then reboot, and check your network connection.
And if his network gets borked he'll never make it past right there meaning you can't do anything.
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#10
Quote:while ! ping -q -c1 192.168.1.30 &>/dev/null; do
sleep 1
done
mount -t nfs 192.168.1.30:/private /media/misc
exit 0

Quote:And if his network gets borked he'll never make it past right there meaning you can't do anything.

Thank you!
If you have to do it this way....

1) Sleep a longer period of time
2) Loop max X times

It is probably safer to modify the runXBMC to check the line and mount the disks it will also made the sequence more predictable.
Reply

Logout Mark Read Team Forum Stats Members Help
Please Help this Linux noob!!!!0