* [linux-lvm] resize an LVM physical volume
@ 2010-04-20 13:19 behzad r
2010-04-20 14:23 ` Phillip Susi
2010-04-21 5:38 ` Luca Berra
0 siblings, 2 replies; 5+ messages in thread
From: behzad r @ 2010-04-20 13:19 UTC (permalink / raw)
To: linux-lvm
[-- Attachment #1: Type: text/plain, Size: 2038 bytes --]
Hello
One of the client has a bladeframe that contains two linux nodes(one is prode 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
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
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
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
#cat /etc/SuSE-release
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 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 virtualized node on primergy
#cat SuSE-release
SUSE Linux Enterprise Server 10 (i586)
VERSION = 10
PATCHLEVEL = 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 create a new partion
Fdisk new partition
pvcreate /dev/sde2
vgextend myVG /dev/sde2
but this is not the right one
Regards
Behzad
_________________________________________________________________
New, Used, Demo, Dealer or Private? Find it at CarPoint.com.au
http://clk.atdmt.com/NMN/go/206222968/direct/01/
[-- Attachment #2: Type: text/html, Size: 2311 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] resize an LVM physical volume
2010-04-20 13:19 [linux-lvm] resize an LVM physical volume behzad r
@ 2010-04-20 14:23 ` Phillip Susi
2010-04-21 5:38 ` Luca Berra
1 sibling, 0 replies; 5+ messages in thread
From: Phillip Susi @ 2010-04-20 14:23 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] resize an LVM physical volume
2010-04-20 13:19 [linux-lvm] resize an LVM physical volume behzad r
2010-04-20 14:23 ` Phillip Susi
@ 2010-04-21 5:38 ` Luca Berra
2010-04-21 14:58 ` behzad
1 sibling, 1 reply; 5+ messages in thread
From: Luca Berra @ 2010-04-21 5:38 UTC (permalink / raw)
To: linux-lvm
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
/ \
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] resize an LVM physical volume
2010-04-21 5:38 ` Luca Berra
@ 2010-04-21 14:58 ` behzad
2010-04-22 6:13 ` Luca Berra
0 siblings, 1 reply; 5+ messages in thread
From: behzad @ 2010-04-21 14:58 UTC (permalink / raw)
To: linux-lvm
Luca Berra <bluca <at> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] resize an LVM physical volume
2010-04-21 14:58 ` behzad
@ 2010-04-22 6:13 ` Luca Berra
0 siblings, 0 replies; 5+ messages in thread
From: Luca Berra @ 2010-04-22 6:13 UTC (permalink / raw)
To: linux-lvm
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
/ \
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-22 6:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20 13:19 [linux-lvm] resize an LVM physical volume behzad r
2010-04-20 14:23 ` Phillip Susi
2010-04-21 5:38 ` Luca Berra
2010-04-21 14:58 ` behzad
2010-04-22 6:13 ` Luca Berra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).