<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks Talur for sharing the commands. Once i start with the setup (hopefully next week), i will try these and let you know if i need further help on this.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br>Regards,</div><div class="gmail_default" style="font-family:verdana,sans-serif">Gaurav</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 5, 2017 at 5:07 PM, Raghavendra Talur <span dir="ltr">&lt;<a href="mailto:rtalur@redhat.com" target="_blank">rtalur@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Sep 29, 2017 at 6:28 PM, Raghavendra Talur &lt;<a href="mailto:rtalur@redhat.com">rtalur@redhat.com</a>&gt; wrote:<br>
&gt; On Thu, Sep 28, 2017 at 7:42 PM, Gaurav Chhabra<br>
&gt; &lt;<a href="mailto:varuag.chhabra@gmail.com">varuag.chhabra@gmail.com</a>&gt; wrote:<br>
&gt;&gt; Thanks for the response Talur. I will really appreciate if you already have<br>
&gt;&gt; the steps for cleaning up the setup so i could start afresh.<br>
&gt;&gt;<br>
&gt;<br>
&gt; I don&#39;t have the steps handy. Will work on it and send a PR on Monday.<br>
<br>
</span>I got delayed due to other issues.<br>
<br>
Here is a sample set of steps:<br>
<br>
I have<br>
<br>
[root@dhcp42-96 ~]# heketi-cli volume list<br>
Id:<wbr>0b83f800ef785ba6e889091f40f3d0<wbr>d2<br>
Cluster:<wbr>4151837e55c2c943e457e9c2b84ae1<wbr>c7<br>
Name:vol_<wbr>0b83f800ef785ba6e889091f40f3d0<wbr>d2<br>
Id:<wbr>0cb426c7677a10d96b0d50b58ddbed<wbr>d2<br>
Cluster:<wbr>4151837e55c2c943e457e9c2b84ae1<wbr>c7<br>
Name:vol_<wbr>0cb426c7677a10d96b0d50b58ddbed<wbr>d2<br>
Id:<wbr>17c98a4da7ef81fae4f364219920a1<wbr>cb<br>
Cluster:<wbr>4151837e55c2c943e457e9c2b84ae1<wbr>c7<br>
Name:vol_<wbr>17c98a4da7ef81fae4f364219920a1<wbr>cb<br>
Id:<wbr>23a4cfd7263155059d1d8c431840df<wbr>7e<br>
Cluster:<wbr>4151837e55c2c943e457e9c2b84ae1<wbr>c7    Name:heketidbstorage<br>
Id:<wbr>41ddd6957a762f5f174bc06bea2ffe<wbr>2a<br>
Cluster:<wbr>4151837e55c2c943e457e9c2b84ae1<wbr>c7<br>
Name:vol_<wbr>41ddd6957a762f5f174bc06bea2ffe<wbr>2a<br>
Id:<wbr>a7589a26144910f91ec7d1032c1e0e<wbr>76<br>
Cluster:<wbr>4151837e55c2c943e457e9c2b84ae1<wbr>c7<br>
Name:vol_<wbr>a7589a26144910f91ec7d1032c1e0e<wbr>76<br>
<br>
[root@dhcp42-96 ~]# heketi-cli topology info | grep -e &quot;Used&quot;<br>
                Id:<wbr>9a6eb125daece741716034c4684a36<wbr>87   Name:/dev/vdd<br>
        State:online    Size (GiB):499     Used (GiB):6       Free<br>
(GiB):493<br>
                Id:<wbr>d3ca1aff8d9f210b2d5bdb09525cf1<wbr>fe   Name:/dev/vdb<br>
        State:online    Size (GiB):499     Used (GiB):8       Free<br>
(GiB):491<br>
                Id:<wbr>486b9e044b3caaa5f47aba35de22cd<wbr>9e   Name:/dev/vdb<br>
        State:online    Size (GiB):499     Used (GiB):7       Free<br>
(GiB):492<br>
                Id:<wbr>f7a58f8760eab2a7d5917baf6b367a<wbr>97   Name:/dev/vdd<br>
        State:online    Size (GiB):499     Used (GiB):7       Free<br>
