From: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
To: lvm-devel@redhat.com
Subject: [PATCH 1/11] lvconvert takes '--wait' instead of '--background'
Date: Mon, 14 Jan 2008 12:03:50 -0500 [thread overview]
Message-ID: <478B95F6.6030302@ce.jp.nec.com> (raw)
In-Reply-To: <20080114142902.GC8075@agk.fab.redhat.com>
Alasdair G Kergon wrote:
> On Fri, Jan 11, 2008 at 06:43:56PM -0500, Jun'ichi Nomura wrote:
>> Remove '--background' option and add '--wait' option to lvconvert.
>
>> The option was inherited from pvmove.
>> However, since lvconvert used to exit immediately and it still does
>> for different types of conversion (e.g. linear to mirror conversion),
>> it's more consistent and intuitive to add '--wait' option for foreground
>> polling and do it in background by default.
>
> I'm not yet persuaded about the need for this change.
>
> The aim is that the behaviour of the tools be consistent across
> the whole command set.
>
> Waiting for the operation to complete feels more intuitive to me.
OK. I didn't want to change the existing behavior of lvconvert.
But I agree the synchronous behavior is better choice for default case.
Attached is a patch to fix the inconsistency issue in the other way.
If it looks acceptable, please replace patches "1/11" and "14/14"
with this. Other patches won't be affected.
By default: lvconvert waits for initial sync
Add a mirror to linear
# lvs -o+stripes vg/lvol0; lvconvert -m+1 vg/lvol0; lvs -o+stripes vg/lvol0
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg -wi-a- 1.00G 1
vg/lvol0: Converted: 18.8%
vg/lvol0: Converted: 39.6%
vg/lvol0: Converted: 61.7%
vg/lvol0: Converted: 83.6%
vg/lvol0: Converted: 100.0%
Logical volume lvol0 converted.
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg mwi-a- 1.00G lvol0_mlog 100.00 2
Add a mirror to mirror
# lvs -o+stripes vg/lvol0; lvconvert -m+1 vg/lvol0; lvs -o+stripes vg/lvol0
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg mwi-a- 1.00G lvol0_mlog 100.00 2
vg/lvol0: Converted: 53.7%
vg/lvol0: Converted: 76.8%
vg/lvol0: Converted: 99.8%
vg/lvol0: Converted: 100.0%
Logical volume lvol0 converted.
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg mwi-a- 1.00G lvol0_mlog 100.00 3
Remove mirror
# lvs -o+stripes vg/lvol0; lvconvert -m-1 vg/lvol0; lvs -o+stripes vg/lvol0
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg mwi-a- 1.00G lvol0_mlog 100.00 3
Logical volume lvol0 converted.
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg mwi-a- 1.00G lvol0_mlog 100.00 2
# lvs -o+stripes vg/lvol0; lvconvert -m-1 vg/lvol0; lvs -o+stripes vg/lvol0
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg mwi-a- 1.00G lvol0_mlog 100.00 2
Logical volume lvol0 converted.
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg -wi-a- 1.00G
With background option (-b):
Add a mirror to linear
# lvs -o+stripes vg/lvol0; lvconvert -m+1 -b vg/lvol0; lvs -o+stripes vg/lvol0
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg -wi-a- 1.00G 1
Logical volume lvol0 converted.
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg mwi-a- 1.00G lvol0_mlog 0.59 2
Add a mirror to mirror
# lvs -o+stripes vg/lvol0; lvconvert -m+1 -b vg/lvol0; lvs -o+stripes vg/lvol0
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg mwi-a- 1.00G lvol0_mlog 11.52 2
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg cwi-a- 1.00G 0.39 lvol0_mimagetmp_2 2
Remove mirror
# lvs -o+stripes vg/lvol0; lvconvert -m-1 -b vg/lvol0; lvs -o+stripes vg/lvol0
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg cwi-a- 1.00G 17.77 lvol0_mimagetmp_2 2
Logical volume lvol0 converted.
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg mwi-a- 1.00G lvol0_mlog 31.45 2
# lvs -o+stripes vg/lvol0; lvconvert -m-1 -b vg/lvol0; lvs -o+stripes vg/lvol0
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg mwi-a- 1.00G lvol0_mlog 34.57 2
Logical volume lvol0 converted.
LV VG Attr LSize Origin Snap% Move Log Copy% Convert #Str
lvol0 vg -wi-a- 1.00G 1
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvconvert-wait-for-linear-mirror-conversion.patch
Type: text/x-patch
Size: 2552 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20080114/39640b27/attachment.bin>
next prev parent reply other threads:[~2008-01-14 17:03 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-11 23:22 [PATCH 0/11] updates to stacking and lvconvert Jun'ichi Nomura
2008-01-11 23:43 ` [PATCH 1/11] lvconvert takes '--wait' instead of '--background' Jun'ichi Nomura
2008-01-12 1:48 ` [PATCH 14/14] lvconvert help message wasn't fixed to '--wait' Jun'ichi Nomura
2008-01-14 14:29 ` [PATCH 1/11] lvconvert takes '--wait' instead of '--background' Alasdair G Kergon
2008-01-14 17:03 ` Jun'ichi Nomura [this message]
2008-01-11 23:44 ` [PATCH 2/11] Add upward link from underlying LV to stacked seg Jun'ichi Nomura
2008-01-12 1:48 ` [PATCH 12/14] Do not make extra call to lv_add_user_seg() Jun'ichi Nomura
2008-01-14 22:39 ` [PATCH 2/11] Add upward link from underlying LV to stacked seg Alasdair G Kergon
2008-01-14 22:53 ` Alasdair G Kergon
2008-01-15 16:39 ` Jun'ichi Nomura
2008-01-15 16:56 ` Alasdair G Kergon
2008-01-15 19:54 ` Jun'ichi Nomura
2008-01-15 22:42 ` Jun'ichi Nomura
2008-01-11 23:45 ` [PATCH 3/11] Move mirror log initialization functions Jun'ichi Nomura
2008-01-11 23:45 ` [PATCH 4/11] Move _find_tmp_mirror() Jun'ichi Nomura
2008-01-11 23:46 ` [PATCH 5/11] Move removable_pvs checking Jun'ichi Nomura
2008-01-11 23:46 ` [PATCH 6/11] Export find_tmp_mirror() Jun'ichi Nomura
2008-01-11 23:47 ` [PATCH 7/11] lvconvert adds/removes mirror log to/from the original LV Jun'ichi Nomura
2008-01-12 1:48 ` [PATCH 13/14] lvconvert should check first_seg(original_lv) Jun'ichi Nomura
2008-01-16 20:46 ` Jun'ichi Nomura
2008-01-11 23:48 ` [PATCH 8/11] Allow "mirror" segment with only 1 area Jun'ichi Nomura
2008-01-11 23:48 ` [PATCH 9/11] _init_mirror_log() to cope with activation status Jun'ichi Nomura
2008-01-11 23:49 ` [PATCH 10/11] Fix _remove_mirror_images() to cope with stacked mirror Jun'ichi Nomura
2008-01-11 23:49 ` [PATCH 11/11] Fix _remove_mirror_images() to skip AREA_LV Jun'ichi Nomura
2008-01-11 23:56 ` [Test case 1/2] Basic mirrored LV testing Jun'ichi Nomura
2008-01-11 23:56 ` [Test case 2/2] lvconvert mirror-addition testing Jun'ichi Nomura
2008-01-15 23:12 ` 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=478B95F6.6030302@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.