LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-30-2018, 08:24 PM   #1
Finsfree
Member
 
Registered: Aug 2018
Location: 3rd rock from the sun
Distribution: Ubuntu, Mint & Kali
Posts: 72

Rep: Reputation: Disabled
How can I remove a Volume Group?


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.
Attached Thumbnails
Click image for larger version

Name:	vg.JPG
Views:	16
Size:	69.5 KB
ID:	29347   Click image for larger version

Name:	display.JPG
Views:	17
Size:	36.1 KB
ID:	29348  

Last edited by Finsfree; 12-30-2018 at 08:35 PM.
 
Old 12-30-2018, 10:44 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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.

Last edited by berndbausch; 12-30-2018 at 10:45 PM.
 
1 members found this post helpful.
Old 12-31-2018, 01:09 PM   #3
Finsfree
Member
 
Registered: Aug 2018
Location: 3rd rock from the sun
Distribution: Ubuntu, Mint & Kali
Posts: 72

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
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
Attached Thumbnails
Click image for larger version

Name:	Capture2.JPG
Views:	4
Size:	132.7 KB
ID:	29357  

Last edited by Finsfree; 12-31-2018 at 01:15 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
Map/Mount Volume Group Folder to Volume Group Folder??? Led Zappa Linux - Newbie 4 09-21-2013 04:12 PM
I have spce in volume group but it can not increase the size of logical volume anis123 Linux - Newbie 14 04-16-2012 06:23 AM
can't recover LVM volume: Please specify a *single* volume group to restore SoftDux Linux - General 1 08-04-2011 03:31 PM
[SOLVED] Redhat volume group,logical volume group dhairysheel Red Hat 3 08-02-2011 05:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration