All of lore.kernel.org
 help / color / mirror / Atom feed
* pvresize problem
@ 2013-03-26 16:59 David Teigland
  2013-03-26 21:50 ` David Teigland
  0 siblings, 1 reply; 3+ messages in thread
From: David Teigland @ 2013-03-26 16:59 UTC (permalink / raw)
  To: lvm-devel

I'm trying to verify shrinking with pvresize --setphysicalvolumesize

When the pv is an orphan, it works as expected, but when the pv is
not an orphan, the resulting size is always 8192S less than the
requested size.

Getting the same result with the latest git code and from tag v2_02_98.

--

test_description='pvresize setphysicalvolumesize'

. lib/test

aux prepare_devs 2

# non-orphan
vgcreate $vg1 "$dev1"

# orphan
pvcreate "$dev2"

size1=$(get pv_field "$dev1" pv_size --units s)
size2=$(get pv_field "$dev2" pv_size --units s)

pvresize --setphysicalvolumesize 57344S $dev2
check pv_field $dev2 pv_size "57344S" --units s

pvresize --setphysicalvolumesize 57344S $dev1
check pv_field $dev1 pv_size "57344S" --units s

--

pvresize -vv --setphysicalvolumesize 57344S $dev1
#pvresize.sh:30+ pvresize -vv --setphysicalvolumesize 57344S @TESTDIR@/dev/mapper/@PREFIX at pv1
      Setting activation/monitoring to 0
      Setting global/locking_type to 1
      global/wait_for_locks not found in config: defaulting to 1
      File-based locking selected.
      Setting global/locking_dir to @TESTDIR@/var/lock/lvm
      global/prioritise_write_locks not found in config: defaulting to 1
    Using physical volume(s) on command line
      @TESTDIR@/dev/mapper/@PREFIX at pv1: size is 68608 sectors
      @TESTDIR@/dev/mapper/@PREFIX at pv1: lvm2 label detected at sector 1
      @TESTDIR@/dev/mapper/@PREFIX at pv1: size is 68608 sectors
      @TESTDIR@/dev/mapper/@PREFIX at pv1: size is 68608 sectors
      @TESTDIR@/dev/mapper/@PREFIX at pv2: size is 68608 sectors
      @TESTDIR@/dev/mapper/@PREFIX at pv2: lvm2 label detected at sector 1
      Locking @TESTDIR@/var/lock/lvm/V_ at PREFIX@vg1 WB
      @TESTDIR@/dev/mapper/@PREFIX at pv1: lvm2 label detected at sector 1
      @TESTDIR@/dev/mapper/@PREFIX at pv1: size is 68608 sectors
      @TESTDIR@/dev/mapper/@PREFIX at pv1: size is 68608 sectors
    @TESTDIR@/dev/mapper/@PREFIX at pv1: Pretending size is 57344 not 68608 sectors.
    Resizing volume "@TESTDIR@/dev/mapper/@PREFIX at pv1" to 68608 sectors.
    Resizing physical volume @TESTDIR@/dev/mapper/@PREFIX at pv1 from 0 to 6 extents.
    Updating physical volume "@TESTDIR@/dev/mapper/@PREFIX at pv1"
  WARNING: This metadata update is NOT backed up
  Physical volume "@TESTDIR@/dev/mapper/@PREFIX at pv1" changed
      Unlocking @TESTDIR@/var/lock/lvm/V_ at PREFIX@vg1
  1 physical volume(s) resized / 0 physical volume(s) not resized
check pv_field $dev1 pv_size "57344S" --units s
#pvresize.sh:31+ check pv_field @TESTDIR@/dev/mapper/@PREFIX at pv1 pv_size 57344S --units s
pv_field: PV="@TESTDIR@/dev/mapper/@PREFIX at pv1", field="pv_size", actual="49152S", expected="57344S"



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-27  9:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 16:59 pvresize problem David Teigland
2013-03-26 21:50 ` David Teigland
2013-03-27  9:23   ` Peter Rajnoha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.