Bug 1355846
Summary: | Data corruption when disabling sharding | ||
---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Alessandro Corbelli <alessandro.corbelli> |
Component: | sharding | Assignee: | Krutika Dhananjay <kdhananj> |
Status: | CLOSED EOL | QA Contact: | bugs <bugs> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.8 | CC: | alessandro.corbelli, amukherj, aspandey, bugs, kdhananj, pkarampu, ravishankar, smohan |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-11-07 10:36:36 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: |
Description
Alessandro Corbelli
2016-07-12 17:33:01 UTC
Thanks for the feedback. Until this is fixed, do you mind following the instruction documented at http://staged-gluster-docs.readthedocs.io/en/release3.7.0beta1/Features/shard/ : "... If you want to disable sharding on a volume, it is advisable to create a new volume without sharding and copy out contents of this volume into the new volume." -Krutika I wasn't aware of that paragraph in docs but can i suggest to block sharding disabling when shaded files exists until a "force" option is set? With data corruption you can't rely on a simple warning on docs Additionally what's would happen changing the shard size with existing shareded files? i think the same corruption would happen. Until a fix, gluster cli should block these kind ogmf changes for safety. (How can i edit my comment? I did many typo that i would like to correct) All 3.8.x bugs are now reported against version 3.8 (without .x). For more information, see http://www.gluster.org/pipermail/gluster-devel/2016-September/050859.html Is this fixed ? The ability to easily corrupt the whole cluster directly from a Gluster command, by changing the shard size, is very scary. There is no turn back, if you change the shard size on a filled cluster, older file are corrupted and newer files are saved with the new shard size. Thus, you can't go back. You have to revert the shard size to access the older files but you'll loose the newer files or viceversa, you have access to newer files but you lost the olders ones. This must be fixed. Don't allow users to change shard size when data are placed on the cluster. (or allow the change only with a --force argument or similar) Sorry about the late response. So you see this issue even when you change the shard-block-size on a volume? Or is this only if sharding itself is disabled altogether? We wrote sharding such that it would work even if shard-block-size on a volume is changed by storing the block-size property of every sharded file in the form of an extended attribute called "trusted.glusterfs.shard-block-size". Yes, the issue arise in these 2 cases: 1) disable the sharding on an shared volume with data on it 2) change the shard size on a sharded volume with data on it Another idea could be to store the shard size, for each file, on an xattr. In this case, when changing the shardsize, it won't affect existing file, as you can use the older shard size by reading it's value from the xattr. (In reply to Alessandro Corbelli from comment #7) > Yes, the issue arise in these 2 cases: > > 1) disable the sharding on an shared volume with data on it This is currently not fixed. The same is documented at http://staged-gluster-docs.readthedocs.io/en/release3.7.0beta1/Features/shard/ > 2) change the shard size on a sharded volume with data on it Hmm this is something I wasn't able to recreate. I tried it just now. Do you have a consistent recreatable test case for this? > > Another idea could be to store the shard size, for each file, on an xattr. > In this case, when changing the shardsize, it won't affect existing file, as > you can use the older shard size by reading it's value from the xattr. Yes, that is precisely what sharding does in its current state. It's the same thing I was referring to in comment #6. :) -Krutika Probably you are right. I don't remember exactly if changing the shard size would affect the stored data, but for sure, disabling sharding would break everything. You could still use sharding if the shard size is stored in xattr, ignoring the default for the volume Probably you are right. I don't remember exactly if changing the shard size would affect the stored data, but for sure, disabling sharding would break everything. You could still use sharding if the shard size is stored in xattr, ignoring the default for the volume Got it. So would it be safe to say comment #5 doesn't hold true anymore? -Krutika Yes, comment #5 is wrong. This bug is getting closed because the 3.8 version is marked End-Of-Life. There will be no further updates to this version. Please open a new bug against a version that still receives bugfixes if you are still facing this issue in a more current release. |