LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How can I remove a Volume Group? (https://www.linuxquestions.org/questions/linux-software-2/how-can-i-remove-a-volume-group-4175645244/)

Finsfree 12-30-2018 09:24 PM

How can I remove a Volume Group?
 
2 Attachment(s)
I have created some volume groups and used them as iscsi targets, but now I want to remove them and start all over. There is nothing on these volumes that I want.

I have tried the command "vgremove" but it fails and says the volume is in use.

berndbausch 12-30-2018 11:44 PM

First remove the volume from your iSCSI target.

Next, use lvremove to remove the volume. This step is not really required, but in my opinion it's a good practice to do this consciously rather than typing "y" at the question of vgremove. You should be aware what you are removing, and always think twice if you really want to remove data. Lecture over :)

When the volume group has no volumes left, remove the volume group.

Finsfree 12-31-2018 02:09 PM

1 Attachment(s)
Quote:

Originally Posted by berndbausch (Post 5943071)
First remove the volume from your iSCSI target.

Next, use lvremove to remove the volume. This step is not really required, but in my opinion it's a good practice to do this consciously rather than typing "y" at the question of vgremove. You should be aware what you are removing, and always think twice if you really want to remove data. Lecture over :)

When the volume group has no volumes left, remove the volume group.

Yes, that worked like a charm.

I actually figured this out on my own and was coming back to this post to update anyone that was having this issue. What I did was remove the block in targetcli under /backstores/block and that did it. I was able to use "vgremove" to remove the volume group. Thanks though.

Now, how to create NFS shares? I'll create another thread for that.

Thanks again


All times are GMT -5. The time now is 09:33 AM.