Bug 1418454

Summary: [GSS] [RFE] Tool or option to reinitialize previously used bricks
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Cal Calhoun <ccalhoun>
Component: glusterdAssignee: Atin Mukherjee <amukherj>
Status: CLOSED DEFERRED QA Contact: Bala Konda Reddy M <bmekala>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: atumball, avishwan, bkunal, ccalhoun, hamiller, ppai, rcyriac, rhs-bugs, storage-qa-internal, vbellur
Target Milestone: ---Keywords: FutureFeature, RFE, ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-12 07:40:29 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: 1408949, 1468976, 1481177    

Description Cal Calhoun 2017-02-01 21:26:14 UTC
Description of problem:

  Some customers are making mistakes when attempting to re-initialize bricks for reuse.  This can result in data loss.  Currently there is no process to re-initialize a brick programmatically.

  It would be good to have a function, either an option to the gluster command or a stand-alone tool, that will correctly re-initialize a previously used brick so that it can be reused, while providing informative feedback to the user and requiring explicit confirmation prior to making unrecoverable changes.

  Additionally, it might be helpful to have the tool perform a rudimentary analysis of the brick (filesystem format, size, etc.) and report this to the user along with warnings if any of the suggested brick attributes are incorrect.

Comment 4 Bipin Kunal 2017-06-28 10:12:59 UTC
Hello Cal,

   You can always reuse the brick using "force" command when creating volume.
   
   What is your expectation with this RFE ? Do you wish to collect information of the old brick(like filesystem, size, used and free space, file count etc) and present to admin before using "force" option if he is trying to use old brick?

  Or do you want user not to accidentally use a brick which is already used by other volume?

-Bipin

Comment 5 Cal Calhoun 2017-07-18 17:37:07 UTC
@Bipin,

  The original case is now closed but I think some combination of both.  The intent being to prevent a user from inadvertently trashing a brick by mistake.

Comment 6 Bipin Kunal 2017-07-19 13:25:50 UTC
(In reply to Cal Calhoun from comment #5)
> @Bipin,
> 
>   The original case is now closed but I think some combination of both.  The
> intent being to prevent a user from inadvertently trashing a brick by
> mistake.

As of now we do have check and we are preventing a user to inadvertently trashing a brick by mistake.

What I think improvement here we can make is...
   As of now when we try to use a brick which is part of volume, it complains saying "brick already in use, use force to override ...something of this sort.
   In addition to this we can even inform, brick is part of which volumes.
   In case volume doesn't exist anymore, message can even indicate the volume doesn't exist any more.

Let me know how these changes sounds and do let us know if you have any more suggestion.

Comment 7 Cal Calhoun 2017-10-12 17:48:31 UTC
@Bipin, I think this would be a very good way to address the issue.

Comment 8 Atin Mukherjee 2018-04-08 13:32:06 UTC
Can be considered for an enhancement in GD2..

@PPai, Aravinda - request you to evaluate this for GD2.