Unix/Linux Go Back    


Filesystems, Disks and Memory Discuss NAS, SAN, RAID, Robotic Libraries, backup devices, RAM, DRAM, SCSI, IDE, EIDE topics here.

Removing a PV from a VG that hasn't been used

Filesystems, Disks and Memory


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 02-07-2013   -   Original Discussion by hpimentel
hpimentel's Unix or Linux Image
hpimentel hpimentel is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 24 February 2013, 3:37 PM EST
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Removing a PV from a VG that hasn't been used

Hi all,

So, I have the following setup:

- Ubuntu 12,04
- 1 6TB physical volume (the one with data) [ext4]
- 1 13TB PV (no data... I think?) [ext4]

Here is the story...

- I created an ext4 on the 13TB PV, added the 13TB to the VG to make a 13TB volume group.
- Everything went fine and then I ran:


Code:
resize2fs /dev/volgroup/volume

And to my surprise.. I couldn't resize past 16TB ! (crap! should have checked this first!).

So, nothing happened.. Now what I want to do is remove the 13TB PV from the VG and do something else with it... but I get the following error:



Code:
sudo vgreduce -t home_volume_group /dev/sdc1
  Test mode: Metadata will NOT be updated.
  Physical volume "/dev/sdc1" still in use

How can I safely remove this PV from the VG?


Thanks a bunch!

Harold
Sponsored Links
    #2  
Old Unix and Linux 02-07-2013   -   Original Discussion by hpimentel
zazzybob's Unix or Linux Image
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 2 October 2017, 12:19 PM EDT
Location: /dev/null
Posts: 2,187
Thanks: 3
Thanked 25 Times in 23 Posts
Have you tried an lvremove to remove it?
Sponsored Links
    #3  
Old Unix and Linux 02-07-2013   -   Original Discussion by hpimentel
hpimentel's Unix or Linux Image
hpimentel hpimentel is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 24 February 2013, 3:37 PM EST
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
No I haven't.

Excuse my ignorance... but would that do anything to the data on the logical volume? I want to keep the data on the first PV.

Are you saying i could just remove the logical volume and then recreate another one later without loss of data?

Thanks
    #4  
Old Unix and Linux 02-28-2013   -   Original Discussion by hpimentel
Peasant's Unix or Linux Image
Peasant Peasant is online now Forum Advisor  
Registered User
 
Join Date: Mar 2011
Last Activity: 23 June 2018, 4:06 PM EDT
Posts: 1,189
Thanks: 32
Thanked 363 Times in 313 Posts
Since you already expanded the logical volume, the extents are already being used by that LVOL.
You can check that with lvdisplay -m <lvol in question>.

After resize2fs, did the mentioned filesystem increased in size (even partial?)

If yes, you will need to put the new disk inside, and use pvmove to move the extents from that disk to new one.

After that you can use vgreduce.

Can you please post the output of
lvdisplay -m LVOL
vgdisplay -v VOLUMEGROUP

Also df output would be useful.
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
zpool hasn't expanded rudigarude Solaris 2 08-29-2012 05:01 AM
Removing all the duplicates pandeesh Emergency UNIX and Linux Support 9 08-16-2011 06:41 AM
Removing ^M from a file pgmfourms Shell Programming and Scripting 5 04-23-2009 05:51 AM
removing duplicates stevie_velvet Shell Programming and Scripting 5 07-07-2008 07:42 AM
removing certain tabs djkane Shell Programming and Scripting 2 08-17-2006 05:58 AM



All times are GMT -4. The time now is 04:08 PM.