Bug 1252302 - Inconsistent stat (ls -l) results when using BD xlator
Summary: Inconsistent stat (ls -l) results when using BD xlator
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: GlusterFS
Classification: Community
Component: qemu-block
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-11 06:53 UTC by Salvador Ortiz
Modified: 2018-11-19 08:52 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-11-19 08:52:23 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Salvador Ortiz 2015-08-11 06:53:39 UTC
Description of problem:
Only the first "ls -l" after fuse-mount a replica 2 volume using BD xlator, shows the expected values (sizes, mtime, etc). The volumes works as expected with qemu but virsh and virt-manager show lvs with a zero size.

Version-Release number of selected component (if applicable):
Fedora 22
GlusterFS 3.6.4

Steps to Reproduce:
1. fuse mount a glusterfs volume with some lvs exported
2. ls -lh the mount point
3. ls -lh again.

Actual results:
The second and subsequent ls, show the attrs of the posix brick, not the ones generated by the db xlator. Other operations show inconsistent results.

Example:
[root@monica mnt]# mount -t glusterfs erika:matias tt
[root@monica mnt]# ls -lh tt
total 514G
-rw-r--r--. 1 qemu root 120G Aug 11 00:32 all_sog
-rw-r--r--. 1 root root    0 Jul 28 07:48 devel
-rw-r--r--. 1 qemu root  90G Aug 11 00:32 extras
-rw-r--r--. 1 qemu root 300G Aug 11 00:41 mirrors
-rw-r--r--. 1 root root    0 Jul 28 07:48 people
-rw-r--r--. 1 qemu root 4.0G Aug 11 00:40 TamTest
[root@monica mnt]# ls -lh tt
total 0
-rw-r--r--. 1 qemu qemu 0 Aug 10 14:15 all_sog
-rw-r--r--. 1 root root 0 Jul 28 07:48 devel
-rw-r--r--. 1 qemu qemu 0 Aug 10 14:15 extras
-rw-r--r--. 1 qemu qemu 0 Aug 11 00:41 mirrors
-rw-r--r--. 1 root root 0 Jul 28 07:48 people
-rw-r--r--. 1 qemu qemu 0 Aug 11 00:40 TamTest
[root@monica mnt]# cd tt
[root@monica tt]# stat mirrors 
  File: ‘mirrors’
  Size: 0         	Blocks: 0          IO Block: 131072 regular empty file
Device: 2eh/46d	Inode: 12349220777661360721  Links: 1
Access: (0644/-rw-r--r--)  Uid: (  107/    qemu)   Gid: (  107/    qemu)
Context: system_u:object_r:fusefs_t:s0
Access: 2015-08-11 01:33:50.734322000 -0500
Modify: 2015-08-11 01:33:50.734322000 -0500
Change: 2015-08-11 01:33:50.734560428 -0500
 Birth: -
[root@monica tt]# stat mirrors 
  File: ‘mirrors’
  Size: 322122547200	Blocks: 629145600  IO Block: 131072 regular file
Device: 2eh/46d	Inode: 12349220777661360721  Links: 1
Access: (0644/-rw-r--r--)  Uid: (  107/    qemu)   Gid: (    0/    root)
Context: system_u:object_r:fusefs_t:s0
Access: 2015-08-05 12:41:47.440154000 -0500
Modify: 2015-08-11 01:34:02.702373769 -0500
Change: 2015-08-11 00:29:34.679467362 -0500

Additional info:
[root@erika ~]# gluster volume info matias
 
Volume Name: matias
Type: Replicate
Volume ID: 005ed81a-de13-442d-b56d-d1f4c65da71f
Status: Started
Xlator 1: BD
Capability 1: offload_copy
Capability 2: offload_snapshot
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: erika:/mnt/CommonBR/bd-meta
Brick1 VG: matias_uno
Brick2: xiomara:/mnt/CommonBR/bd-meta
Brick2 VG: matias_dos
Options Reconfigured:
cluster.server-quorum-type: none
cluster.quorum-type: auto
network.remote-dio: enable
cluster.eager-lock: enable
performance.stat-prefetch: off
performance.io-cache: off
performance.read-ahead: off
performance.quick-read: off
server.allow-insecure: on
storage.owner-gid: 36
storage.owner-uid: 107
nfs.disable: on
performance.open-behind: off

Additional observation:
When mounting with '-o use-readdirp=off' the problem goes away.

Comment 1 Kaushal 2016-08-30 12:58:09 UTC
GlusterFS-3.6 is nearing its End-Of-Life, only important security bugs still make a chance on getting fixed. Moving this to the mainline 'version'. If this needs to get fixed in 3.7 or 3.8 this bug should get cloned.

Comment 2 Vijay Bellur 2018-11-19 08:52:23 UTC
Thank you for your report.

block device translator is no longer being maintained. Hence closing this bug.


Note You need to log in before you can comment on or make changes to this bug.