Well I'm stumped, just seems like the mount.glusterfs script isn't
working. I'm still running 3.5.1 and the getinode bit of my script looks
like this:
...
Linux)
getinode="stat -c %i $i"
...
inode=$( ${getinode} $mount_point 2>/dev/null);
# this is required if the stat returns error
if [ -z "$inode" ]; then
inode="0";
fi
if [ $inode -ne 1 ]; then
err=1;
fi
On Tue, 2015-01-27 at 09:12 +0100, Bart?omiej Syryjczyk
wrote:> W dniu 2015-01-27 o 09:08, Franco Broi pisze:
> > So what is the inode of your mounted gluster filesystem? And does
> > running 'mount' show it as being fuse.glusterfs?
> ---
> [root at apache2 ~]# stat -c %i /mnt/gluster
> 101729533
>
> [root at apache2 ~]# /usr/sbin/glusterfs --volfile-server=apache1
> --volfile-id=/testvol /mnt/gluster
>
> [root at apache2 ~]# stat -c %i /mnt/gluster
> 1
>
> [root at apache2 ~]# mount|grep fuse
> fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
> apache1:/testvol on /mnt/gluster type fuse.glusterfs
>
(rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)
> ---
>
Could this be a case of Oracle Linux being evil? On Tue, 2015-01-27 at 16:20 +0800, Franco Broi wrote:> Well I'm stumped, just seems like the mount.glusterfs script isn't > working. I'm still running 3.5.1 and the getinode bit of my script looks > like this: > > ... > Linux) > getinode="stat -c %i $i" > > ... > inode=$( ${getinode} $mount_point 2>/dev/null); > > # this is required if the stat returns error > if [ -z "$inode" ]; then > inode="0"; > fi > > if [ $inode -ne 1 ]; then > err=1; > fi > > > > On Tue, 2015-01-27 at 09:12 +0100, Bart?omiej Syryjczyk wrote: > > W dniu 2015-01-27 o 09:08, Franco Broi pisze: > > > So what is the inode of your mounted gluster filesystem? And does > > > running 'mount' show it as being fuse.glusterfs? > > --- > > [root at apache2 ~]# stat -c %i /mnt/gluster > > 101729533 > > > > [root at apache2 ~]# /usr/sbin/glusterfs --volfile-server=apache1 > > --volfile-id=/testvol /mnt/gluster > > > > [root at apache2 ~]# stat -c %i /mnt/gluster > > 1 > > > > [root at apache2 ~]# mount|grep fuse > > fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime) > > apache1:/testvol on /mnt/gluster type fuse.glusterfs > > (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072) > > --- > > > > > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://www.gluster.org/mailman/listinfo/gluster-users
W dniu 2015-01-27 o 09:20, Franco Broi pisze:> Well I'm stumped, just seems like the mount.glusterfs script isn't > working. I'm still running 3.5.1 and the getinode bit of my script looks > like this: > > ... > Linux) > getinode="stat -c %i $i" > > ... > inode=$( ${getinode} $mount_point 2>/dev/null); > > # this is required if the stat returns error > if [ -z "$inode" ]; then > inode="0"; > fi > > if [ $inode -ne 1 ]; then > err=1; > fi(My) script should check return code, not inode. There is right comment about that. Or maybe I don't understand construction in 298 line: --- [...] 49 Linux) 50 getinode="stat -c %i" [...] 298 inode=$( ${getinode} $mount_point 2>/dev/null); 299 # this is required if the stat returns error 300 if [ $? -ne 0 ]; then 301 warn "Mount failed. Please check the log file for more details." 302 umount $mount_point > /dev/null 2>&1; 303 exit 1; 304 fi --- When I paste between lines 298 and 300 something with 0 exit code, eg. echo $?; it works. With script from 3.6.1 package there was the same problem. -- Z powa?aniem, *Bart?omiej Syryjczyk*