[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] How can I expand a physical volume ?



On Thu, Dec 29, 2005 at 09:12:53AM +0100, Massimiliano wrote:
Hi !

two ways, either create a new partition with the free space,
pvcreate it and vgextend your volume group
or
edit your partition table and make the 2nd partition bigger.
(you might need to reboot here)
then
How should I modify the pe_count value in order to use these added 72Gbs of new free space ?

*******************
# Generated by LVM2: Wed Dec 21 11:50:55 2005

contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing 'vgcfgbackup'"

creation_host = "mail.laferspa.com" # Linux mail.laferspa.com 2.6.9-22.0.1.ELsmp #1 SMP Thu Oct 27 13:14:25 CDT 2005 i686
creation_time = 1135162255    # Wed Dec 21 11:50:55 2005

VolGroup00 {
 id = "hVHrwV-Dt53-wbGa-ZwHQ-ZWcX-t5Tm-vQIVUu"
 seqno = 3
 status = ["RESIZEABLE", "READ", "WRITE"]
 extent_size = 65536        # 32 Megabytes
^ this is how big is an extent in sectors (512 byte units)
 max_lv = 0
 max_pv = 0

 physical_volumes {

     pv0 {
         id = "XAEWQR-s1qj-Cj5K-gv0W-9ndt-lroN-35ZvNE"
         device = "/dev/cciss/c0d0p2"    # Hint only

         status = ["ALLOCATABLE"]
         pe_start = 384
         pe_count = 4337    # 135,531 Gigabytes
this is the number of extents your physical volume is the size in sectors is pe_count * extent_size (4337 * 65536 = 284229632)
now look at /proc/partitions.
you have the size in bytes for your partition
multiply it by 2 and divide it by extent_size, and you get the new pe
count



--
Luca Berra -- bluca comedia it
       Communication Media & Services S.r.l.
/"\
\ /     ASCII RIBBON CAMPAIGN
 X        AGAINST HTML MAIL
/ \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]