linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Brian J. Murrell" <brian@interlinx.bc.ca>
To: linux-lvm@redhat.com
Subject: [linux-lvm] pvresize not working?
Date: Sun, 28 Oct 2007 16:06:54 -0400	[thread overview]
Message-ID: <1193602014.24601.27.camel@pc.ilinx> (raw)

I'm trying to shrink a PV and it just does not seem to want to work.

My disk has to partitions, hda1 and hda2.  hda1 is a regular primary
partition and so is hda2.  hda1 has an ext3 filesystem and hda2 is an
LVM PV.

After booting from a livecd, I used pvdisplay /dev/hda2 to observe that
it was 4886 extents long and each extent is 4M.  Through trial and error
I discovered I could reduce it to 4761 extents.  So I went ahead and did
that.

I then shrank the partition (through a delete and add operation for
partition #2) by 10 cylinders where each cylinder is 8225280 bytes long.
I observed through /proc/partitions before and after the fdisk operation
that the partition table change was effective to the kernel.

Considering I reduced the PV by 524,288,000 bytes, reducing the
partition by 82,252,800 should be quite safe.  Or so I thought.

After reducing the partition and observing the reduction
through /proc/partitions, a vgscan was giving me errors:

lseek: 20497235968 failed: Invalid ... (EINVAL)

Now for the life of me I cannot figure out why vgscan would be trying to
seek to 20,497,235,968 considering that is beyond the end of even 4886
4M extents (20,493,369,344).  But even still, why would it be trying to
seek what is obviously beyond the end of the partition considering I
told it that the PV is now smaller?

Any thoughts?

b.

                 reply	other threads:[~2007-10-28 20:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1193602014.24601.27.camel@pc.ilinx \
    --to=brian@interlinx.bc.ca \
    --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).