(GiB):492<br>
                Id:<wbr>2812a51a72ed6735995d1368c36a48<wbr>99   Name:/dev/vdd<br>
        State:online    Size (GiB):499     Used (GiB):5       Free<br>
(GiB):494<br>
                Id:<wbr>c2128fe17a620ce70821aaf7587dc4<wbr>8f   Name:/dev/vdb<br>
        State:online    Size (GiB):499     Used (GiB):9       Free<br>
(GiB):490<br>
<br>
6 volumes and 6 disks.<br>
<br>
Then we delete volumes, except the *heketidbstorage* volumes<br>
[root@dhcp42-96 ~]# heketi-cli volume delete 0b83f800ef785ba6e889091f40f3d0<wbr>d2<br>
[root@dhcp42-96 ~]# heketi-cli volume delete 0cb426c7677a10d96b0d50b58ddbed<wbr>d2<br>
[root@dhcp42-96 ~]# heketi-cli volume delete 17c98a4da7ef81fae4f364219920a1<wbr>cb<br>
[root@dhcp42-96 ~]# heketi-cli volume delete 41ddd6957a762f5f174bc06bea2ffe<wbr>2a<br>
[root@dhcp42-96 ~]# heketi-cli volume delete a7589a26144910f91ec7d1032c1e0e<wbr>76<br>
<br>
Now the state is<br>
[root@dhcp42-96 ~]# heketi-cli topology info | grep -e &quot;Used&quot;<br>
                Id:<wbr>9a6eb125daece741716034c4684a36<wbr>87   Name:/dev/vdd<br>
        State:online    Size (GiB):499     Used (GiB):0       Free<br>
(GiB):499<br>
                Id:<wbr>d3ca1aff8d9f210b2d5bdb09525cf1<wbr>fe   Name:/dev/vdb<br>
        State:online    Size (GiB):499     Used (GiB):2       Free<br>
(GiB):497<br>
                Id:<wbr>486b9e044b3caaa5f47aba35de22cd<wbr>9e   Name:/dev/vdb<br>
        State:online    Size (GiB):499     Used (GiB):2       Free<br>
(GiB):497<br>
                Id:<wbr>f7a58f8760eab2a7d5917baf6b367a<wbr>97   Name:/dev/vdd<br>
        State:online    Size (GiB):499     Used (GiB):0       Free<br>
(GiB):499<br>
                Id:<wbr>2812a51a72ed6735995d1368c36a48<wbr>99   Name:/dev/vdd<br>
        State:online    Size (GiB):499     Used (GiB):0       Free<br>
(GiB):499<br>
                Id:<wbr>c2128fe17a620ce70821aaf7587dc4<wbr>8f   Name:/dev/vdb<br>
        State:online    Size (GiB):499     Used (GiB):2       Free<br>
(GiB):497<br>
<br>
Then I was able to delete the 3 empty devices above<br>
[root@dhcp42-96 ~]# heketi-cli device delete 2812a51a72ed6735995d1368c36a48<wbr>99<br>
[root@dhcp42-96 ~]# heketi-cli device delete f7a58f8760eab2a7d5917baf6b367a<wbr>97<br>
[root@dhcp42-96 ~]# heketi-cli device delete 9a6eb125daece741716034c4684a36<wbr>87<br>
<br>
<br>
[root@dhcp42-96 ~]# heketi-cli topology info | grep -e &quot;Used&quot;<br>
                Id:<wbr>d3ca1aff8d9f210b2d5bdb09525cf1<wbr>fe   Name:/dev/vdb<br>
        State:online    Size (GiB):499     Used (GiB):2       Free<br>
(GiB):497<br>
                Id:<wbr>486b9e044b3caaa5f47aba35de22cd<wbr>9e   Name:/dev/vdb<br>
        State:online    Size (GiB):499     Used (GiB):2       Free<br>
(GiB):497<br>
                Id:<wbr>c2128fe17a620ce70821aaf7587dc4<wbr>8f   Name:/dev/vdb<br>
        State:online    Size (GiB):499     Used (GiB):2       Free<br>
