From: David Teigland <teigland@redhat.com>
To: lvm-devel@redhat.com
Subject: pvresize problem
Date: Tue, 26 Mar 2013 12:59:13 -0400 [thread overview]
Message-ID: <20130326165913.GA12503@redhat.com> (raw)
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"
next reply other threads:[~2013-03-26 16:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 16:59 David Teigland [this message]
2013-03-26 21:50 ` pvresize problem David Teigland
2013-03-27 9:23 ` Peter Rajnoha
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=20130326165913.GA12503@redhat.com \
--to=teigland@redhat.com \
--cc=lvm-devel@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 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.