Skip to contentSkip to conversation

Fix read-only warning for partial volume

PATCH New Takahiro Yasui 2 participants 5 messages Jun 30, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix read-only warning for partial volume

A partial VG was activated in read-only mode before the following patch was merged. With the patch, a partial VG became to be activated in read/write mode even with "--partial" option.

https://www.redhat.com/archives/lvm-devel/2008-September/msg00022.html
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/import_vsn1.c.diff?cvsroot=lvm2&r1=1.53&r2=1.54

However, vgchange and lvchange command still tell that a volume group is activated in read-only mode and users might be confused.

Partial mode. Incomplete volume groups will be activated read-only.

This patch deletes the second sentence.

---
 tools/lvmcmdline.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
tools/lvmcmdline.c +1 -2
Index: LVM2-2.02.69-20100629/tools/lvmcmdline.c
===================================================================
@@ -817,8 +817,7 @@ static int _get_settings(struct cmd_cont
 
 	if (arg_count(cmd, partial_ARG)) {
 		cmd->partial_activation = 1;
-		log_print("Partial mode. Incomplete volume groups will "
-			  "be activated read-only.");
+		log_print("Running in partial mode.");
 	}
 
 	if (arg_count(cmd, ignorelockingfailure_ARG) || arg_count(cmd, sysinit_ARG))
Signature · 2 lines
Takahiro Yasui
Hitachi Data Systems
#1 lore raw

PATCH 1/1 Fix read-only warning for partial volume

Quoted 1 line · Takahiro Yasui

Partial mode. Incomplete volume groups will be activated read-only.

We should probably replace that with a more-accurate description.

Alasdair

#2 lore raw

PATCH 1/1 Fix read-only warning for partial volume

Alasdair,

Quoted 2 lines · Alasdair G Kergon
Quoted 1 line

Partial mode. Incomplete volume groups will be activated read-only.

We should probably replace that with a more-accurate description.

Incomplete volumes aren't be necessarily activated in read-only mode. So just removing a word "read-only" is fine to me. Other point is this message is displayed not only by "vgchange -ay" but also "lvchange -ay" and a word "groups" is not necessary.

My suggestion is

Partial mode. Incomplete volumes will be activated.

Appreciate your comments.

Thanks,
Taka

#3 lore raw

PATCH 1/1 Fix read-only warning for partial volume

Quoted 1 line · Takahiro Yasui

Partial mode. Incomplete volumes will be activated.

log_print("Partial mode. Incomplete logical volumes will be processed.");

Yes, the focus is on LVs not VGs

Or, "Logical volumes that have parts missing may still get processed."

As MISSING_PV handling has become default behaviour, what *extra* does --partial offer?

Alasdair

#4 lore raw

PATCH 1/1 Fix read-only warning for partial volume

Quoted 6 lines · Alasdair G Kergon
Quoted 1 line · Takahiro Yasui

Partial mode. Incomplete volumes will be activated.

log_print("Partial mode. Incomplete logical volumes will be processed.");

Yes, the focus is on LVs not VGs

Thank you for committing it.

Quoted 2 lines

As MISSING_PV handling has become default behaviour, what *extra* does --partial offer?

The latest lvm command works as you mentioned only when a logical volume is on valid physical volumes, but lvchange or vgchange fails if a logical volume contains invalid devices. In that case, we still need --partial option.

For example, LV is on PV1 and PV2 for linear, stripe or mirror, and PV2 is missing. With --partial option, we can activate LV and read/write it. This is very important especially for mirror volume.

It is ideal that a logical volume can be activated without --partial option. And in that case, we don't need --partial option.

Thanks,
Taka