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

Re: [linux-lvm] pvresize, resize 8e Linux LVM partition



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: pgpZzy8mXNwjv.pgp
Description: PGP signature


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