LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-13-2015, 03:03 PM   #1
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Rep: Reputation: 16
Question Centos /etc/fstab command doesn't mount after restart


Hi

I am using Centos 6.5 and i am testing Glusterfs.

I have at /etc/hosts :

Code:
123.456.789.000 host1
000.987.654.321 host2
And they can ping each other and all working great...

Glusterfs requires this command:

Code:
mount host1:/gluster-vmstore /home/nginx/public -t glusterfs
and if i run it manually it works great.

But when i restart checking using df -h is gone and is not working until i run it again manualy

I found on a tutorial that this edit on /etc/fstab will work after restart:

Code:
host1:/gluster-vmstore /home/nginx/public glusterfs defaults 0 0
But after restarting it was not working

Any ideas?

Thanks
 
Old 02-13-2015, 03:21 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,696

Rep: Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261
You really shouldn't use a 0 class A network (it already exists... thus you are replicating a network IP number belonging to someone else). Use a 10 network number.(http://en.wikipedia.org/wiki/Private_network)

There should be some error messages logged about why it doesn't work... Are you using NetworkManager?

You likely need what is referenced: https://blog.sleeplessbeastie.eu/201...netfs-service/

They indicate the fstab entry needs to be:
Code:
host1:/gluster-vmstore /home/nginx/public glusterfs _netdev 0 0
I think this will cause NetworkManager to invoke the mount after it starts the networks.
 
Old 02-13-2015, 04:13 PM   #3
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Original Poster
Rep: Reputation: 16
Thanks for your reply

This is what i get when i run the chkconfig --list netfs to check if netfs service in enable.

Code:
[root@server1 ~]# chkconfig --list netfs
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
Searching a bit more i found also:

Code:
defaults,_netdev 0 0
at the end and i am not sure which is the correct one ...

Last edited by ASTRAPI; 02-13-2015 at 04:24 PM.
 
Old 02-13-2015, 04:24 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,696

Rep: Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261
Either entry (_netdev, or defaults,_netdev). Both mean the same thing. Without the specific "defaults" there is nothing in the options field. With the _netdev the options field is satisfied syntactically, but the defaults are still used (they are compiled in).
 
Old 02-13-2015, 04:30 PM   #5
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Original Poster
Rep: Reputation: 16
Ok thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 6.6 /etc/init.d/rc.local doesn't run the command after restart ASTRAPI Linux - Newbie 10 01-27-2015 10:01 AM
Configuring ACL on CentOS - mount/fstab Fed Red Hat 5 08-07-2012 05:31 AM
Why fstab doesn't mount smbfs rjkfsm Linux - Newbie 3 12-16-2011 12:23 PM
Mounting Windows share using fstab but the mount folder doesn't populate automaticall chrislski Linux - Networking 4 04-22-2010 09:17 AM
fstab doesn't mount win share on bootup aldar Slackware 2 12-14-2005 08:15 PM


All times are GMT -5. The time now is 02:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration