From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.5]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3KDJqHt013971 for ; Tue, 20 Apr 2010 09:19:52 -0400 Received: from snt0-omc3-s16.snt0.hotmail.com (snt0-omc3-s16.snt0.hotmail.com [65.55.90.155]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3KDJgMZ012473 for ; Tue, 20 Apr 2010 09:19:42 -0400 Message-ID: Content-Type: multipart/alternative; boundary="_16695401-9f0a-48a6-9490-d914d992374d_" From: behzad r Date: Tue, 20 Apr 2010 13:19:42 +0000 MIME-Version: 1.0 Subject: [linux-lvm] resize an LVM physical volume 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: To: linux-lvm@redhat.com --_16695401-9f0a-48a6-9490-d914d992374d_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello=20 One of the client has a bladeframe that contains two linux nodes(one is pro= de and other one is test both have the same OS and are virtualized ) and I = have a primergy that has a virtualized linux node on it by using vmware=20 On client system there is a lun(EMC) that contains one partition /dev/sde1 = =2C the partition is already enveloped by LVM =2C they have increased the = lun but I need to increase the physical partition /dev/sde1 =2C I have crea= ted the following procedure that is working on virtualized linux node on pr= imergy=20 umount /partition that must be increased=20 pvdisplay /dev/sde2 | grep VG=20 vgchange -a n myvg=20 fdisk /dev/sde=20 delete the partition and recreate a new one with same start cylinder and in= crease the number of cylinder=20 pvresize /dev/sde1=20 vgchange -a y myvg=20 reiserfsck /dev/myvg/mylv=20 =20 but on bladeframe when I use the fdisk to increase the partition the system= destroy everything the physical volume reject the partion /dev/sde1 (when= I run pvdisplay it's not on the list anymore)and all the data is destroyed= I got a feeling that fdisk remove the /dev/sda1 and re-create a new one here is the kernel information concerning the bladeframe=20 #cat /etc/SuSE-release=20 SUSE Linux Enterprise Server 10 (x86_64)=20 VERSION =3D 10=20 PATCHLEVEL =3D 1=20 # uname -a=20 Linux 2.6.16.46-0.12-smp #1 SMP Thu May 17 14:00:09 UTC 2007 x86_64 x86_64 = x86_64 GNU/Linux=20 And the virtualized node on primergy=20 #cat SuSE-release=20 SUSE Linux Enterprise Server 10 (i586)=20 VERSION =3D 10=20 PATCHLEVEL =3D 1=20 SLES10-LVM:/etc # uname -a=20 Linux 2.6.16.46-0.12-default #1 Thu May 17 14:00:09 UTC 2007 i686 i686 i386= GNU/Linux=20 We come up with another solution to create a new partion=20 Fdisk new partition=20 pvcreate /dev/sde2=20 vgextend myVG /dev/sde2=20 but this is not the right one=20 Regards=20 Behzad=20 =20 _________________________________________________________________ New=2C Used=2C Demo=2C Dealer or Private? Find it at CarPoint.com.au http://clk.atdmt.com/NMN/go/206222968/direct/01/= --_16695401-9f0a-48a6-9490-d914d992374d_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello

One of the client has a bladeframe that contains two linux no= des(one is prode and other one is test both have the same OS and are virtua= lized ) and I have a primergy that has a virtualized linux node on it by us= ing vmware
On client system there is a lun(EMC) that contains one parti= tion /dev/sde1 =2C the partition is already enveloped by LVM =2C they have&= nbsp=3B increased the lun but I need to increase the physical partition /de= v/sde1 =2C I have created the following procedure that is working on virtua= lized linux node on primergy

umount /partition that must be increas= ed
pvdisplay /dev/sde2 | grep VG
vgchange -a n myvg
fdisk /dev/= sde
delete the partition and recreate a new one with same start cylinde= r and increase the number of cylinder
pvresize /dev/sde1
vgchange -= a y myvg
reiserfsck /dev/myvg/mylv
 =3B
but on bladeframe wh= en I use the fdisk to increase the partition the system destroy everything = the physical volume reject the partion =3B /dev/sde1 (when I run pvdisp= lay it's not on the list anymore)and all the data is destroyed I got a feel= ing that fdisk remove the /dev/sda1 and re-create a new one
here is the = kernel information concerning the bladeframe

#cat /etc/SuSE-release=
SUSE Linux Enterprise Server 10 (x86_64)
VERSION =3D 10
PATCHL= EVEL =3D 1
# uname -a
Linux 2.6.16.46-0.12-smp #1 SMP Thu May 17 14= :00:09 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux


And the virtuali= zed node on primergy

#cat SuSE-release
SUSE Linux Enterprise Se= rver 10 (i586)
VERSION =3D 10
PATCHLEVEL =3D 1
SLES10-LVM:/etc = # uname -a
Linux 2.6.16.46-0.12-default #1 Thu May 17 14:00:09 UTC 2007= i686 i686 i386 GNU/Linux


We come up with another solution to c= reate a new partion
Fdisk new partition
pvcreate /dev/sde2
vgex= tend myVG /dev/sde2

but this is not the right one

Regards <= br>Behzad



Find it at CarPoint.com.au New= =2C Used=2C Demo=2C Dealer or Private? = --_16695401-9f0a-48a6-9490-d914d992374d_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.11]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3KENQwA012504 for ; Tue, 20 Apr 2010 10:23:26 -0400 Received: from EXHUB016-4.exch016.msoutlookonline.net (exhub016-4.exch016.msoutlookonline.net [207.5.72.225]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3KENBWD003000 for ; Tue, 20 Apr 2010 10:23:14 -0400 Message-ID: <4BCDB8CD.7030303@cfl.rr.com> Date: Tue, 20 Apr 2010 10:23:09 -0400 From: Phillip Susi MIME-Version: 1.0 References: In-Reply-To: Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] resize an LVM physical volume 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" To: LVM general discussion and development Cc: behzad r On 4/20/2010 9:19 AM, behzad r wrote: > umount /partition that must be increased > pvdisplay /dev/sde2 | grep VG > vgchange -a n myvg > fdisk /dev/sde > delete the partition and recreate a new one with same start cylinder and > increase the number of cylinder > pvresize /dev/sde1 > vgchange -a y myvg > reiserfsck /dev/myvg/mylv If you use the full disk as the physical volume instead of partitioning it, then you would not need to take it offline to extend it. > but on bladeframe when I use the fdisk to increase the partition the > system destroy everything the physical volume reject the partion > /dev/sde1 (when I run pvdisplay it's not on the list anymore)and all the > data is destroyed I got a feeling that fdisk remove the /dev/sda1 and > re-create a new one > here is the kernel information concerning the bladeframe It sounds like fdisk did not recreate the partition with exactly the same start location. It is best to put fdisk into sector mode when doing things like this so that it will not round cylinder numbers and possibly hide minor changes from you. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.5]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3L5ca3p030387 for ; Wed, 21 Apr 2010 01:38:36 -0400 Received: from maude.comedia.it (mail.comedia.it [77.93.254.181]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3L5cH78020726 for ; Wed, 21 Apr 2010 01:38:18 -0400 Received: from localhost (localhost [127.0.0.1]) by maude.comedia.it (Postfix) with ESMTP id A907C86F44 for ; Wed, 21 Apr 2010 07:38:16 +0200 (CEST) Received: from maude.comedia.it ([127.0.0.1]) by localhost (maude.comedia.it [127.0.0.1]) (amavisd-new, port 10025) with LMTP id Jyj7JmojRc-w for ; Wed, 21 Apr 2010 07:38:11 +0200 (CEST) Date: Wed, 21 Apr 2010 07:38:11 +0200 From: Luca Berra Message-ID: <20100421053811.GA17339@maude.comedia.it> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [linux-lvm] resize an LVM physical volume 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 Tue, Apr 20, 2010 at 01:19:42PM +0000, behzad r wrote: >On client system there is a lun(EMC) that contains one partition /dev/sde1 , the partition is already enveloped by LVM , they have increased the lun but I need to increase the physical partition /dev/sde1 , I have created the following procedure that is working on virtualized linux node on primergy ... >but on bladeframe when I use the fdisk to increase the partition the system destroy everything the physical volume reject the partion /dev/sde1 (when I run pvdisplay it's not on the list anymore)and all the data is destroyed I got a feeling that fdisk remove the /dev/sda1 and re-create a new one probably the partition has been created, as per EMC specification, with an offset bigger than 63 sectors, so when you destroy it and recreate it does not start anymore in the same place. A better solution would have been, as Philip said, not to partition at all, and align the start of the data, but since you are there, you could try using a different tool, i.e. parted to extend the partition instead of recreating with fdisk. L. -- Luca Berra -- bluca@comedia.it Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \ From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.12]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3LF5HrX028947 for ; Wed, 21 Apr 2010 11:05:17 -0400 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3LF55xk007819 for ; Wed, 21 Apr 2010 11:05:05 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1O4bU8-0007WW-4y for linux-lvm@redhat.com; Wed, 21 Apr 2010 17:05:04 +0200 Received: from www4us.deutsche-boerse.com ([193.29.77.101]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Apr 2010 17:05:04 +0200 Received: from b_rahimi by www4us.deutsche-boerse.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Apr 2010 17:05:04 +0200 From: behzad Date: Wed, 21 Apr 2010 14:58:32 +0000 (UTC) Message-ID: References: <20100421053811.GA17339@maude.comedia.it> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [linux-lvm] resize an LVM physical volume 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" To: linux-lvm@redhat.com Luca Berra comedia.it> writes: > > On Tue, Apr 20, 2010 at 01:19:42PM +0000, behzad r wrote: > >On client system there is a lun(EMC) that contains one partition /dev/sde1 , the partition is already > enveloped by LVM , they have increased the lun but I need to increase the physical partition /dev/sde1 , I > have created the following procedure that is working on virtualized linux node on primergy > ... > >but on bladeframe when I use the fdisk to increase the partition the system destroy everything the > physical volume reject the partion /dev/sde1 (when I run pvdisplay it's not on the list anymore)and all > the data is destroyed I got a feeling that fdisk remove the /dev/sda1 and re-create a new one > probably the partition has been created, as per EMC specification, with > an offset bigger than 63 sectors, so when you destroy it and recreate it > does not start anymore in the same place. > > A better solution would have been, as Philip said, not to partition at > all, and align the start of the data, but since you are there, you could > try using a different tool, i.e. parted to extend the partition instead > of recreating with fdisk. > > L. > I did the test by changing the sector at the start and the same things happened ,the partion was no more in pvdisplay list (I'll be on client site can verify that hope it must be the reason) , but What might happens that the fdisk changes the start sector of a partition when we re-create a partition ? Regards Behzad From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.14]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3M6E3Lx002481 for ; Thu, 22 Apr 2010 02:14:03 -0400 Received: from maude.comedia.it (maude.comedia.it [77.93.254.181]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3M6DoMY031290 for ; Thu, 22 Apr 2010 02:13:51 -0400 Received: from localhost (localhost [127.0.0.1]) by maude.comedia.it (Postfix) with ESMTP id E4EC286F9B for ; Thu, 22 Apr 2010 08:13:49 +0200 (CEST) Received: from maude.comedia.it ([127.0.0.1]) by localhost (maude.comedia.it [127.0.0.1]) (amavisd-new, port 10025) with LMTP id 13hOFW7MimMz for ; Thu, 22 Apr 2010 08:13:42 +0200 (CEST) Date: Thu, 22 Apr 2010 08:13:42 +0200 From: Luca Berra Message-ID: <20100422061342.GC23093@maude.comedia.it> References: <20100421053811.GA17339@maude.comedia.it> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [linux-lvm] resize an LVM physical volume 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 Wed, Apr 21, 2010 at 02:58:32PM +0000, behzad wrote: >I did the test by changing the sector at the start and the same things happened please dump the existing partition data using sfdisk -d, then we can talk about facts. >,the partion was no more in pvdisplay list (I'll be on client site can verify >that hope it must be the reason) , but What might happens that the fdisk changes >the start sector of a partition when we re-create a partition ? because fdisk by default creates an ms-dos compatible partition table that starts on sector 63. Since most storage array do read/write whole cache block to the disk and no cache has a block size of 31.5K. Most storage vendors will tell you to align the partition start to cache boundary (usually 64K or 128K) Even M$ finally realized that and they create partitions starting at 1MB from w2008 onwards. L. -- Luca Berra -- bluca@comedia.it Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \