From: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
To: lvm-devel@redhat.com
Subject: [RFC LVM2] (0/6) Stacking LVs
Date: Thu, 11 Oct 2007 18:30:58 -0400 [thread overview]
Message-ID: <470EA422.6000003@ce.jp.nec.com> (raw)
Hi,
I'm working on to extend LVM2 to allow an LV with both striped
and mirrored. (e.g. RAID10, RAID0+1)
I think the current direction toward such combination is
stacking LVs internally.
Attached patches allow such stacking by letting lvcreate/lvconvert
to take tagged LVs as source of the extent allocation.
So you can make striped LV on mirrored LVs, mirrored LV on striped LVs,
mirrored mirror log, etc.
The patches are still rough-edge.
I would like to hear comments if this approach is acceptable or not.
Especially, I'm curious about:
- How much flexibility should the LVM2 allow for stacking?
Current patch allows basically any combination of
linear/striped/mirror.
- Do we explicitly mark the LVs which can be used for stacking?
Current version implicitly uses LVs if they are specified by
tag in lvcreate/lvconvert/lvextend command line.
However, I wonder explicit marking (e.g. lvchange --allocatable y)
might be safer and allows cleaner implementation.
- Should we introduce a new structure about free space management?
Current version uses 'struct physical_volume' as such structure.
The patch set contains 6 patches:
1) Adding 'const' to the accessor functions of struct physical volume
2) Adding 'pv_dev_name()' to access the device name of PV
3) Splitting the allocation/initialization part from _pv_create
4) Modifying struct lv_segment_area so that AREA_LV segment can
have a pointer to pv_segment
5) Allowing striped-LV segment merging
6) Allowing allocation from tagged LVs
>From 1) to 3) are cosmetic changes.
4) changes the layout of struct lv_segment_area and accessor macros.
5) becomes necessary if we have striped LV over mirrorred LVs
and extend the striped LV.
These are preparation patches and should not affect the current LVM2
functionality.
6) is the core part of the feature.
Attaching struct physical_volume to struct logical_volume when
the LV is used as an allocation source for other LV.
The other things we need may:
- enhancements to the allocation logic
- snapshot
* Currently, snapshot implementation is in strange state.
o If you do 'lvcreate -s -n lv1 lv0',
in on-disk metadata, 'lv0' is the origin and
'lv1' is the cow area. 'snapshotX' is the snapshot.
While in device-mapper, 'lv1' is the snapshot
and 'lv1-cow' is the cow.
o If you resize 'lv1', it resizes the cow area.
If you change 'lv1' to read-only, it changes the snapshot
read-only.
So, what if we would like to add mirror to the snapshot,
for example?
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
next reply other threads:[~2007-10-11 22:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-11 22:30 Jun'ichi Nomura [this message]
2007-10-11 22:54 ` [RFC LVM2] (1/6) Add 'const' to PV accessor functions Jun'ichi Nomura
2007-10-11 22:55 ` [RFC LVM2] (2/6) Add pv_dev_name() to access PV device name Jun'ichi Nomura
2007-10-11 22:56 ` [RFC LVM2] (3/6) Add _pv_allocate() (split from _pv_create) Jun'ichi Nomura
2007-10-11 22:56 ` [RFC LVM2] (4/6) Add 'pvseg' to AREA_LV lv_segment_area Jun'ichi Nomura
2007-10-11 22:57 ` [RFC LVM2] (5/6) Allow merging AREA_LV striped segments Jun'ichi Nomura
2007-10-11 23:03 ` [RFC LVM2] (6/6) Allow allocation from LV 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=470EA422.6000003@ce.jp.nec.com \
--to=j-nomura@ce.jp.nec.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.