New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First letter in mount path of bricks are getting truncated for every volume. #1480
Comments
@nik-redhat I could reproduce this issue every time. Please send out a fix. |
A patch https://review.gluster.org/24989 has been posted that references this issue. glusterd: mount directory getting truncated on mounting shared_storage Issue: Fix: Fixes: #1480 Change-Id: Id31bb13f58134ae2099884fbc5984c4e055fb357 |
Issue: In case of a user created volume the mount point is the brick path 'ex: /data/brick' but in case of shared_storage the mount point is '/'.So, here we increment the array by one so as to get the exact path of brick without '/', which works fine for other volumes as the pointer of the brick_dir variable is at '/', but for shared_storage it is at 'v'(where v is starting letter of 'var' directory). So, on incrementing the path we get in case of shared_storage starts from 'ar/lib/glusterd/...' Fix: Only, increment the pointer if the current position is '/', else the path will be wrong. >Fixes: gluster#1480 >Change-Id: Id31bb13f58134ae2099884fbc5984c4e055fb357 >Signed-off-by: nik-redhat <nladha@redhat.com> Upstream patch: https://review.gluster.org/c/glusterfs/+/24989 BUG: 1878077 Change-Id: Id31bb13f58134ae2099884fbc5984c4e055fb357 Signed-off-by: nik-redhat <nladha@redhat.com> Reviewed-on: https://code.engineering.redhat.com/gerrit/220536 Tested-by: RHGS Build Bot <nigelb@redhat.com> Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
Description of problem:
Volume Name: master
Type: Distributed-Replicate
Volume ID: d6c52eee-0121-4944-89b6-3630fe14dbc2
Status: Started
Snapshot Count: 0
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: vm1:/d/backends/master1
Brick2: vm1:/d/backends/master2
Brick3: vm1:/d/backends/master3
Brick4: vm1:/d/backends/master4
Options Reconfigured:
changelog.changelog: on
geo-replication.ignore-pid-check: on
geo-replication.indexing: on
storage.fips-mode-rchecksum: on
transport.address-family: inet
nfs.disable: on
performance.client-io-threads: off
[root@vm1 bricks]# grep -nR mount /var/lib/glusterd/vols/master/bricks/
/var/lib/glusterd/vols/master/bricks/vm1:-d-backends-master1:9:mount_dir=//backends/master1
/var/lib/glusterd/vols/master/bricks/vm1:-d-backends-master4:9:mount_dir=//backends/master4
/var/lib/glusterd/vols/master/bricks/vm1:-d-backends-master2:9:mount_dir=//backends/master2
/var/lib/glusterd/vols/master/bricks/vm1:-d-backends-master3:9:mount_dir=//backends/master3
[root@vm1 bricks]# ls //backends/master1
ls: cannot access '//backends/master1': No such file or directory
[root@vm1 bricks]#ls /d/backends/master1/.glusterfs/
Here letter d in /d/backends/master1/.glusterfs/ is getting truncated into //backends/master1
It is observed that first letter is getting truncated in mount path of brick inside /var/lib/glusterd/vols/master/bricks/vm1:-d-backends-master{1..4}: for all the instances of volume creation.
The exact command to reproduce the issue
create any gluster volume
#gluster volume create vol-name ip:brick force
start the gluster volume
#gluster volume start vol-name
mount the volume to a mount point
#mount -t glusterfs ip:vol-name mount-point
grep for mount under /var/lib/glusterd/vols/vol_name/bricks/
The full output of the command that failed:
[root@vm1 bricks]# grep -nR mount /var/lib/glusterd/vols/ma/bricks/
/var/lib/glusterd/vols/ma/bricks/vm1:-e1:9:mount_dir=/1
/var/lib/glusterd/vols/ma/bricks/vm1:-e2:9:mount_dir=/2
/var/lib/glusterd/vols/ma/bricks/vm1:-e3:9:mount_dir=/3
Expected results:
[root@vm1 bricks]# grep -nR mount /var/lib/glusterd/vols/ma/bricks/
/var/lib/glusterd/vols/ma/bricks/vm1:-e1:9:mount_dir=/e1
/var/lib/glusterd/vols/ma/bricks/vm1:-e2:9:mount_dir=/e2
/var/lib/glusterd/vols/ma/bricks/vm1:-e3:9:mount_dir=/e3
- The output of the
gluster volume info
command:Volume Name: ma
Type: Distribute
Volume ID: 7767732e-558d-4fd3-ad79-931615c51657
Status: Started
Snapshot Count: 0
Number of Bricks: 3
Transport-type: tcp
Bricks:
Brick1: vm1:/e1
Brick2: vm1:/e2
Brick3: vm1:/e3
Options Reconfigured:
storage.fips-mode-rchecksum: on
transport.address-family: inet
nfs.disable: on
The text was updated successfully, but these errors were encountered: