From: "Dieter Stüken" <stueken@conterra.de>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] LVM question on move and resize
Date: Fri, 14 Jul 2006 13:00:08 +0200 [thread overview]
Message-ID: <44B77938.9020601@conterra.de> (raw)
In-Reply-To: <20060713182227.8697.qmail@web50714.mail.yahoo.com>
John Koshi wrote:
> I assume the next steps will be (from a rescue CD):
>
> 1) Use fdisk to format the unused 25 Gb space in the
> extended partition, to a new type 8E partition.
> 2) Use pvcreate to create a new physical vol there.
> 3) Use vgextend to extend VolGroup00 to include the
> new physical volume.
> 4) Use lvextend to extend LogVol00 by the XX Gb.
> 5) Do a file system check of LogVol00.
>
> Does this look right? Am I missing any steps?
after you grow LogVol00 you also have to expand the
ext2/ext2 filesystem inside (step 4a)
resize2fs -p /dev/mapper/VolGroup00-LogVol00
This actually does the real work. resize2fs recommends
to perform an fsck before. If you are in doubt, do it,
else you may skip this using "resize2fs -f -p".
You don't have to supply a size, resize2fs will find
the current size of the extended volume auomatically
Will you perform this while booting from a rescue CD?
If this is your root filesystem you have to, anyway.
Else you possibly have to reboot, after changing the
partition table, because it may be locked by the system
while it is in use.
Tip: you may rename your VG and your LVs to get expressive
names like "/dev/mapper/Sonota-Root". Imo this is less
error prone than working with technical names like "LogVol42".
> Disk /dev/hda: 80.0 GB, 80026361856 bytes
> 255 heads, 63 sectors/track, 9729 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Device Boot Start End Blocks Id System
> /dev/hda1 * 1 5201 41777001 7 HPFS/NTFS
> /dev/hda2 9704 9729 208845 88 Linux plaintext
> /dev/hda3 5202 5214 104422+ 83 Linux
> /dev/hda4 5215 9703 36057892+ f W95 Ext'd (LBA)
> /dev/hda5 8425 9703 10273536 8e Linux LVM
> Partition table entries are not in disk order
So you end up with an extended partition containing your LVM.
Even if this works, it is an ugly solution. This Win95 extended
partition hack is something like a poor-mans LVM with partition
magic as its management tool.
It would be much better, to REPLACE the extended partition by LVM. Unfortunately I don't see any easy migration path without an external
disk. If you have any spare disk, to temporary hold the 8.2Gb root
volume, I may point out an other solution.
Dieter.
next prev parent reply other threads:[~2006-07-14 11:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-13 1:24 [linux-lvm] LVM question on move and resize John Koshi
2006-07-13 8:35 ` Dieter Stüken
2006-07-13 18:22 ` John Koshi
2006-07-14 11:00 ` Dieter Stüken [this message]
2006-07-14 15:15 ` John Koshi
2006-07-14 16:43 ` Dieter Stüken
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=44B77938.9020601@conterra.de \
--to=stueken@conterra.de \
--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 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).