From: "Ajeet Nankani" <fromkth+lvm@fastmail.fm>
To: LVM general discussion & development <linux-lvm@redhat.com>
Subject: [linux-lvm] Reducing PV/ Reclaiming free PEs from a PV to be used for another partition/purpose outside of LVM
Date: Sun, 06 Feb 2005 12:15:48 -0800 [thread overview]
Message-ID: <1107720948.6351.214448095@webmail.messagingengine.com> (raw)
I have hda6 as the only PV in a Volume Group which contains 2 Logical
Volumes.
I have around 42 contiguous free PEs at the end of PV.
I want to reduce this PV by 42 or less PEs so that i can reduce hda6 and
create one more partion hda7(Fat32) for some other work.
There is not any straight command to do it atleat untill now, because i
tried to use pvresize and it said that command not implemented yet.
I thought of one way, but i am not sure it would work or not, so i need
you people comments on it.
First i will create a meta data backup of the Volume Group with the
command
vgcfgbackup which would give me meta file data as below
================================================
description = "Created *after* executing 'pvmove -v -i 60 --alloc
anywhere /dev/hda6:233-264 /dev/hda6:192-223'"
creation_host = "XXXXX" # Linux XXXXX 2.6.9-1.667 #1 Tue Nov 2
14:41:25 EST 2004 i686
creation_time = 1107716048 # Sun Feb 6 19:54:08 2005
VolGroup00 {
id = "cdEPbO-5o71-hUIa-szPC-FAra-E79P-cdbuTS"
seqno = 17
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 65536 # 32 Megabytes
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "BQSuB1-GYJf-bfdM-wnZd-JJgi-fZAM-jm4th6"
device = "/dev/hda6" # Hint only
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 266 # 8.3125 Gigabytes
}
}
logical_volumes {
LogVol00 {
id = "6WyF9L-t4dJ-8HrR-NdTo-CoZh-NKvl-z6fidr"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 192 # 6 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 0
]
}
}
LogVol01 {
id = "N3auhB-e9br-76Cw-Eqvw-c31w-mq3Y-T5QBp8"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 32 # 1024 Megabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 192
]
}
}
}
}
=====================================================================
Now here if i edit it and in physical volume section where it says that
pe_count = 266, i change it to pe_count = 224 which is the last PE used
by the Logical Volume.
after saving it if i run vgcfgrestore with this file, will my PV be
reduced?? after that i can reduce hda6 with parted or similar utility.
Any comments??
Thanks.
-ajeet.
next reply other threads:[~2005-02-06 20:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-06 20:15 Ajeet Nankani [this message]
2005-02-06 20:24 ` [linux-lvm] Reducing PV/ Reclaiming free PEs from a PV to be used for another partition/purpose outside of LVM Alasdair G Kergon
2005-02-06 21:01 ` [linux-lvm] Reducing PV/ Reclaiming free PEs from a PV to be usedfor " Ajeet Nankani
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=1107720948.6351.214448095@webmail.messagingengine.com \
--to=fromkth+lvm@fastmail.fm \
--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 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.