Bug 1288006 - database having entry for even linkfiles which are created in cold tier for the respective file in hot tier
Summary: database having entry for even linkfiles which are created in cold tier for t...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: tier
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Lambright
QA Contact: Nag Pavan Chilakam
URL:
Whiteboard: tier-migration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-03 10:00 UTC by Nag Pavan Chilakam
Modified: 2019-04-03 09:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-03 14:36:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Nag Pavan Chilakam 2015-12-03 10:00:24 UTC
Description of problem:
=======================
When a file is promoted to hot tier, it leaves a link file in cold tier, as coldtier is the hashed subvol.
Now due to this, even the tfile is having an entry in the database which is not required.


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


Following is the db log for a file called file10.txt

 echo "===========Date=====================";date; echo "=============ColdBrick#1 =========" ;  echo "select * from gf_file_tb; select * from gf_flink_tb;" | sqlite3 /rhs/brick1/dbase/.glusterfs/dbase.db; echo "=============ColdBrick#2  =========" ;  echo "select * from gf_file_tb; select * from  gf_flink_tb;" | sqlite3 /rhs/brick2/dbase/.glusterfs/dbase.db; echo ">>>>>>>>>>>> HOTBRICK#1 <<<<<<<<==";echo "select * from gf_file_tb; select * from gf_flink_tb;" | sqlite3 /rhs/brick5/1/brick1007/dbase_hot/.glusterfs/dbase_hot.db;
=============ColdBrick#2  =========

6f60d9b7-992c-46cd-87b8-6d966a8f74c1|0|0|0|0|0|0|0|0|0|0
d7fa7bf9-92d7-434d-8b3f-6c5ee8505d71|0|0|0|0|0|0|0|0|0|0
26255ab6-8823-42f6-b958-ecba27ab0e5f|1449135994|798973|0|0|0|0|0|0|0|0
b1c49365-ffd3-46fd-8f7e-ec3de3ffd97c|0|0|0|0|0|0|0|0|0|0

6f60d9b7-992c-46cd-87b8-6d966a8f74c1|4a8c24e6-43b2-4a38-8718-4dd5fd496208|file7.txt|/redun/file7.txt|0|0
d7fa7bf9-92d7-434d-8b3f-6c5ee8505d71|4a8c24e6-43b2-4a38-8718-4dd5fd496208|file9.txt|/redun/file9.txt|0|0
26255ab6-8823-42f6-b958-ecba27ab0e5f|4a8c24e6-43b2-4a38-8718-4dd5fd496208|file10.txt|/redun/file10.txt|0|0
b1c49365-ffd3-46fd-8f7e-ec3de3ffd97c|4a8c24e6-43b2-4a38-8718-4dd5fd496208|file11.txt|/redun/file11.txt|0|0

>>>>>>>>>>>> HOTBRICK#1 <<<<<<<<==
18b95c0e-4958-442c-adf6-dae4dd6d8196|1449135052|655154|0|0|1449135054|658613|0|0|0|0
26255ab6-8823-42f6-b958-ecba27ab0e5f|1449136393|881950|0|0|0|0|0|0|0|0
18b95c0e-4958-442c-adf6-dae4dd6d8196|00000000-0000-0000-0000-000000000001|f1|/f1|0|0
26255ab6-8823-42f6-b958-ecba27ab0e5f|4a8c24e6-43b2-4a38-8718-4dd5fd496208|file10.txt|/redun/file10.txt|0|0
[root@zod ~]# 



cold link file
[root@zod ~]# ll /rhs/brick*/dbase/redun/file10.txt 
---------T. 2 root root 0 Dec  3 15:18 /rhs/brick2/dbase/redun/file10.txt

hot data file
[root@zod ~]# ll /rhs/brick5/1/brick1007/dbase_hot/redun/file10.txt 
-rw-r--r--. 2 root root 57779 Dec  3 15:23 /rhs/brick5/1/brick1007/dbase_hot/redun/file10.txt



How reproducible:
============
easily

Steps to Reproduce:
=====================
1.create a regular volume and have some legacy file sbefore attach of tier
2.now once tier is attached, heat one the file with making a write.
3.Now you can see that the db has entry even for the link file




gvol status


[root@zod ~]# gluster v tier dbase status
Node                 Promoted files       Demoted files        Status              
---------            ---------            ---------            ---------           
localhost            1                    0                    in progress         
10.70.34.43          0                    0                    in progress         
Tiering Migration Functionality: dbase: success


[root@zod ~]# gluster v info dbase
 
Volume Name: dbase
Type: Tier
Volume ID: 12604629-5dda-4cc8-a80b-f6ee0bc1e4bf
Status: Started
Number of Bricks: 6
Transport-type: tcp
Hot Tier :
Hot Tier Type : Replicate
Number of Bricks: 1 x 2 = 2
Brick1: yarrow:/rhs/brick5/1/brick1007/dbase_hot
Brick2: zod:/rhs/brick5/1/brick1007/dbase_hot
Cold Tier:
Cold Tier Type : Distributed-Replicate
Number of Bricks: 2 x 2 = 4
Brick3: zod:/rhs/brick1/dbase
Brick4: yarrow:/rhs/brick1/dbase
Brick5: zod:/rhs/brick2/dbase
Brick6: yarrow:/rhs/brick2/dbase
Options Reconfigured:
cluster.tier-mode: cache
features.ctr-enabled: on
performance.quick-read: off
performance.io-cache: off
performance.readdir-ahead: on

Comment 5 Joseph Elwin Fernandes 2016-03-03 14:36:35 UTC
The link file entry in the cold tier is needed as migration will not create the entry. This is an expected behavior


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