From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: linux-lvm@redhat.com, Alasdair Kergon <agk@redhat.com>,
Jonathan Brassow <jbrassow@redhat.com>
Subject: [linux-lvm] [PATCH LVM2 0/2] fix alloc anywhere and addition of disklog
Date: Fri, 22 Sep 2006 18:27:19 -0400 [thread overview]
Message-ID: <45146347.3070804@ce.jp.nec.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]
Hi,
Following patches will fix 2 problems:
- 'lvcreate --alloc anywhere' cannot allocates log
on the same PV with mimage. This prevents us to create a mirror LV
on a VG with 2 PVs.
- 'lvconvert' from corelog allocates log from the same PV
with other image. It spoils redundancy.
(See attached metadata for examples)
This patch does the following changes:
(1/2) fix-mirror-alloc-anywhere.patch
- split log specific parts from _find_parallel_space() and
_alloc_parallel_area()
- determine log PV before doing other allocation
- use constraints correctly
* log allocation should avoid all PVs used by other parts of the LV
* other allocation should avoid log PV and parallel PVs of
corresponding lv segment (unchanged)
(2/2) fix-lvconvert-allocate-disklog.patch
- lvconvert to setup constraints properly
The 2nd patch itself is trivial and depends on the 1st patch for
the allocation logic to work correctly.
The patch has no effects on non-mirror allocation.
The patch was tested on the combinations of following scenarios:
- normal or anywhere allocation policy
- creation, corelog to disklog conversion, or linear to mirror conversion
- VG with 2 PVs or more than 2 PVs
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
[-- Attachment #2: testvg0-lvconvert-corelog.vg --]
[-- Type: text/plain, Size: 1985 bytes --]
# Generated by LVM2: Fri Sep 15 01:52:07 2006
contents = "Text Format Volume Group"
version = 1
description = "Created *before* executing 'lvconvert -m 1 testvg0/lv0'"
creation_host = "tetsuo.lab" # Linux tetsuo.lab 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686
creation_time = 1158299527 # Fri Sep 15 01:52:07 2006
testvg0 {
id = "a5E2Nr-71Z7-YhaJ-PPto-QJaO-UwVR-Xux2tO"
seqno = 2
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 8192 # 4 Megabytes
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "1W9Pf5-JK1B-1zdo-qayI-lIch-4rPc-Dr6X8J"
device = "/dev/dm-0" # Hint only
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 4 # 16 Megabytes
}
pv1 {
id = "hMbR7i-RqtC-PpKK-2iZD-CMnX-yytR-S2mrH6"
device = "/dev/dm-1" # Hint only
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 4 # 16 Megabytes
}
pv2 {
id = "guSc2r-Tw4k-akM5-tjZ5-6V9m-hwCB-faY10J"
device = "/dev/dm-2" # Hint only
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 4 # 16 Megabytes
}
}
logical_volumes {
lv0 {
id = "y13S23-cGCp-NcJU-45vy-yQuz-v231-lNkFi1"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "mirror"
mirror_count = 2
region_size = 1024
mirrors = [
"lv0_mimage_0", 0,
"lv0_mimage_1", 0
]
}
}
lv0_mimage_0 {
id = "vi2BZp-1W9W-T42S-AX6w-kIqC-bMtn-bOtxdQ"
status = ["READ", "WRITE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 0
]
}
}
lv0_mimage_1 {
id = "G0SqFV-YW3K-C33U-zl2I-PvG8-QGus-i0ivzn"
status = ["READ", "WRITE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv1", 0
]
}
}
}
}
[-- Attachment #3: testvg0-lvcreate-anywhere.vg --]
[-- Type: text/plain, Size: 883 bytes --]
# Generated by LVM2: Fri Sep 15 01:53:14 2006
contents = "Text Format Volume Group"
version = 1
description = "Created *before* executing 'lvcreate -l1 -m1 -n lv0 testvg0'"
creation_host = "tetsuo.lab" # Linux tetsuo.lab 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686
creation_time = 1158299594 # Fri Sep 15 01:53:14 2006
testvg0 {
id = "UxVVG5-H6xQ-VSBn-2RLF-xKKX-R0e6-XIRZ7j"
seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 8192 # 4 Megabytes
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "b3vmJK-Ez6R-ZemQ-7IMp-Xid3-PXXu-pqzIEc"
device = "/dev/dm-0" # Hint only
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 4 # 16 Megabytes
}
pv1 {
id = "UkeYvg-AR5E-soSC-PImG-upyk-O11S-fkfANu"
device = "/dev/dm-1" # Hint only
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 4 # 16 Megabytes
}
}
}
next reply other threads:[~2006-09-22 22:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-22 22:27 Jun'ichi Nomura [this message]
2006-09-22 22:31 ` [linux-lvm] [PATCH LVM2 1/2] fix mirror allocation Jun'ichi Nomura
2006-09-22 22:33 ` [linux-lvm] [PATCH LVM2 2/2] fix lvconvert to setup mirror constraints Jun'ichi Nomura
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=45146347.3070804@ce.jp.nec.com \
--to=j-nomura@ce.jp.nec.com \
--cc=agk@redhat.com \
--cc=jbrassow@redhat.com \
--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.