All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ray Morris <support@bettercgi.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] How to grow LVM and underlying partition?
Date: Mon, 29 Nov 2010 09:39:20 -0600	[thread overview]
Message-ID: <1291045160.1076.29@raydesk1.bettercgi.com> (raw)
In-Reply-To: <AANLkTi=CJCVsGbmmtUGEiWXSXLDVq=cc=ZaYSmUpn1HN@mail.gmail.com> (from yanghatespam@gmail.com on Sat Nov 27 21:58:18 2010)

use fdisk -u to be sure the new, larger partition starts
with the exact same sector as the old, smaller one.
--
Ray Morris
support@bettercgi.com

Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/

Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/

Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.php


On 11/27/2010 09:58:18 PM, Yang Zhang wrote:
> I was messing around with a VM running Ubuntu 10.04 Server (64-bit)
> with LVM on a single 4GB disk. I just used the installer's automatic
> LVM setup and I landed with (ignore the disk size - that was after I
> resized the disk to be 8GB):
> 
> <<<
> Disk /dev/sda: 8589 MB, 8589934592 bytes
> 255 heads, 63 sectors/track, 1044 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x0004b903
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *           1          32      248832   83  Linux
> Partition 1 does not end on cylinder boundary.
> /dev/sda2              32         523     3942401    5  Extended
> Partition 2 does not end on cylinder boundary.
> /dev/sda5              32         523     3942400   8e  Linux LVM
> >>>
> 
> Ubuntu also made the LVM house just a root FS and a 512M swap.
> 
> At this point, I grew the underlying disk to 8GB using the VM
> management software, then booted into the VM and tried to figure out
> how to grow my swap and root FS. Reading man pvresize:
> 
> <<<
> ...
> EXAMPLES
> Expand the PV on /dev/sda1 after enlarging the partition with fdisk
> pvresize /dev/sda1
> ...
> >>>
> 
> This made me figure I had to first enlarge the partition with fdisk.
> So I tried deleting the extended partition 2 (which also deleted the
> logical partition 5 housing LVM), then recreating both partitions but
> this time using all cylinders (with the same partition numbers and
> also setting the logical partition's type to 8e for Linux LVM). Alas,
> that failed - I rebooted at that point, but the VM would no longer
> boot. (Sorry I didn't jot down the exact error message(s), but there
> was something about the /dev/mapper/testbox-root not being found - I
> can retry the whole experiment if this message is critical.)
> 
> So is what I'm trying to do possible? What's the right way to go about
> it? Thanks in advance.
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 
> 

      reply	other threads:[~2010-11-29 15:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-28  3:58 [linux-lvm] How to grow LVM and underlying partition? Yang Zhang
2010-11-29 15:39 ` Ray Morris [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291045160.1076.29@raydesk1.bettercgi.com \
    --to=support@bettercgi.com \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.