LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-05-2014, 07:20 AM   #1
Ghostwheel
Member
 
Registered: Jun 2004
Location: Mid Michigan
Distribution: CentOS, Ubuntu
Posts: 41

Rep: Reputation: 0
VG management -- shrinking a VG


I need to shrink a volume group. The volume group is currently sitting on a hardware raid array that appears to the OS as one big data hole.

My current setup has root, swap and two large LV's in a single VG. I have removed the LV's and wish to reallocate the space so I can create two new VG's.

I can't seem to find a command to reduce a VG's size that doesn't include removing PV's.

Am I just missing something?
 
Old 02-05-2014, 08:39 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,341

Rep: Reputation: Disabled
In order to create a new Volume Group you'll need to create new Physical Volumes, so it seems what you want to do is to resize the existing Physical Volume/partition (which would also reduce the amount of storage space in the associated VG), not shrink the VG (which involves removing Physical Volumes).

The size of a Volume Group is determined by the combined size of the participating Physical Volumes. You can only directly reduce the size of a Volume Group by removing Physical Volumes; there's no way to instruct LVM to use, say, only half of a Physical Volume in a Volume Group.

However, provided there's unallocated space in the Volume Group, you should be able to run pvresize on the existing Physical Volume. Yes, you can do that on an Physical Volume while it's a member of an active Volume Group. Once the Physical Volume has been resized, the partition on which it resides can be shrunk accordingly.

Another alternative would be to add a temporary Physical Volume to the Volume Group, and then remove the current Physical Volume, delete and recreate the partition and Physical Volume, add it back, and finally remove the temporary Physical Volume.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shrinking with cfdisk zerimar97 Linux From Scratch 2 08-24-2013 05:17 AM
Shrinking a crypted FS blenderfox Linux - Newbie 8 08-06-2013 12:16 PM
DVD Shrinking Majusiak Linux - Software 3 07-05-2007 11:52 PM
Shrinking partitions siepmann Linux - General 1 10-27-2004 07:39 PM
Shrinking Partitions Khabi Linux - General 2 07-03-2004 03:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:58 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