From: "Harik A'ttar" <harik@chaos.ao.net>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Bringing an existing filesystem under LVM2 control
Date: Thu, 01 Jun 2006 22:05:02 -0400 [thread overview]
Message-ID: <447F9CCE.2010305@chaos.ao.net> (raw)
In-Reply-To: <20060601134048.GJ10603@agk.surrey.redhat.com>
Alasdair G Kergon wrote:
> A question which came up again on irc last night was whether an existing
> filesystem on a non-LVM partition can be turned into an LVM logical volume
> without having to wipe the disk.
>
> With LVM2, I think the answer is often 'Yes'.
> 6. Finally run fsck on your new logical volume and check everything worked.
Wow, that's a bit scary. The problem I see with it is you have PV data
sitting inside a LV. An errant tool operating on the filesystem would
wipe out your entire volumegroup (until you manually intervened) rather
then just screwing up one filesystem.
What I would do is copy the first (and probably last depending on
alignment) extant out to another PV, then pvcreate. You end up losing
one or extants due to it, but there's always waste when dealing with
large blocksizes.
Something like this:
lvcreate temporary-filesystem-head
copy one extant from raw partition -> vg1/temporary-filesystem-head
pvcreate on raw partition
vgextend vg1 raw partition
edit the config backup to set the pe_start=pe_size
restore the config
lvextend temporary-filesystem-head raw_partition filesystem size
depending on alignment and allocation, you may have to copy the
filesystem tail to another PV.
Wastes a bit more space, but you don't end up with an oddball PV with
it's UUID in the middle of a filesystem.
Now for the tough question: With LVM2 built on device-mapper, why isn't
extant_size = 512 bytes? Is large-chunk allocation just leftover from
LVM1, or is there a deeper technical reason for keeping it large?
next prev parent reply other threads:[~2006-06-02 2:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-01 13:40 [linux-lvm] Bringing an existing filesystem under LVM2 control Alasdair G Kergon
2006-06-02 2:05 ` Harik A'ttar [this message]
2006-06-02 17:43 ` Dieter Stüken
2006-06-02 18:03 ` Alasdair G Kergon
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=447F9CCE.2010305@chaos.ao.net \
--to=harik@chaos.ao.net \
--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).