Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 16th October 2011, 07:20 AM
lerlan1 Offline
Registered User
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 59
linuxfedorafirefox
aoutomount network share in F14

I have a Western Digital Mybook live connected to my router and would like to automount it.

I read many threads but none of them seem to do the job. No luck with mount cifs or in fstab.

Can anyone give me the code to use for mounting an NTFS network share in F14?

Thx.

---------- Post added 16th October 2011 at 02:20 AM ---------- Previous post was 15th October 2011 at 10:44 PM ----------

the issue is that I'm not sure I'm typing the proper commands.
I'm just looking for a set of instructions if possible.
Thx
Reply With Quote
  #2  
Old 16th October 2011, 09:05 AM
meine's Avatar
meine Offline
Registered User
 
Join Date: Apr 2009
Location: Brabant NL
Posts: 148
linuxfirefox
Re: aoutomount network share in F14

Quote:
Originally Posted by lerlan1 View Post
Can anyone give me the code to use for mounting an NTFS network share in F14?
below the client side is the box you'd like to mount on your remote WD Mybook
server side is the WD Mybook itself
I used similar names between < > to point that they must be exactly the same. computers hardly understand intentions in networking ;)

the trick is not only to mount a remote directory but also share that dir and let client and server know of each others existence.

client side:

open as root /etc/fstab
add following line at the bottom of all code:
Code:
<IP or server box name>:<directory to mount on the server box>	<directory as mounting point> 	nfs	timeo=50, hard	0 0
the nfs stands for networking file system and is independent of what disk format your server box has. the timeo variable determines how long fstab tries to mount the remote box.

open as root /etc/hosts and add
Code:
<IP address server box>  <server box name>
make a mount point in a logical place like /mnt or /media and with a logical name. this should be the same path/name as given in /etc/fstab for the directory as mounting point.
second change permissions to read-write-excecute, otherwise only root has access.
as root
Code:
# mkdir /media/<server box name>
# chmod -R 777 <directory as mounting point -- the dir you made one line up>
server side

open as root /etc/exports and add
Code:
<directory to mount on the server box>  (rw)
open as root /etc/hosts and add
Code:
<IP address client box>  <client box name>
reboot and it should work...

when your server is offline it can take too long to boot. the timeo variable sets waiting time. to make this more flexibel you could use autofs instead. autofs knows the server but only mounts it when needed and avaliable. when the connection is no longer needed it goes down. I use this to share my music on a htpc box. the music directory is in autofs files and in the preferences of Rhythmbox. only when I start Rhythmbox the connection to the music server is made.

a very good how2 you can find here -- http://blogging.dragon.org.uk/index....tofs-on-fedora. if you don't use sudo, use root instead.

happy coding!
__________________
meine
linux fedora 18 LXDE & fedora 18 Security

Last edited by meine; 16th October 2011 at 09:19 AM. Reason: added chmod
Reply With Quote
  #3  
Old 16th October 2011, 11:29 AM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,346
linuxfedorafirefox
Re: aoutomount network share in F14

There is no such nfs automount - the server doesn't notify the client of the event.

You can put an entry in /etc/fstab with the 'bg' mount option, like
fstab:
myyourbook:/sharedir /home/mntdir nfs _netdev,rw,noatime,bg 0 0

The 'bg' option mens the mount is retried for 10000 minutes (one week). If the mybook comes up during the week, then it is mounted by the pending mount. If the mybook goes down and back up after it is mounted - then you can access the mybook while it is up.

The trick is - that once the mybook is mounted and then goes offline w/o a umount - there is a problem. If you try to access the share with mybook mounted but down - thenthe access will hang, trying to complete. Sp if you do an "ls /home/mntdir" then 'ls' process will block waiting for the I/O to complete - and that means after yo upowerup the mybook.

You can change this behavior using the 'hard'(default) or 'soft' mount options. With soft mount, if your I/O request fails after 'retrans'(default=3) retries the nit will fail rather than block. If you mount with the default 'hard' then the I/O requests will block forever.

hope that helps.

---------- Post added at 06:29 AM ---------- Previous post was at 06:28 AM ----------

Oops - I read that as NFS rather than NTFS
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #4  
Old 16th October 2011, 07:02 PM
lerlan1 Offline
Registered User
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 59
linuxchrome
Re: aoutomount network share in F14

Thanks for both responses: I forgot to mention that the Western Digital Mybook live is a NAS. I can only access it through the web interface ie: IP address. I can create user accounts through the web interface and set paswords. I was able to access a shared drive using the "Connect to Server" GUI under "Places" in F14.

Meine:
I'm not sure how to do the <server side> configuration you wrote, since I'm so far only able to access the web UI.
lets say I added this line to fstab
Code:
10.0.0.1:user   /mnt/mybook             nfs     timeo=50,  hard 0 0
I realize that I need something with <username=...> and <password=...> right?

Could you give me the code for both:
  • Both username and password visible in fstab; and
  • how to hide password in fstab?

Stevea and Meine

would this line address the I/O issue if i use 'gb' ?
Code:
10.0.0.1:user   /mnt/mybook             nfs     timeo=50,  gb 0 0
and for the auto off?
Code:
10.0.0.1:user   /mnt/mybook             nfs     autoofs,     gb 0 0

Does this make sense?

Thanks
Reply With Quote
  #5  
Old 16th October 2011, 10:45 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,346
linuxfedorafirefox
Re: aoutomount network share in F14

The option is 'bg' not 'gb'.

I suggest you try something like .....

10.0.0.1:user /mnt/mybook nfs rw,_netdev,noatime,bg,soft 0 0

If you try to access a file after the NAS is down, then the access will fail after 3 retries.
You cannot have spaces in the option list., this part: rw,_netdev,noatime,bg,soft
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #6  
Old 18th October 2011, 03:57 AM
lerlan1 Offline
Registered User
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 59
linuxchrome
Re: aoutomount network share in F14

