Re: [Gluster-users] gluster volume not mounted on boot

2016-10-22 Thread Lindsay Mathieson

On 22/10/2016 3:03 AM, Ville-Pekka Vainio wrote:

Just based on a Google search, I’d say yes.
https://wiki.archlinux.org/index.php/samba#As_mount_entry

We use the FUSE mounts and with those it works well.


Thanks, looks rather better than my current setup

--
Lindsay Mathieson

___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] gluster volume not mounted on boot

2016-10-21 Thread Ville-Pekka Vainio
> On 21 Oct 2016, at 19.52,  
>  wrote:
> 
> Will that work for samba mounts? (cifs) 

Just based on a Google search, I’d say yes.
https://wiki.archlinux.org/index.php/samba#As_mount_entry

We use the FUSE mounts and with those it works well.

-Ville-Pekka
___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] gluster volume not mounted on boot

2016-10-21 Thread lindsay.mathieson
Will that work for samba mounts? (cifs)

Sent from my Windows 10 phone

From: Ville-Pekka Vainio
Sent: Saturday, 22 October 2016 2:26
To: gluster-users@gluster.org
Subject: Re: [Gluster-users] gluster volume not mounted on boot

Hi all,

On a system using systemd, you should also be able to use x-systemd.automount.
Just add 'noauto,x-systemd.automount’ to your fstab line and systemd should 
mount the gluster volume for you when it’s accessed.
The ‘noauto’ option means that autofs won’t touch the mount and systemd will 
have control over it.

-Ville-Pekka

___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] gluster volume not mounted on boot

2016-10-21 Thread lindsay.mathieson

___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] gluster volume not mounted on boot

2016-10-21 Thread Ville-Pekka Vainio
Hi all,

On a system using systemd, you should also be able to use x-systemd.automount.
Just add 'noauto,x-systemd.automount’ to your fstab line and systemd should 
mount the gluster volume for you when it’s accessed.
The ‘noauto’ option means that autofs won’t touch the mount and systemd will 
have control over it.

-Ville-Pekka

___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] gluster volume not mounted on boot

2016-10-21 Thread Kevin Lemonnier
> But I have a question, it is possible to mount a volume at /gluster-data 
> for example???
> 

No, the way AutoFS works it needs a directory just for itself, so you can't do 
that.
I think the simplest would be to use /mnt/autofs like us, and then do a 
symbolic link :

ln -s /mnt/autofs/gluster-data /gluster-data

That way you'd end up with pretty much what you want.

-- 
Kevin Lemonnier
PGP Fingerprint : 89A5 2283 04A0 E6E9 0111


signature.asc
Description: Digital signature
___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] gluster volume not mounted on boot

2016-10-21 Thread Josep Manel Andrés

Hi Kevin,

Thank you for your help, I manage to set it up!

But I have a question, it is possible to mount a volume at /gluster-data 
for example???



I cannot do:

opsld04:~ # cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
/ /etc/auto.map.d/master.autofs



and then :


opsld04:~ # cat /etc/auto.map.d/master.autofs
gluster-data 	 
-fstype=glusterfs,defaults,_netdev,backupvolfile-server=other_node 
  gluster1:/volume1




in auto.master file I have to set up a path other than root.

Did you manage to mount it  just at the first level of root, hanging from /

Cheers.

On 20/10/16 11:00, Kevin Lemonnier wrote:

On Thu, Oct 20, 2016 at 10:47:49AM +0200, Josep Manel Andrés wrote:

Thanks Kevin,

hahah, you are right, it works for me now, but it may not work in the
future when running tomcat on it, tomcat may need files from gluster
before it is mounted.



Yep, took us a while to find a solution here tbh.


So, I will go for AutoFS.



I find AutoFS hard to configure, especially with gluster, so here is
an example :

mkdir /etc/auto.map.d /etc/auto.master.d /mnt/autofs


In /etc/auto.master.d/master.autofs :

   /mnt/autofs /etc/auto.map.d/master.autofs

In /etc/auto.map.d/master.autofs :

   applicatif
-fstype=glusterfs,defaults,_netdev,backupvolfile-server=other_node
localhost:/applicatif

With this, /mnt/autofs/applicatif will automatically mount the /applicatif 
volume.



___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users



--
Josep Manel Andrés (josep.and...@bsc.es)
Operations - Barcelona Supercomputing Center
C/ Jordi Girona, 31  http://www.bsc.es
08034 Barcelona, Spain Tel: +34-93-401 25 73
e-mail: syst...@bsc.es Fax: +34-93-413 77 21
---

WARNING / LEGAL TEXT: This message is intended only for the use of the
individual or entity to which it is addressed and may contain
information which is privileged, confidential, proprietary, or exempt
from disclosure under applicable law. If you are not the intended
recipient or the person responsible for delivering the message to the
intended recipient, you are strictly prohibited from disclosing,
distributing, copying, or in any way using this message. If you have
received this communication in error, please notify the sender and
destroy and delete any copies you may have received.

http://www.bsc.es/disclaimer
___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users


Re: [Gluster-users] gluster volume not mounted on boot

2016-10-20 Thread Kevin Lemonnier
On Thu, Oct 20, 2016 at 10:47:49AM +0200, Josep Manel Andrés wrote:
> Thanks Kevin,
> 
> hahah, you are right, it works for me now, but it may not work in the 
> future when running tomcat on it, tomcat may need files from gluster 
> before it is mounted.
> 

Yep, took us a while to find a solution here tbh.

> So, I will go for AutoFS.
> 

I find AutoFS hard to configure, especially with gluster, so here is
an example :

mkdir /etc/auto.map.d /etc/auto.master.d /mnt/autofs


In /etc/auto.master.d/master.autofs :

  /mnt/autofs /etc/auto.map.d/master.autofs

In /etc/auto.map.d/master.autofs :

  applicatif 
-fstype=glusterfs,defaults,_netdev,backupvolfile-server=other_node
localhost:/applicatif

With this, /mnt/autofs/applicatif will automatically mount the /applicatif 
volume.

-- 
Kevin Lemonnier
PGP Fingerprint : 89A5 2283 04A0 E6E9 0111


signature.asc
Description: Digital signature
___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] gluster volume not mounted on boot

2016-10-20 Thread Josep Manel Andrés

Thanks Kevin,

hahah, you are right, it works for me now, but it may not work in the 
future when running tomcat on it, tomcat may need files from gluster 
before it is mounted.


So, I will go for AutoFS.

Thanks a lot guys! ;)

On 20/10/16 10:44, Kevin Lemonnier wrote:

On Thu, Oct 20, 2016 at 10:38:52AM +0200, Josep Manel Andrés wrote:

Right, Client and server are at the same box. Doesn't really understand
what autofs does exactly ... but, isn't it the same to use:

   sleep 10 && mount /gluster

on rc.local ?



More or less, yes.
AutoFS mounts the directory only when some process tries to access it,
could be 10 seconds after boot or 2 hours. The good part is that it'll
keep trying at each access until it works, so if your gluster takes 2
minutes to start for some reason, it'll still work, but sleep 10 won't.
Now if sleep 10 works for you great, but I guess you wouldn't be posting
here if it did :D



___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users



--
Josep Manel Andrés (josep.and...@bsc.es)
Operations - Barcelona Supercomputing Center
C/ Jordi Girona, 31  http://www.bsc.es
08034 Barcelona, Spain Tel: +34-93-405 42 14
e-mail: syst...@bsc.es Fax: +34-93-413 77 21
---

WARNING / LEGAL TEXT: This message is intended only for the use of the
individual or entity to which it is addressed and may contain
information which is privileged, confidential, proprietary, or exempt
from disclosure under applicable law. If you are not the intended
recipient or the person responsible for delivering the message to the
intended recipient, you are strictly prohibited from disclosing,
distributing, copying, or in any way using this message. If you have
received this communication in error, please notify the sender and
destroy and delete any copies you may have received.

