Description of problem: Calling glfs_stat on a file or directory will return a garbage device ID (stat.st_dev). Version-Release number of selected component (if applicable): GlusterFS 3.6.3, GFAPI_3.4.0 How reproducible: Reproducible while building the coreutils for gluster. Steps to Reproduce: 1. 2. 3. Actual results: "Device: 2b630e2eh/727911982d" from running glfs_stat on the file in the volume. Expected results: "Device: 803h/2051d" from running stat directly on the file in the brick dir. Additional info:
Soumya, maybe reassign this to Shyam, or someone else if appropriate?
Craig, Could you confirm if you see this issue with all types of files or for only particular types?
Sorry for the delayed response. It appears to be an issue for: * regular files * symbolic links * character special files * block special files Also, FWIW, it looks like the Inode number is also butchered (both via the gfapi and the FUSE mount), but I'm not sure is this is just a normal Gluster function.
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.
Device ID and inode are expected to be different from the values on the bricks. Ideally the device ID is the same for all files on the Gluster volume, and does not relate to the device ID on the brick. The inode needs to be different, because in a distributed volume the inode from a brick can exist multiple times in a Gluster volume. For replication the inode does not need to be the same on all the bricks. What is you expectation of the device ID when you take the above in account? Have you seen the device ID change for different glfs_stat() calls on the same volume?
Tried with python bindings of gfapim, issue not reproducible, device id is same for all dirs and files also >>> from gluster import gfapi >>> vol = gfapi.Volume('gluster2','test2') >>> vol.mount() >>> vol.umount() >>> vol.mount() >>> vol.listdir('/') ['venkat', 'venkat2'] >>> list_en = vol.listdir_with_stat('/') >>> for i in list_en: ... stat = i[1] ... print(stat.st_dev) ... 991776632 991776632 >>> with vol.fopen("/venkat/f1", 'wb') as f: ... f.write("hello world") ... 11 >>> with vol.fopen("/venkat/f2", 'wb') as f: ... f.write("hello gluster") ... 13 >>> list_files = vol.listdir_with_stat('/venkat') >>> for entry in list_files: ... stat = entry[1] ... print(stat.st_dev) ... 991776632 991776632 991776632
As per c#6, the issue is not seen in latest gluster versions hence closing this bug as fixed in current release
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days