I'm getting the following error message in the boot messages:

Code:
	[  OK  ]
Remounting root filesystem in read-write mode:  [mntent]: line 18 in /etc/fstab is bad
	[  OK  ]
[mntent]: line 18 in /etc/fstab is bad
Mounting local filesystems:  [mntent]: line 18 in /etc/fstab is bad
any idea?
Reply With Quote
  #7  
Old 18th October 2011, 04:49 AM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150
linuxfedorafirefox
Re: aoutomount network share in F14

Not without seeing the /etc/fstab.
Reply With Quote
  #8  
Old 18th October 2011, 03:38 PM
lerlan1 Offline
Registered User
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 59
linuxchrome
Re: aoutomount network share in F14

here it is: line 18 is the last line

Code:
#
# /etc/fstab
# Created by anaconda on Tue Jul  5 00:37:24 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_agape-lv_root /                       ext4    defaults        1 1
UUID=51ec0edd-4ee0-4569-bba0-64b7f646f65a /boot                   ext4    defaults        1 2
/dev/mapper/vg_agape-lv_home /home                   ext4    defaults        1 2
/dev/mapper/vg_agape-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 

10.0.0.1:user /mnt/mybook nfs rw,_netdev,noatime,bg,soft 0 0
Reply With Quote
  #9  
Old 18th October 2011, 09:54 PM
meine's Avatar
meine Offline
Registered User
 
Join Date: Apr 2009
Location: Brabant NL
Posts: 148
linuxfirefox
Re: aoutomount network share in F14

Quote:
Originally Posted by lerlan1 View Post
10.0.0.1:user /mnt/mybook nfs rw,_netdev,noatime,bg,soft 0 0
first there is a space in the <IP>:<exported directory on the server> that should not be there

second see that /user is also and correct in the /etc/exports file on your Mybook server. it could be that user should be your real account name and that it is in /home. so /etc/exports should maybe read /home/user/ (rw) or something like that

the parameters you added to the line in fstab I don't know. when errors persist try leaving them all exept the timeo=50 and see if it mounts after reboot. then add them one by one.

mounting an NFS seems easy but one extra space in the wrong place and you'll get lost...

//meine
__________________
meine
linux fedora 18 LXDE & fedora 18 Security
Reply With Quote
  #10  
Old 18th October 2011, 05:02 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150
linuxfedorafirefox
Re: aoutomount network share in F14

I believe you have the wrong syntax.

If the directory on the server to be mounted is /user, then the entry on the client would be:

Code:
10.0.0.1:/user /mnt/mybook nfs rw,_netdev,noatime,bg,soft 0 0
Reply With Quote
  #11  
Old 18th October 2011, 06:09 PM
lerlan1 Offline
Registered User
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 59
linuxchrome
Re: aoutomount network share in F14

ok, made some progress.
now it's an authentication error in the <boot messages> .do I need username and password added to the line?
Code:
Mounting NFS filesystems:  mount.nfs: access denied by server while mounting 10.0.0.1:/user
	[FAILED]
Reply With Quote
  #12  
Old 18th October 2011, 09:03 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150
linuxfedorafirefox
Re: aoutomount network share in F14

No.

The server has to export to your client. IF it doesn't accept the client as a valid connection this is what happens.

Check the server and verify that /user is exported to your client.
Reply With Quote
  #13  
Old 18th October 2011, 10:31 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,346
linuxfedorafirefox
Re: aoutomount network share in F14

The shares on the mybook are reported to be
10.0.0.1:/nfs/Public
and maybe
10.0.0.1:/nfs/user ## assuming 'user' is a share name you created on their web interface.


You can see a list of the exported mounts from the Fedora system with the command
showmount -e 10.0.0.1
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #14  
Old 19th October 2011, 12:33 AM
lerlan1 Offline
Registered User
 
Join Date: Aug 2007
Location: Ontario, Canada
Posts: 59
linuxchrome
Re: aoutomount network share in F14

Almost there;
and thanks for all the help. here is what I have:

I've added the following lines to test the connectivity:

Code:
10.0.0.1:/nfs/user /media/nas nfs timeo=50,hard 0 0
10.0.0.1:/nfs/Public /mnt/mybook nfs rw,_netdev,noatime,bg,soft 0 0
Then I switched the shared folders (user and Public) to see the difference for each line.
In both instances:
The Public folder is available. I can see its contents.

However, I'm getting this pop up dialiog box for the "user" folder:
HTML Code:
The folder contents could not be displayed.
You do not have the permissions necessary to view the contents of "nas".
Note:
1. I did create an account called "user" with password on the mybook live.
2. I did chmod -R 777 the "nas" and "mybooks" folder .

Thx.
Reply With Quote
  #15  
Old 19th October 2011, 12:57 AM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,150
linuxfedorafirefox
Re: aoutomount network share in F14

Chmod should not be used - you just allowed anybody to modify any file.

What is your NFS server?

What is in the /etc/exports file? (assuming it is Linux)

Did you remember to enable NFS exports with SELinux?
Reply With Quote
Reply

Tags
aoutomount, f14, network, share

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
share in network Elena147 Servers & Networking 4 26th March 2008 02:45 AM
How do I mount a network share ? OralDeckard Using Fedora 0 22nd February 2007 01:17 AM
NTFS Network Share s3cur17y Servers & Networking 1 11th April 2006 07:59 PM
network share under win xp z3rgl1ng Servers & Networking 2 10th August 2005 11:52 AM
Installing from a network share DRE.ORGY.NET Installation and Live Media 10 27th November 2004 02:42 AM


Current GMT-time: 14:51 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat