LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Centos /etc/fstab command doesn't mount after restart (https://www.linuxquestions.org/questions/linux-newbie-8/centos-etc-fstab-command-doesnt-mount-after-restart-4175533940/)

ASTRAPI 02-13-2015 03:03 PM

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

jpollard 02-13-2015 03:21 PM

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.

ASTRAPI 02-13-2015 04:13 PM

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 ...

jpollard 02-13-2015 04:24 PM

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).

ASTRAPI 02-13-2015 04:30 PM

Ok thanks :)


All times are GMT -5. The time now is 06:52 AM.