(GiB):497<br>
<br>
<br>
The above procedures work if you are ok with deleting the volumes.<br>
In the scenarios where you can&#39;t, follow steps to disable device,<br>
remove device and then delete device.<br>
<br>
If you have more specific scenario, please let us know.<br>
<span class="HOEnZb"><font color="#888888"><br>
Talur<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Gaurav<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Sep 28, 2017 at 5:36 PM, Raghavendra Talur &lt;<a href="mailto:rtalur@redhat.com">rtalur@redhat.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Wed, Sep 27, 2017 at 11:27 PM, Gaurav Chhabra<br>
&gt;&gt;&gt; &lt;<a href="mailto:varuag.chhabra@gmail.com">varuag.chhabra@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; &gt; Hi,<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; I tried setting up Gluster cluster on Google cloud. It went fine. I<br>
&gt;&gt;&gt; &gt; always<br>
&gt;&gt;&gt; &gt; stop the test instances when not in use. One day, when i started my<br>
&gt;&gt;&gt; &gt; Gluster<br>
&gt;&gt;&gt; &gt; instances, few bricks went offline and i tried bringing them up but i<br>
&gt;&gt;&gt; &gt; couldn&#39;t. I then tried removing the volumes but it gave me error related<br>
&gt;&gt;&gt; &gt; to<br>
&gt;&gt;&gt; &gt; &quot;device in use&quot; and i think i also saw &quot;bricks in use&quot; messages. I tried<br>
&gt;&gt;&gt; &gt; removing bricks but i couldn&#39;t. I finally thought of removing the extra<br>
&gt;&gt;&gt; &gt; raw<br>
&gt;&gt;&gt; &gt; disks from all nodes that i initially added. But i guess Heketi was<br>
&gt;&gt;&gt; &gt; unable<br>
&gt;&gt;&gt; &gt; to forget its past. I finally had to discard all the machines and<br>
&gt;&gt;&gt; &gt; created a<br>
&gt;&gt;&gt; &gt; fresh three node cluster. :( All i wanted was to have a clean slate to<br>
&gt;&gt;&gt; &gt; start<br>
&gt;&gt;&gt; &gt; with. In next two-three days, i will be starting with the actual setup<br>
&gt;&gt;&gt; &gt; on<br>
&gt;&gt;&gt; &gt; live environment and using it for managing Kubernetes. Though in that<br>
&gt;&gt;&gt; &gt; case,<br>
&gt;&gt;&gt; &gt; i will not be shutting down the cluster when not in use :) but i am<br>
&gt;&gt;&gt; &gt; wondering if there is a way of resetting all things (bricks, volumes,<br>
&gt;&gt;&gt; &gt; devices, nodes) in Gluster and Heketi, if such case arises, so i could<br>
&gt;&gt;&gt; &gt; start<br>
&gt;&gt;&gt; &gt; afresh with the Heketi setup. Data backup is not a concern here as i am<br>
&gt;&gt;&gt; &gt; considering this scenario only during the initial setup phase.<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; Regards,<br>
&gt;&gt;&gt; &gt; Gaurav<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Heketi does provide you mechanism to disable and remove devices/nodes.<br>
&gt;&gt;&gt; Once that is performed you can delete them. Yes, it is a iterative<br>
&gt;&gt;&gt; process at the end of which you will be left with nothing in topology.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; One thing to note is that you need to clean the disks of partition<br>
&gt;&gt;&gt; info for heketi to reuse them.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Also, everything that heketi knows is in the db. If you delete the db<br>
&gt;&gt;&gt; file you have essentially created a fresh heketi instance. You will<br>
&gt;&gt;&gt; still have to clean the disks and gluster information though.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Let us know if you are looking for a step by step guide to get this done.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Talur<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; &gt; ______________________________<wbr>_________________<br>
&gt;&gt;&gt; &gt; heketi-devel mailing list<br>
&gt;&gt;&gt; &gt; <a href="mailto:heketi-devel@gluster.org">heketi-devel@gluster.org</a><br>
&gt;&gt;&gt; &gt; <a href="http://lists.gluster.org/mailman/listinfo/heketi-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/<wbr>mailman/listinfo/heketi-devel</a><br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
</div></div></blockquote></div><br></div>