Bug 1170365

Summary: AFR+SNAPSHOT: File with hard link have different inode number in USS
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Anil Shah <ashah>
Component: snapshotAssignee: Vijaikumar Mallikarjuna <vmallika>
Status: CLOSED NEXTRELEASE QA Contact: Anil Shah <ashah>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rhgs-3.0CC: asengupt, asriram, nsathyan, rcyriac, rhinduja, rhs-bugs, smohan, storage-qa-internal, vmallika
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: USS
Fixed In Version: Doc Type: Known Issue
Doc Text:
Virtual inode numbers are generated for all the files in the .snaps directory. If there are hard links, they are assigned different inode numbers instead of the same inode number.
Story Points: ---
Clone Of:
: 1171703 1303591 (view as bug list) Environment:
Last Closed: 2016-02-01 11:50:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1153907, 1171703, 1303591, 1316099    

Description Anil Shah 2014-12-03 22:03:57 UTC
Description of problem:

File which is hard link to other file have different inode number in USS

Version-Release number of selected component (if applicable):

[root@harv b1]# rpm -qa | grep glusterfs
samba-glusterfs-3.6.509-169.1.el6rhs.x86_64
glusterfs-3.6.0.35-1.el6rhs.x86_64
glusterfs-server-3.6.0.35-1.el6rhs.x86_64
glusterfs-libs-3.6.0.35-1.el6rhs.x86_64
glusterfs-api-3.6.0.35-1.el6rhs.x86_64
glusterfs-cli-3.6.0.35-1.el6rhs.x86_64
glusterfs-geo-replication-3.6.0.35-1.el6rhs.x86_64
glusterfs-fuse-3.6.0.35-1.el6rhs.x86_64
glusterfs-rdma-3.6.0.35-1.el6rhs.x86_64


How reproducible:

100

Steps to Reproduce:

1.create 1*2 distribute replicate volume
2.  set the volume options 'metadata-self-heal' , 'entry-self-heal' and 'data-self-heal' to value “off”
3. set self-heal-daemon off
4. Create a fuse mount
5 create a file on mount point e.g echo "hellp World" >> myfile
6 create hard link to new file e.g ln myfile newfile
7  create snapshot snap3 e.g gluster snapshot create snap3 testvol 
8  activate the snapshot e.g gluster snapshot activate snap3
8  enable the USS e.g gluster volume set testvol features.uss enable
9  on mount point below execute command

root@dj [Dec-03-2014-21:57:21] >cd /mnt/glusterfs/
root@dj [Dec-03-2014-21:57:25] >cd .snaps
root@dj [Dec-03-2014-21:57:29] >cd snap3
root@dj [Dec-03-2014-21:57:35] >ls -i myfile 
12023324824155267871 myfile
root@dj [Dec-03-2014-21:57:47] >ls -i newfile 
11974396560344037603 newfile
root@dj [Dec-03-2014-21:57:54] >




Actual results:


root@dj [Dec-03-2014-21:57:35] >ls -i myfile 
12023324824155267871 myfile
root@dj [Dec-03-2014-21:57:47] >ls -i newfile 
11974396560344037603 newfile



Expected results:
 Inode number of both the  file should be same

Additional info:

[root@hicks b2]# gluster vol info
 
Volume Name: testvol
Type: Replicate
Volume ID: 6d8534a8-259c-4e9e-be34-23473312d281
Status: Started
Snap Volume: no
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 10.70.34.117:/rhs/brick1/b1
Brick2: 10.70.34.118:/rhs/brick1/b2
Options Reconfigured:
performance.open-behind: off
performance.quick-read: off
performance.io-cache: off
performance.read-ahead: off
performance.write-behind: off
features.uss: enable
features.barrier: disable
cluster.self-heal-daemon: off
cluster.entry-self-heal: off
cluster.metadata-self-heal: off
cluster.data-self-heal: off
performance.readdir-ahead: on
snap-max-hard-limit: 256
snap-max-soft-limit: 90
auto-delete: disable
[root@hicks b2]# 



Document URL: 

Section Number and Name: 

Describe the issue: 

Suggestions for improvement: 

Additional information:

Comment 2 Anil Shah 2014-12-03 22:27:53 UTC
Extended attributes of snap bricks after snapshot

[root@harv b1]#  getfattr -m. -d -e hex /var/run/gluster/snaps/87fc597633ba4d91bc0232c73a33f2b8/brick1/b1/myfile 
getfattr: Removing leading '/' from absolute path names
# file: var/run/gluster/snaps/87fc597633ba4d91bc0232c73a33f2b8/brick1/b1/myfile
trusted.gfid=0x9f0604ee03714a1d8659907e265a5ea7

[root@harv b1]#  getfattr -m. -d -e hex /var/run/gluster/snaps/87fc597633ba4d91bc0232c73a33f2b8/brick1/b1/newfile 
getfattr: Removing leading '/' from absolute path names
# file: var/run/gluster/snaps/87fc597633ba4d91bc0232c73a33f2b8/brick1/b1/newfile
trusted.gfid=0x9f0604ee03714a1d8659907e265a5ea7


[root@hicks b2]#  getfattr -m. -d -e hex /var/run/gluster/snaps/87fc597633ba4d91bc0232c73a33f2b8/brick2/b2/myfile 
getfattr: Removing leading '/' from absolute path names
# file: var/run/gluster/snaps/87fc597633ba4d91bc0232c73a33f2b8/brick2/b2/myfile
trusted.gfid=0x9f0604ee03714a1d8659907e265a5ea7

[root@hicks b2]#  getfattr -m. -d -e hex /var/run/gluster/snaps/87fc597633ba4d91bc0232c73a33f2b8/brick2/b2/newfile 
getfattr: Removing leading '/' from absolute path names
# file: var/run/gluster/snaps/87fc597633ba4d91bc0232c73a33f2b8/brick2/b2/newfile
trusted.gfid=0x9f0604ee03714a1d8659907e265a5ea7

===========================================================================
Extended Attributes of testvol volume 

[root@harv b1]#  getfattr -m. -d -e hex /var/run/gluster/snaps/442d75acda304b37b52ca6480cb1fb18/brick1/b1/newfile 
getfattr: Removing leading '/' from absolute path names
# file: var/run/gluster/snaps/442d75acda304b37b52ca6480cb1fb18/brick1/b1/newfile
trusted.afr.testvol-client-0=0x000000000000000000000000
trusted.afr.testvol-client-1=0x000000000000000000000000
trusted.gfid=0xfe1b5eb7bad2474daa7e75dfaffded26

[root@harv b1]#  getfattr -m. -d -e hex /var/run/gluster/snaps/442d75acda304b37b52ca6480cb1fb18/brick1/b1/myfile 
getfattr: Removing leading '/' from absolute path names
# file: var/run/gluster/snaps/442d75acda304b37b52ca6480cb1fb18/brick1/b1/myfile
trusted.afr.testvol-client-0=0x000000000000000000000000
trusted.afr.testvol-client-1=0x000000000000000000000000
trusted.gfid=0xfe1b5eb7bad2474daa7e75dfaffded26



[root@hicks b2]#  getfattr -m. -d -e hex /var/run/gluster/snaps/442d75acda304b37b52ca6480cb1fb18/brick2/b2/myfile 
getfattr: Removing leading '/' from absolute path names
# file: var/run/gluster/snaps/442d75acda304b37b52ca6480cb1fb18/brick2/b2/myfile
trusted.afr.testvol-client-0=0x000000000000000000000000
trusted.afr.testvol-client-1=0x000000000000000000000000
trusted.gfid=0xfe1b5eb7bad2474daa7e75dfaffded26

[root@hicks b2]#  getfattr -m. -d -e hex /var/run/gluster/snaps/442d75acda304b37b52ca6480cb1fb18/brick2/b2/newfile 
getfattr: Removing leading '/' from absolute path names
# file: var/run/gluster/snaps/442d75acda304b37b52ca6480cb1fb18/brick2/b2/newfile
trusted.afr.testvol-client-0=0x000000000000000000000000
trusted.afr.testvol-client-1=0x000000000000000000000000
trusted.gfid=0xfe1b5eb7bad2474daa7e75dfaffded26

Comment 4 Vijaikumar Mallikarjuna 2014-12-08 12:55:27 UTC
Patch submitted upstream: http://review.gluster.org/#/c/9255

Comment 5 Pavithra 2014-12-09 08:23:50 UTC
Hi Vijai,

I see this bug added as a known issue for the 3.0.3 release. Can you please change the doc type to known issue and add the doc text?

Comment 7 Pavithra 2014-12-16 10:38:32 UTC
Hi Vijai,

Can you please review the edited doc text and sign off on the technical accuracy?

Comment 8 Vijaikumar Mallikarjuna 2014-12-16 11:52:24 UTC
Doc-text looks good to me

Comment 9 Vijaikumar Mallikarjuna 2016-02-01 11:50:23 UTC
This bug will be fixed in 3.1.z and bug# 1303591 tracks the issue for 3.1