LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-04-2012, 12:51 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 36
Unable to reduce the size of volume group?


My volume group of size 200 gb.

out of which only 100 gb is used by 2 logical volumes /dev/vg00/lvol0 and /dev/vg00/lvol0 respectively (both are 50 gb each).

Whenever i use vgreduce command to reduce the size of volume group i get below error.
Code:
# vgreduce vg00 -a
  Physical volume "/dev/xvdb5" still in use
How can i reduce the volume group size to free up 100 gb?


Code:
# lvdisplay
  --- Logical volume ---
  LV Name                /dev/vg00/lvol0
  VG Name                vg00
  LV UUID                tji5FT-GuoG-jfLN-2KXg-Ra0a-6SQA-4RR4r7
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                50.00 GB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/vg00/lvol1
  VG Name                vg00
  LV UUID                xdqsuf-jl1U-TY1h-0fIa-kywO-I6fu-7UVSHB
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                50.00 GB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
vgdisplay

Code:
# vgdisplay
  --- Volume group ---
  VG Name               vg00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               200.00 GB
  PE Size               4.00 MB
  Total PE              51199
  Alloc PE / Size       25600 / 100.00 GB
  Free  PE / Size       25599 / 100.00 GB
  VG UUID               NL5ws1-uaxQ-Wmtm-75GZ-WnQX-S7Vd-XeHJuS

Last edited by pinga123; 01-04-2012 at 01:45 AM.
 
Old 01-04-2012, 01:20 AM   #2
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
How many Physical volumes you have? It seems like all volumes in use! and what is the result of pvs command?
 
Old 01-04-2012, 02:16 AM   #3
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
Code:
# pvs
  PV         VG   Fmt  Attr PSize   PFree
  /dev/xvdb5 vg00 lvm2 a-   200.00G 100.00G
 
Old 01-04-2012, 02:23 AM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
If the physical volume is still being used you will have to migrate the data to another physical volume using the pvmove command. Then use the vgreduce command to remove the physical volume:

This command will remove the physical volume /dev/hda1 or whatever from the volume group vg00.

Quote:
# vgreduce vg00 /dev/hda1
And then you can reduce the size of volume group.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:02 AM
Best LVM2 volume group extent size for photo storage TheOneKEA Linux - Desktop 2 03-06-2012 03:20 PM
[SOLVED] Increase the Total Size of LVM Volume Group ? The Unincorporated Man Linux - Server 2 11-07-2011 12:25 AM
how to extend volume group size over the remaining space scrat75 Linux - Software 3 03-29-2010 04:51 PM
Can I increase the size of a physical volume in an lvm group? If so, how? MikeB23930 Fedora 2 07-21-2009 06:38 PM


All times are GMT -5. The time now is 02:13 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration