From: Alasdair G Kergon <agk@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] pvresize patch pending
Date: Sat, 29 Oct 2005 21:08:43 +0100 [thread overview]
Message-ID: <20051029200843.GB22575@agk.surrey.redhat.com> (raw)
In-Reply-To: <20051029010217.GA22575@agk.surrey.redhat.com>
Are any of you are interested in working on something else in
a related area of the code?
New tool:
lvimport - Bring an existing filesystem on a partition under LVM control
e.g. you have an ext3 filesystem on /dev/hda3 and you want to turn it
into an LV without moving it.
Requires an existing VG with at least one pre-existing mda.
(could be from metadata/dirs of course)
Involves (equivalent of) running pvcreate -Zn --metadatacopies 0
on the partition,
probably with --labelsector 1 (may depend on fs),
changing pe_start to 0,
getting the last sector used by the filesystem (add a new helper
function to fsadm to give this info based on filesystem type?),
vgchange --physicalextentsize if necessary so that the entire
filesystem is enclosed by PEs,
adding the new PV to the VG,
creating an LV enclosing the filesystem.
Now the PV label is within the new LV - but stored in a sector
that the filesystem doesn't use.
There might be a case for reducing the size of the filesystem
slightly before doing this if it's close to the end of the
partition, so that the pe size isn't too small.
[The number of PEs is 32-bits, so tiny PEs put constraints
on the VG size - need to make sure the code detects problems here,
or consider implications of switching to 64 bits.]
Ensure none of the tools can leave you with a VG with no mdas
(eg split off the new PV with vgsplit)
Require filesystem to be unmounted first.
Alasdair
--
agk@redhat.com
next prev parent reply other threads:[~2005-10-29 20:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-28 16:59 [linux-lvm] pvresize patch pending Zac Slade
2005-10-28 17:01 ` Alasdair G Kergon
2005-10-28 17:17 ` Zac Slade
2005-10-28 17:55 ` Zac Slade
2005-10-28 19:27 ` Alasdair G Kergon
2005-10-28 20:14 ` Zak Kipling
2005-10-28 21:21 ` Alasdair G Kergon
2005-10-29 0:37 ` Zac Slade
2005-10-29 1:02 ` Alasdair G Kergon
2005-10-29 20:08 ` Alasdair G Kergon [this message]
2005-11-04 1:53 ` Zac Slade
2005-10-31 2:42 ` 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=20051029200843.GB22575@agk.surrey.redhat.com \
--to=agk@redhat.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 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).