LinuxQuestions.org
Visit Jeremy's Blog.
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 05-12-2009, 05:57 AM   #1
bondoq
Member
 
Registered: Nov 2004
Posts: 77

Rep: Reputation: 13
LVM Issue


hi all,


i have a question .

can i split a volume groupt and make it unpartitioned space ?

i have a /dev/sda5 as vg1 with total size 131 GB and used 78 GB
and free space 53 GB i want to take the free space on this vg and make it unpartitioned space is there a solution for this ‏‪(01:42:06 PM)‬‏‬

and all info are

lvscan: ACTIVE '/dev/VolGroup00/LogVol00' [78.12 GB] inherit

vgscan: Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2

pvscan: PV /dev/sda5 VG VolGroup00 lvm2 [131.84 GB / 53.72 GB free]
Total: 1 [131.84 GB] / in use: 1 [131.84 GB] / in no VG: 0 [0 ]

vgdisplay:

VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 131.84 GB
PE Size 32.00 MB
Total PE 4219
Alloc PE / Size 2500 / 78.12 GB
Free PE / Size 1719 / 53.72 GB

VG UUID kCp76J-ENtZ-wDws-CHT3-Ql83-44vi-bOJA7H


Thanks in advance
 
Old 05-12-2009, 06:02 AM   #2
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
First shrink the VG with vgresize, then shrink the PV with pvresize, then I'd use something like (g)parted to reduce the partition. You can then create /dev/sda6 ...

Quote:
man vgresize
man pvresize
 
Old 05-12-2009, 06:05 AM   #3
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
This is also a benefit of virtual machines. You can test these things out by adding/removing virtual disks and experimenting before doing them on production machines.
 
Old 05-12-2009, 06:39 AM   #4
bondoq
Member
 
Registered: Nov 2004
Posts: 77

Original Poster
Rep: Reputation: 13
thanks for help i tried pvresize but it gives this error

i typed this command :

pvresize --setphysicalvolumesize 40G /dev/sda5


the error:

cannot resize to 31 extents as 2500 are allocated.
 
Old 05-12-2009, 08:16 AM   #5
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
You have 78GB allocated, so you cannot reduce it do 40GB. Try 80GB.
 
Old 05-12-2009, 08:42 AM   #6
bondoq
Member
 
Registered: Nov 2004
Posts: 77

Original Poster
Rep: Reputation: 13
i want to reduce the PV from 131 GB to 70 GB to take the rest of the space and make it new partition

did you get what i mean ?


thanks in advance
 
Old 05-12-2009, 08:53 AM   #7
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
Yes I understood you AFAIK.

Quote:
i have a /dev/sda5 as vg1 with total size 131 GB and used 78 GB
and free space 53 GB i want to take the free space on this vg and make it unpartitioned space is there a solution for this ‏‪
But you typed:

Quote:
pvresize --setphysicalvolumesize 40G /dev/sda5
Which surely should be:

Code:
pvresize --setphysicalvolumesize 80G /dev/sda5
 
Old 05-12-2009, 08:59 AM   #8
bondoq
Member
 
Registered: Nov 2004
Posts: 77

Original Poster
Rep: Reputation: 13
so if i resized it to 80 GB can i use 60 GB and make it a new partition ?
 
Old 05-12-2009, 09:35 AM   #9
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
Well about 50 GB - yes.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to change non-LVM to LVM? darthfoolish Linux - Software 2 08-01-2008 03:47 AM
LVM and multiple iSCSI disks performance of LVM xxx_anuj_xxx Linux - Server 4 05-01-2008 12:26 PM
LXer: Managing LVM with the LVM Manager LXer Syndicated Linux News 0 03-16-2008 11:10 AM
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 11:16 AM
LVM issue pauloco Linux - Hardware 1 11-14-2006 11:13 PM

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

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