http://www.bsc.es/disclaimer
___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users


Re: [Gluster-users] gluster volume not mounted on boot

2016-10-20 Thread Kevin Lemonnier
On Thu, Oct 20, 2016 at 10:38:52AM +0200, Josep Manel Andrés wrote:
> Right, Client and server are at the same box. Doesn't really understand 
> what autofs does exactly ... but, isn't it the same to use:
> 
>   sleep 10 && mount /gluster
> 
> on rc.local ?
> 

More or less, yes.
AutoFS mounts the directory only when some process tries to access it,
could be 10 seconds after boot or 2 hours. The good part is that it'll
keep trying at each access until it works, so if your gluster takes 2
minutes to start for some reason, it'll still work, but sleep 10 won't.
Now if sleep 10 works for you great, but I guess you wouldn't be posting
here if it did :D

-- 
Kevin Lemonnier
PGP Fingerprint : 89A5 2283 04A0 E6E9 0111


signature.asc
Description: Digital signature
___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] gluster volume not mounted on boot

2016-10-20 Thread Josep Manel Andrés
Right, Client and server are at the same box. Doesn't really understand 
what autofs does exactly ... but, isn't it the same to use:


 sleep 10 && mount /gluster

on rc.local ?

Cheers!

On 20/10/16 09:09, Kevin Lemonnier wrote:

On Wed, Oct 19, 2016 at 06:17:07PM +0200, Josep Manel Andrés wrote:

Hi ,
I am trying to mount a volume during boot time,  here are the logs from


Is your client also your server ? If yes, the problem is that gluster
hasn't started yet when fstab is processed, we use autofs as a workaround.



___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users



--
Josep Manel Andrés (josep.and...@bsc.es)
Operations - Barcelona Supercomputing Center
C/ Jordi Girona, 31  http://www.bsc.es
08034 Barcelona, Spain Tel: +34-93-405 42 14
e-mail: syst...@bsc.es Fax: +34-93-413 77 21
---

WARNING / LEGAL TEXT: This message is intended only for the use of the
individual or entity to which it is addressed and may contain
information which is privileged, confidential, proprietary, or exempt
from disclosure under applicable law. If you are not the intended
recipient or the person responsible for delivering the message to the
intended recipient, you are strictly prohibited from disclosing,
distributing, copying, or in any way using this message. If you have
received this communication in error, please notify the sender and
destroy and delete any copies you may have received.

http://www.bsc.es/disclaimer
___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users


Re: [Gluster-users] gluster volume not mounted on boot

2016-10-20 Thread Kevin Lemonnier
On Wed, Oct 19, 2016 at 06:17:07PM +0200, Josep Manel Andrés wrote:
> Hi ,
> I am trying to mount a volume during boot time,  here are the logs from 

Is your client also your server ? If yes, the problem is that gluster
hasn't started yet when fstab is processed, we use autofs as a workaround.

-- 
Kevin Lemonnier
PGP Fingerprint : 89A5 2283 04A0 E6E9 0111


signature.asc
Description: Digital signature
___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] gluster volume not mounted on boot

2016-10-19 Thread Josep Manel Andrés

opsld04:/etc/tls/certs # cat /etc/fstab
UUID=9ad7cc4f-cafd-49fc-b0b0-4e68e118db46 swap swap 
  defaults  0 0
UUID=3307f813-d80b-49fa-a5f2-bc7b6b6ebdbc /ext4 
  acl,user_xattr1 1
UUID=6E03-6160   /boot/efivfat 
umask=0002,utf8=true  0 0
UUID=bd565012-d92e-4686-b5de-e9ee92912355 /opt ext4 
  acl,user_xattr1 2
UUID=f8f9eb7b-2044-46c4-9356-8c161805294d /tmp ext4 
  acl,user_xattr1 2
UUID=568219ac-ea32-457e-b598-28f10c802dae /var/log ext4 
  acl,user_xattr1 2
/dev/sdb1 /mnt/.bricks ext4 
  rw0 1
gluster2:/volume1 /glusterfs-data  glusterfs 
 defaults,_netdev  0 0




And if I do mount -a, it just works:
opsld04:/etc/tls/certs # mount -a
opsld04:/etc/tls/certs # df -h
Filesystem Size  Used Avail Use% Mounted on
/dev/sda2  119G  3.0G  115G   3% /
devtmpfs16G 0   16G   0% /dev
tmpfs   16G 0   16G   0% /dev/shm
tmpfs   16G   26M   16G   1% /run
tmpfs   16G 0   16G   0% /sys/fs/cgroup
/dev/sdb1  3.6T  1.1G  3.4T   1% /mnt/.bricks
/dev/sda1  156M   12M  145M   8% /boot/efi
/dev/sda4   26G  255M   25G   2% /tmp
/dev/sda3  302G  467M  300G   1% /opt
/dev/sda5   99G  829M   97G   1% /var/log
gluster2:/volume1  3.6T  1.1G  3.4T   1% /glusterfs-data

But I cannot find the client log you say:

opsld04:/var/log/glusterfs # l
total 15332
drwxr-xr-x  6 root root 4096 Jun 16 15:14 ./
drwxr-xr-x 16 root root 4096 Oct 19 16:39 ../
drwxr-xr-x  2 root root 4096 Jun  3 17:41 bricks/
-rw---  1 root root46501 Sep 15 16:45 cli.log
-rw---  1 root root 2039 Jul 11 17:43 cmd_history.log
-rw---  1 root root 14926967 Oct 19 16:39 etc-glusterfs-glusterd.vol.log
drwxr-xr-x  2 root root 4096 Jun  3 17:09 geo-replication/
drwxr-xr-x  3 root root 4096 Jun  3 17:09 geo-replication-slaves/
-rw---  1 root root   452770 Oct 20 08:27 glusterfs-data.log
-rw---  1 root root   158687 Oct 19 16:39 glustershd.log
-rw---  1 root root53971 Jul 11 13:53 nfs.log
drwxr-xr-x  3 root root 4096 Jun  3 17:17 snaps/


Cheers.

On 19/10/16 22:19, Lindsay Mathieson wrote:

On 20/10/2016 2:17 AM, Josep Manel Andrés wrote:

Hi ,
I am trying to mount a volume during boot time,  here are the logs
from boot.log, everything seems ok:


Can we see

- your fstab entry for the gluster mount


- the client log (/var/log/gluster/-.log)



--
Josep Manel Andrés (josep.and...@bsc.es)
Operations - Barcelona Supercomputing Center
C/ Jordi Girona, 31  http://www.bsc.es
08034 Barcelona, Spain Tel: +34-93-405 42 14
e-mail: syst...@bsc.es Fax: +34-93-413 77 21
---

WARNING / LEGAL TEXT: This message is intended only for the use of the
individual or entity to which it is addressed and may contain
information which is privileged, confidential, proprietary, or exempt
from disclosure under applicable law. If you are not the intended
recipient or the person responsible for delivering the message to the
intended recipient, you are strictly prohibited from disclosing,
distributing, copying, or in any way using this message. If you have
received this communication in error, please notify the sender and
destroy and delete any copies you may have received.

http://www.bsc.es/disclaimer
___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users

Re: [Gluster-users] gluster volume not mounted on boot

2016-10-19 Thread Lindsay Mathieson

On 20/10/2016 2:17 AM, Josep Manel Andrés wrote:

Hi ,
I am trying to mount a volume during boot time,  here are the logs 
from boot.log, everything seems ok: 


Can we see

- your fstab entry for the gluster mount


- the client log (/var/log/gluster/-.log)

--
Lindsay Mathieson

___
Gluster-users mailing list
Gluster-users@gluster.org
http://www.gluster.org/mailman/listinfo/gluster-users