linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] pvresize, resize 8e Linux LVM partition
@ 2006-08-03  5:27 Stanislaw Senotrusov
  2006-08-03 17:54 ` Lamont R. Peterson
  0 siblings, 1 reply; 5+ messages in thread
From: Stanislaw Senotrusov @ 2006-08-03  5:27 UTC (permalink / raw)
  To: linux-lvm

Hello.

Trying to figure out how to resize LVM partition.

I cloned hard drive using Acronis True Image and now have some space
after LVM partition.

As I see, before run pvresize I need to resize partition itself. Which
tool can help me to do it? man pvresize refers to fdisk, but I can't
understand how to use it for resize.

Simply running pvresize does nothing.

Actually I am trying to build some pipeline to quick make a test and
production box from development one. I can make it manually by
creating new pv and dump/restore, but its a 3 page of commands. And I
still cant figure out that is the right tool for ext3 dump/restore.

Another way is create new pv in free space and add it to volume group
- but after that this box will be a little different from the original
one, thus I need additional tracking of its configuration.

Thank you.

-- 
Stanislaw Senotrusov

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [linux-lvm] pvresize, resize 8e Linux LVM partition
@ 2006-08-03  8:18 Stanislaw Senotrusov
  0 siblings, 0 replies; 5+ messages in thread
From: Stanislaw Senotrusov @ 2006-08-03  8:18 UTC (permalink / raw)
  To: linux-lvm

pvresize, resize 8e Linux LVM partition

Hello.

Trying to figure out how to resize LVM partition.

I cloned hard drive using Acronis True Image and now have some space
after LVM partition.

As I see, before run pvresize I need to resize partition itself. Which
tool can help me to do it? man pvresize refers to fdisk, but I can't
understand how to use it for resize.

Simply running pvresize does nothing.

Actually I am trying to build some pipeline to quick make a test and
production box from development one. I can make it manually by
creating new pv and dump/restore, but its a 3 page of commands. And I
still cant figure out that is the right tool for ext3 dump/restore.

Another way is create new pv in free space and add it to volume group
- but after that this box will be a little different from the original
one, thus I need additional tracking of its configuration.

Thank you.

--
Stas Senotrusov

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [linux-lvm] pvresize, resize 8e Linux LVM partition
@ 2006-08-03 11:27 Stanislaw Senotrusov
  0 siblings, 0 replies; 5+ messages in thread
From: Stanislaw Senotrusov @ 2006-08-03 11:27 UTC (permalink / raw)
  To: linux-lvm

I figured out.

The problem is that I'm missing some fundamentals. There is no need
for a "resize" command in fdisk, sinse it is a partition table,
nothing more. All I need is to delete a partition, then to create new
with the same type and start cylinder but ending at last cylinder.
Then write this table on disk and do pvresize.

Thank you for patience :)

--
Stas Senotrusov

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] pvresize, resize 8e Linux LVM partition
  2006-08-03  5:27 [linux-lvm] pvresize, resize 8e Linux LVM partition Stanislaw Senotrusov
@ 2006-08-03 17:54 ` Lamont R. Peterson
  2006-08-04  5:16   ` Stanislaw Senotrusov
  0 siblings, 1 reply; 5+ messages in thread
From: Lamont R. Peterson @ 2006-08-03 17:54 UTC (permalink / raw)
  To: LVM

[-- Attachment #1: Type: text/plain, Size: 2907 bytes --]

On Wednesday 02 August 2006 11:27 pm, Stanislaw Senotrusov wrote:
> Hello.
>
> Trying to figure out how to resize LVM partition.
>
> I cloned hard drive using Acronis True Image and now have some space
> after LVM partition.
>
> As I see, before run pvresize I need to resize partition itself. Which
> tool can help me to do it? man pvresize refers to fdisk, but I can't
> understand how to use it for resize.

fdisk does not have a resize function.  Delete the existing partition and 
recreate it, but bigger.  Be ***VERY*** careful; the most important thing is 
that the new partition must *begin* exactly where the old one did.

I would recommend writting down the cylinder numbers of the partition before 
deleting it.

> Simply running pvresize does nothing.

Yup.  That's because he PV is already the full size of the partition it's 
living on.  Although this is a case where using the disk raw would make 
things easier (you could run pvresize without having to alter the partition 
first), I would never recommend it.

> Actually I am trying to build some pipeline to quick make a test and
> production box from development one. I can make it manually by
> creating new pv and dump/restore, but its a 3 page of commands. And I
> still cant figure out that is the right tool for ext3 dump/restore.

Are you talking about data on the LVs you want to copy?  Are you also 
including the entire OS?

Here is how I would do it:

1.  Kickstart install of new box (sets up LVM, includes packages, etc.)
2.  Run a script to install all of the needed configuration files for all the 
services the new server needs (could be run as part of the Kickstart).
3.  Copy the data the services will be "serving" to the new machine.

There are lots of ways to do step 3.  Personally, I like to avoid as much of 
computational overhead as possible at this stage, so I like NFS mounting and 
"cp -a".  Plain, simple, fast and comprehensive.  YMMV.

> Another way is create new pv in free space and add it to volume group
> - but after that this box will be a little different from the original
> one, thus I need additional tracking of its configuration.

I think you're right, that's not the right way to do it.
-- 
Lamont R. Peterson <peregrine@OpenBrainstem.net>
Founder [ http://blog.OpenBrainstem.net/peregrine/ ]
GPG Key fingerprint: 0E35 93C5 4249 49F0 EC7B  4DDD BE46 4732 6460 CCB5
  ___                   ____            _           _
 / _ \ _ __   ___ _ __ | __ ) _ __ __ _(_)_ __  ___| |_ ___ _ __ ___
| | | | '_ \ / _ \ '_ \|  _ \| '__/ _` | | '_ \/ __| __/ _ \ '_ ` _ \
| |_| | |_) |  __/ | | | |_) | | | (_| | | | | \__ \ ||  __/ | | | | |
 \___/| .__/ \___|_| |_|____/|_|  \__,_|_|_| |_|___/\__\___|_| |_| |_|
      |_|               Intelligent Open Source Software Engineering
                              [ http://www.OpenBrainstem.net/ ]

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] pvresize, resize 8e Linux LVM partition
  2006-08-03 17:54 ` Lamont R. Peterson
@ 2006-08-04  5:16   ` Stanislaw Senotrusov
  0 siblings, 0 replies; 5+ messages in thread
From: Stanislaw Senotrusov @ 2006-08-04  5:16 UTC (permalink / raw)
  To: LVM general discussion and development

On 8/4/06, Lamont R. Peterson <peregrine@openbrainstem.net> wrote:
> Here is how I would do it:
>
> 1.  Kickstart install of new box (sets up LVM, includes packages, etc.)
> 2.  Run a script to install all of the needed configuration files for all the
> services the new server needs (could be run as part of the Kickstart).
> 3.  Copy the data the services will be "serving" to the new machine.
>
> There are lots of ways to do step 3.  Personally, I like to avoid as much of
> computational overhead as possible at this stage, so I like NFS mounting and
> "cp -a".  Plain, simple, fast and comprehensive.  YMMV.

Thank you for the letter, Lamont!

Procedure you described requires a so much time to complete.

Tomorrow I end up the following pipeline:

1. Create only one 4Gb plain root partition (no LVM) which holds a
entire system and my application. It's used in a development and test
environment. The actual stored data is about a 1.5 Gb. I am pretty
sure the base system it never fills entire 4 Gb in my case.

2. To build a production server I am bytecopy the root partition to a
new box (only a few minutes), boot from it, create LVM in a free space
and moves application from root to LVM.
Production database now have space to grow. Also I get rid of equal
UUID problem.

Additionally there is no need for kickstart process is VM environment
- I just need to setup OS one time, and then when I need another box I
just clone initial setup - it takes a few second. For testing and
development VM overhead is ok.

--
Stas Senotrusov

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-08-04  5:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-03  5:27 [linux-lvm] pvresize, resize 8e Linux LVM partition Stanislaw Senotrusov
2006-08-03 17:54 ` Lamont R. Peterson
2006-08-04  5:16   ` Stanislaw Senotrusov
  -- strict thread matches above, loose matches on Subject: below --
2006-08-03  8:18 Stanislaw Senotrusov
2006-08-03 11:27 Stanislaw Senotrusov

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).