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 May 2012, 02:48 AM
dieselpower Offline
Registered User
 
Join Date: Jul 2011
Posts: 8
windows_xp_2003firefox
Question How to Auto Mount Network Attached Storage (NAS) at Boot?

I am quite new to Fedora.

[What I am trying to do]
On Fedora 16 (Gnome 3), I am trying to mount network drives at boot automatically. What I have done is adding lines like below in /etc/fstab.
Code:
192.168.1.11:/shared_folder /media/nas cifs username=yep,password=yep,iocharset=utf8,noperm 0 0
I also tried nfs option instead of cifs option.

[Symptoms]
  • It does not auto mount //192.168.1.11/share at boot.
  • Manual mounting ("sudo mount -a" from the terminal) does not work either. Responds no error message.
  • However, I sometimes observe the system mounts network drives all of sudden far after the boot. Strange...

[Questions]
  • Is syntax in /etc/fstab correct?
  • What are other possible reasons that prevent auto mount? SELinux, firewall, etc...
Reply With Quote
  #2  
Old 16th May 2012, 03:26 AM
GoinEasy9's Avatar
GoinEasy9 Online
Registered User
 
Join Date: May 2009
Location: Manorville, New York, USA
Posts: 1,577
linuxfirefox
Re: How to Auto Mount Network Attached Storage (NAS) at Boot?

I have a Synology NAS, which, I still haven't set up to auto mount at boot, mainly, because I access it through my browser, but, I had to open ports 9997-9999 in the firewall in order for the desktop to see it. You have to add these ports in the "Other Ports" section in the Firewall Configuration application. Check and see if your NAS requires addition ports to be open.

I run SELinux enabled and it didn't cause me any problems accessing the NAS.

If you search the forum for "NAS" and/or "cifs" and/or "nfs" you'll find other threads dealing with your problem. I've seen other threads with similar questions. It won't hurt to take a look. I'm sure others will chime in also.
__________________
Registered Linux User #348347
Have you been seduced by siduction? http://siduction.org/index.php
Running Fedora 17/18, siduction and openSUSE Tumbleweed with KDE
Reply With Quote
  #3  
Old 16th May 2012, 10:50 AM
sea's Avatar
sea Online
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,599
linuxchrome
Re: How to Auto Mount Network Attached Storage (NAS) at Boot?

I have not written 'support' for fstab, but an easy to use script:
http://forums.fedoraforum.org/showth...ight=samba+nas

Do you have changed the workgroup (domain), and device (network) name in smb.conf to those settings you had set on the nas?
Further, did you enable browsing in the [ HOME ] section (pretty much lowest) ?

hth
__________________
Fedora Manual: http://docs.fedoraproject.org
Script-Tools: https://sourceforge.net/projects/script-tools/
sudo st tweak repo toggle livna ; st iso dl-fed && st iso usb
Reply With Quote
  #4  
Old 17th May 2012, 02:04 AM
dieselpower Offline
Registered User
 
Join Date: Jul 2011
Posts: 8
linuxchrome
Exclamation Re: How to Auto Mount Network Attached Storage (NAS) at Boot?

Thank you guys for replies.
I am getting closer to the solution, but still there is a problem.

[What I have changed]
  • I changed the fstab entry to something like:
    Code:
    //192.168.1.11/share /media/terastation cifs username="",password="",iocharset=utf8,noperm 0 0
    //192.168.1.102/sdb /media/sdb cifs username=XXXX,password=XXXX,iocharset=utf8 0 0
    The 1st line is for a network storage that does not require login credentials,
    and the 2nd line is for a samba share on another linux machine that requires username & password.
  • Cut off the firewall. I am not sure which port is relevant to nfs/cifs protocols, so cut off everything.

[New Problem]
The machine started prompting root password login at boot. I entered the password as requested, but mounting failed.
I can mount drives manually by "sudo mount -a" on the terminal after the boot (before making above changes, I could not even mount manually).

I am wondering what makes it requiring root password at boot....

---------- Post added at 10:04 AM ---------- Previous post was at 05:59 AM ----------

Howdy,

I googled to find a clue for the root password prompt at boot, then found this.
http://blag.wiki.aktivix.org/Fstab

