linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Alasdair G Kergon <agk@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Shrinking LVM partition at beginning
Date: Sun, 10 Apr 2016 00:19:54 +0100	[thread overview]
Message-ID: <20160409231954.GH9081@agk-dp.fab.redhat.com> (raw)
In-Reply-To: <20160409101245.GB31040@nicku.org>

Outline of the process:

Work out the new layout as best you can.

vgcfgbackup the metadata into a text file.

Update partition table moving the start of the partition, being careful to
respect any alignment restrictions.

Edit the text file based on the new partition start location so that all the
data will be in the same place (so all extent numbers will be smaller by
the same fixed amount, and dev_size and pe_start values will change).

pvcreate with --restorefile and -Zn to format the "new" partition for LVM's
use based on the edited file.

vgcfgrestore from that file.

Alasdair

      parent reply	other threads:[~2016-04-09 23:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-09 10:12 [linux-lvm] Shrinking LVM partition at beginning Nick Urbanik
2016-04-09 17:52 ` Zdenek Kabelac
2016-04-09 23:45   ` Alasdair G Kergon
2016-04-09 23:19 ` Alasdair G Kergon [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=20160409231954.GH9081@agk-dp.fab.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).