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


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 02-07-2013
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
# 3  
Old 02-07-2013
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 02-28-2013
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.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Help in Removing the Old files SeenuGuddu UNIX for Dummies Questions & Answers 1 03-11-2016 11:40 AM
Removing PATTERN from txt without removing lines and general text formatting AxeHandle UNIX for Dummies Questions & Answers 5 09-24-2014 12:12 AM
zpool hasn't expanded rudigarude Solaris 2 08-29-2012 05:01 AM
removing last character rkumar28 Shell Programming and Scripting 1 08-04-2011 03:07 PM
removing duplicates. raju4u UNIX for Advanced & Expert Users 7 03-19-2011 07:45 PM
Help with removing \n from a string in C omega666 Programming 12 02-10-2011 12:10 AM
Help with removing files learnbash Shell Programming and Scripting 2 07-28-2010 02:33 AM
removing a space phil_heath Shell Programming and Scripting 5 08-18-2009 06:42 PM
Vi - removing last word ravi.sadani19 Shell Programming and Scripting 4 06-16-2009 01:38 AM
removing duplicates stevie_velvet Shell Programming and Scripting 5 07-07-2008 07:42 AM
removing space surenz298 Shell Programming and Scripting 6 06-30-2008 10:41 AM
Removing ^D and ^H characters arsheshadri HP-UX 1 06-26-2008 08:01 AM
removing certain tabs djkane Shell Programming and Scripting 2 08-17-2006 05:58 AM
Removing duplicates giannicello Shell Programming and Scripting 12 09-14-2005 06:12 PM
Removing files rocker40 UNIX for Dummies Questions & Answers 5 03-03-2005 11:31 AM