Jump to content

Ubuntu Mount UnRAID NFS


jgourd

Recommended Posts

I can browse my network and see the UnRAID server on both Ubuntu and Vista. In the Ubuntu network browser it shows up as Tower-SMB, is that correct?

 

When I try to mount it I get

mount.nfs4: Connection timed out

when I use command line

sudo mount -t nfs4 -o proto=tcp,port=2049 192.168.1.15:/Movies /mnt/Movies

 

Any help would be appreciated.

Link to comment

I have gotten somewhere with this. I went to my user share and noticed that NFS wasn't enabled for it. I have since enabled it but still can't mount.

 sudo mount -t nfs -o proto=tcp,port=2049 tower:/Movies /mnt/Movies

results in

mount.nfs: access denied by server while mounting tower:/Movies

 

The only other share I have in my fstab is an SMB share and it has a line pointing to a .credentials file which if I add that to my NFS mount command line results in the same access denied message.

Link to comment

There is no real concept of a 'share' with NFS so you'll need to give it the full path.

 

i.e mount -t nfs -o proto=tcp,port=2049 tower:/mnt/user/Movies /mnt/Movies

 

You can confirm by checking /etc/exports on your unraid box if you have terminal access it will show the export settings.

 

You probably don't need to specify the tcp port either - though as 2049 is the tcp default it's probably not hurting.

 

edited to add also ensure 'tower' will dns resolve correctly. If in doubt put the full IP of your server in there instead.

 

mount -t nfs -o proto=tcp,port=2049 192.168.1.1:/mnt/user/Movies /mnt/Movies

Link to comment

I use a program called Gigolo to mount my unRAID user shares on my Linux boxes.  I use Linux Mint as my OS, which is based on Ubuntu, so this will work on your Ubuntu box.  The following tutorial will help you get it set up if you are interested in trying this.  I take no credit for writing the tutorial.  I saved this from a website some time ago.  I think I got it from Webupd8.

 

HowTo: Using Gigolo to Mount Remote Samba Shares

 

Updated to include Mint Debian Changes

 

For those of you who already use Gigolo you may be wondering why anybody needs a HowTo on it's use. You're right, it's self explanatory. I started to use lxde and xfce recently and noticed that they do not have a way to browse network shares through their native file managers. I recently discovered Gigolo and the more I used it the more impressed I got. So consider this more an introduction for those who didn't know it existed.

 

PLEASE NOTE: Gigolo is a facilitator to access and mount remote shares. It uses the same base samba client packages as other methods so if you're currently having a problem connecting to a remote share, Gigolo isn't going fix that.

 

STEP 1: Prerequisites

 

Make sure the following packages are installed. If they are not then install them:

Code:

sudo apt-get install gigolo

sudo apt-get install gvfs-fuse

 

STEP 1a: Additional Mint Debian Prerequisites

You need to add yourself to the "fuse" group:

Code:

sudo gpasswd -a your_user_name fuse

 

And you need to logout and login again.

 

STEP2: Initial configuration

 

Launch gigolo then go to Edit > Preferences

 

General Tab:

File Manager: gvfs-open

Bookmark Auto-connect Interval: 60

 

Interface Tab:

enable: "Start minimized in the Notification Area"

This will start gigolo automatically on boot and and place a small icon on the panel

disable "Show auto-connect error messages"

 

Toolbar Tab:

enable "Show Toolbar"

 

Close Preferences and select the "View" button:

enable: "Toolbar", "Side Panel", and "Status Icon"

 

STEP 3: Network Browsing

 

When you open up gigolo click on the Network tab on the side panel and it will eventually show you all your workgroups and all the hosts within those workgroups. Once you find the share you're looking for simply double click to mount it. A dialog box will open asking for the following information:

 

Service type: Windows Share

Server: It should be auto filled

Share: It should be auto filled

Username: Only required if your remote share requires credentials.

 

The remote share should be displayed in the right panel of gigolo and double clicking the share will open a file manager so you can access it's contents.

 

STEP 4: ( OPTIONAL ) Auto Mounting Remote Shares on Boot

 

First: Set gigolo to start at login ( Gnome specific instructions )

Create a new entry in StartUp Applications:

 

Menu > Preferences > StartUp Applications > Add > Command = gigolo

 

Second: Once you access the remote share using the method described above in STEP 3, you can set this up to mount the remote share automatically:

 

In the right side panel of gigolo right click the remote share and select "Create Bookmark"

There you can give it a short bookmark name as well as other authentication information you want to pass to the server on boot. The versatility of this utility comes in when you enable the "Auto-Connect" option. This will do two things:

 

(1) If the server having the remote share is not up at the time you boot, the "Auto-Connect" option will probe the network at an interval specified by the "Bookmark Auto-Connect Interval" you set in STEP 2 and then mount the share.

 

(2) The other thing it will do is reconnect to the share if the connection to the server is interrupted for whatever reason.

 

STEP 5: ( OPTIONAL ) Mount Point

 

There is one downside to all this goodness however. At it's core it's still using a "gvfs-mount smb://" mechanism to mount the remote share. That means it will create a mount point in a hidden directory at this location with this type of path:

/home/your_user_name/.gvfs/share_name on host_name

 

If you have an application that requires a known path and it can access a hidden directory then there is no problem. If however your application cannot access a hidden directory or if you prefer to have it mount somewhere other than the default location then one way to accomplish that is to use a symbolic link to a non-hidden directory. For example:

Code:

sudo mkdir /media/Music

sudo ln -s /home/altiar/.gvfs/"music on seagate" /media/Music

 

Where "music on seagate" is the share on the remote machine and /media/Music is the place you would prefer to access it.

 

ADDITIONAL BENEFITS

 

Ubuntu has changed the way services are started and when things are mounted and as a result it has introduced a number of bugs. As it turns out, gigolo can actually work around a couple of them.

 

BUG 1: fstab is executed before the network is up.

 

The traditional way of automounting a remote share is to add a line in fstab that will execute on boot. The problem is that because of the changes Ubuntu has made, fstab sometimes executes before the network is up. There used to be a parameter "_netdev" that one could add to the fstab expression but that no longer reliably works. The "Auto-Connect" option in gigolo solves this problem by periodically probing the network and mounting when the share is available on the network.

 

BUG 2: Shutdown hangs when a remote share is mounted.

 

If you have a remote share mounted in the traditional manner, shutting down the system hangs because the network is shut down before the mountpoints are unmounted. Gigolo works in userspace. At shutdown the system will logoff the user first and will automatically unmount the remote share before passing to the root level shutdown sequence which shuts down the network.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...