From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx3.redhat.com (mx3.redhat.com [172.16.48.32]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id jBTLiw115949 for ; Thu, 29 Dec 2005 16:44:58 -0500 Received: from percy.comedia.it (percy.comedia.it [212.97.59.71]) by mx3.redhat.com (8.13.1/8.13.1) with ESMTP id jBTLiqDZ010767 for ; Thu, 29 Dec 2005 16:44:52 -0500 Date: Thu, 29 Dec 2005 22:44:51 +0100 From: Luca Berra Subject: Re: [linux-lvm] How can I expand a physical volume ? Message-ID: <20051229214451.GB6629@percy.comedia.it> References: <43B39A85.7060107@email.it> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: <43B39A85.7060107@email.it> Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit To: linux-lvm@redhat.com 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 / \