From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: linux-lvm@redhat.com, Alasdair Kergon <agk@redhat.com>
Subject: [linux-lvm] [PATCH LVM2] (0/3) 'cling' allocation policy
Date: Fri, 06 Oct 2006 17:54:20 -0400 [thread overview]
Message-ID: <4526D08C.8010303@ce.jp.nec.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]
Hi,
These series of patches implement 'cling' allocation policy.
Patches are applicable to LVM2 2.02.10.
In current implementation, 'normal' policy allows the allocation
like this (output of lvs -a -o+devices):
LV Devices
lv0 lv0_mimage_0(0),lv0_mimage_1(0)
[lv0_mimage_0] /dev/sdb(0)
[lv0_mimage_0] /dev/sda(2)
[lv0_mimage_1] /dev/sda(0)
[lv0_mimage_1] /dev/sdb(2)
[lv0_mlog] /dev/sdc(0)
dummy1 /dev/sda(1)
dummy2 /dev/sdb(1)
dummy3 /dev/sdc(1)
You see /dev/sda is used for both lv0_mimage_0 and lv0_mimage_1.
If this disk breaks, you lose the whole LV.
In this case, what I think is better is something like this:
LV Devices
lv0 lv0_mimage_0(0),lv0_mimage_1(0)
[lv0_mimage_0] /dev/sdb(0)
[lv0_mimage_0] /dev/sdb(2)
[lv0_mimage_1] /dev/sda(0)
[lv0_mimage_1] /dev/sda(2)
[lv0_mlog] /dev/sdc(0)
dummy1 /dev/sda(1)
dummy2 /dev/sdb(1)
dummy3 /dev/sdc(1)
With these patches, 'normal' allocation tries to do the latter first.
Attached is a VG metadata as a testcase.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
[-- Attachment #2: testvg0_alloc-cling.vg --]
[-- Type: text/plain, Size: 3171 bytes --]
# Generated by LVM2: Sat Oct 7 01:56:23 2006
contents = "Text Format Volume Group"
version = 1
description = "Created *before* executing 'lvextend -l+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 = 1160200583 # Sat Oct 7 01:56:23 2006
testvg0 {
id = "1q8uy1-HgpO-JpQK-Dvn4-SYlQ-r452-YQa0P0"
seqno = 7
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 8192 # 4 Megabytes
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "EkAheU-E42S-nhmb-h3LB-CGEG-4NvX-f0PbFP"
device = "/dev/dm-0" # Hint only
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 4 # 16 Megabytes
}
pv1 {
id = "Ee7qjC-qtNm-TBd4-ql19-aRZg-mCXk-CCs5Uk"
device = "/dev/dm-1" # Hint only
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 4 # 16 Megabytes
}
pv2 {
id = "3wvgkO-7p1Z-yoHy-stW4-ZY3p-VHg1-DQe9d7"
device = "/dev/dm-2" # Hint only
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 4 # 16 Megabytes
}
}
logical_volumes {
lv0 {
id = "RIWMkB-slcN-4ZtA-iVrd-HIZO-PEO2-Z3ommp"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "mirror"
mirror_count = 2
mirror_log = "lv0_mlog"
region_size = 1024
mirrors = [
"lv0_mimage_0", 0,
"lv0_mimage_1", 0
]
}
}
dummy1 {
id = "TlfCSG-kzkN-fv65-xd5g-Hpb0-I3dG-k7UVAJ"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 1
]
}
}
dummy2 {
id = "hWyYcp-FD0J-JiFy-dziI-g0FZ-Begs-aYEbJ2"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv1", 1
]
}
}
dummy3 {
id = "NhIJ26-07w0-OA6d-ZE14-gegx-nVW8-YRM5vq"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv2", 1
]
}
}
lv0_mlog {
id = "OP7pVI-Col0-vKbT-Zwar-M7CC-dZiP-WkV740"
status = ["READ", "WRITE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv2", 0
]
}
}
lv0_mimage_0 {
id = "2TWuNa-37S2-1m4O-SC02-uDEq-5l1O-AT3CcI"
status = ["READ", "WRITE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv1", 0
]
}
}
lv0_mimage_1 {
id = "S2EKHn-CroW-aFS7-ptF5-mYUo-DuYt-NmT1YD"
status = ["READ", "WRITE"]
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1 # 4 Megabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 0
]
}
}
}
}
next reply other threads:[~2006-10-06 21:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-06 21:54 Jun'ichi Nomura [this message]
2006-10-06 21:55 ` [linux-lvm] [PATCH LVM2] (1/3) remove unnecessary parameter from _check_contiguous Jun'ichi Nomura
2006-10-06 21:56 ` [linux-lvm] [PATCH LVM2] (2/3) use _for_each_pv() from _check_contiguous() Jun'ichi Nomura
2006-10-07 23:38 ` [linux-lvm] " Alasdair G Kergon
2006-10-09 16:27 ` Jun'ichi Nomura
2006-10-06 21:56 ` [linux-lvm] [PATCH LVM2] (3/3) add 'cling' allocation policy Jun'ichi Nomura
2006-10-08 12:06 ` [linux-lvm] " Alasdair G Kergon
2006-10-07 10:51 ` [linux-lvm] Re: [PATCH LVM2] (0/3) " Alasdair G Kergon
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=4526D08C.8010303@ce.jp.nec.com \
--to=j-nomura@ce.jp.nec.com \
--cc=agk@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.