Some excerpts from the article are:
SMBFS
Problem with mounting shares is that without suid-ing it, only root can use mount. Also if root mounts something the default way, unprivileged users will only have read-only access to the mountpoint.
CIFS
Users of BLAG 50000 will find that using smbfs at the command line on in the fstab now gives an 'unknown file system' error. It has been replaced by cifs, instead. The mounting verbiage in the fstab has changed, as well. The older dmask=777, etc. has been updated to dir_mode=0777.....
To grant read/write access to regular users enter this line in the fstab:
//server/share /home/mountdirectory cifs username=smbusername,password=smbpassword,nocase,n operm,file_mode=0777,dir_mode=0777 0 0
As I am using CIFS now, it may be irrelevant to the SMBFS problem, that is, only root can use mount. However, this might give a hint...
Reply With Quote
  #5  
Old 17th May 2012, 02:06 AM
scott32746 Offline
Registered User
 
Join Date: Jun 2007
Location: Lake Mary, Florida
Age: 48
Posts: 1,082
windows_xp_2003firefox
Re: How to Auto Mount Network Attached Storage (NAS) at Boot?

Hello,

here is what I used to mount my NAS with fstab

nas:/media /export/NAS nfs rsize=8192,wsize=8192,timeo=14,intr,nodev

# grep nas /etc/hosts
192.168.1.90 NAS nas # Netgear NAS server

I do not have a password
Reply With Quote
  #6  
Old 17th May 2012, 01:52 PM
sea's Avatar
sea Online
"Shells" (of a sub world)
 
Join Date: May 2011
Location: Helvetic Federation (Swissh)
Age: 33
Posts: 2,599
linuxchrome
Re: How to Auto Mount Network Attached Storage (NAS) at Boot?

If you dont want everyone accessing your NAS, the choose of a username and pw is a good way to achieve this.
However, alot easier to handle this is if you use a credentials file.

The first 2 quotes/codes of this post might help:
http://forums.fedoraforum.org/showpo...19&postcount=7

Its alot easier to paste the 'proper' code lines, without needing to remove the pw and user name for it.
That credentials file is also accessible for the fstab loading

I'm using cifs through smbclient, which works well.

Another thing, have you enabled the firewall ports for samba and sambaclient?
As well as edited the workrgroup (domain) in smb.conf?
__________________
Fedora Manual: http://docs.fedoraproject.org
Script-Tools: https://sourceforge.net/projects/script-tools/
sudo st tweak repo toggle livna ; st iso dl-fed && st iso usb
Reply With Quote
  #7  
Old 17th May 2012, 07:29 PM
dieselpower Offline
Registered User
 
Join Date: Jul 2011
Posts: 8
linuxchrome
Talking Re: How to Auto Mount Network Attached Storage (NAS) at Boot?

Thank you guys, I finally found the solution.
See the post #3 in this thread.
http://forums.fedoraforum.org/showthread.php?t=271764

The problem is that the system is trying to mount network drives before the network is established at boots (I think this is the classic issue on automounting by fstab, by the way). So I made the system wait for network to be up by:
Code:
systemctl enable NetworkManager-wait-online.service
Also, I found the root password prompt at boot is caused by another setting, which is the contact card syncing online with a google account. I stopped syncing my contact card, then it stopped asking the root password at boots.

Anyway, thanks for your help.
Reply With Quote
  #8  
Old 14th February 2013, 12:32 PM
Fedor Offline
Registered User
 
Join Date: Apr 2005
Posts: 23
linuxfirefox
Re: How to Auto Mount Network Attached Storage (NAS) at Boot?

I run F18 and for me it works this way (you need the cifs-utils installed):

As su:


mkdir /media/nas

and add to /etc/fstab:

//192.168.2.4/backup /media/nas cifs username=ping,password=pong,uid=1000,gid=1000,ioch arset=utf8 0 0


No problems at boot time the nas is ready.
Reply With Quote
Reply

Tags
attached, auto, boot, mount, nas, network, storage

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
Accessing Network Attached Storage device mha Servers & Networking 1 25th April 2008 09:43 AM
F9 storage auto-mount stevea Alpha - Beta (Fedora 9 Only) 8 8th April 2008 06:05 AM
Storage Area Network (SAN) OR Network Attached Storage (NAS) talkstock888 Servers & Networking 2 1st April 2008 12:52 AM
direct attached storage blackwoodie Hardware & Laptops 1 12th April 2007 09:34 AM
Network Attached Storage (NAS) fire-fly Hardware & Laptops 4 19th May 2006 02:23 AM


Current GMT-time: 21:18 (Saturday, 18-05-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