linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] pvresize not working?
@ 2007-10-28 20:06 Brian J. Murrell
  0 siblings, 0 replies; only message in thread
From: Brian J. Murrell @ 2007-10-28 20:06 UTC (permalink / raw)
  To: linux-lvm

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-28 20:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-28 20:06 [linux-lvm] pvresize not working? Brian J. Murrell

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).