* [linux-lvm] [PATCH] lvm metadata handling, warn only once about missing PV
@ 2006-06-08 16:55 Jens Wilke
0 siblings, 0 replies; 4+ messages in thread
From: Jens Wilke @ 2006-06-08 16:55 UTC (permalink / raw)
To: linux-lvm
Hi,
When a disk is missing the messages of the lvm tools are quite
verbose. Example output for a VG with a mirror LV:
Without patch:
# vgchange -ay -P
Partial mode. Incomplete volume groups will be activated read-only.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
2 logical volume(s) in volume group "main" now active
With patch:
# vgchange -ay -P
Partial mode. Incomplete volume groups will be activated read-only.
Missing PV with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw' in VG main
2 logical volume(s) in volume group "main" now active
Regards,
Jens
--
Jens Wilke
Linux on zSeries - Application Development Tools + GCC
phone +49-(0)7031-16-3936 - tl *120-3936 - email jens.wilke@de.ibm.com
IBM Germany Lab, Schoenaicher Str. 220, 71032 Boeblingen
Signed-Off-By: Jens Wilke <jens.wilke@de.ibm.com>
Index: lib/format_text/import_vsn1.c
===================================================================
--- lib/format_text/import_vsn1.c 9 May 2006 12:29:44 -0000 1.2
+++ lib/format_text/import_vsn1.c 8 Jun 2006 14:25:44 -0000
@@ -151,9 +151,9 @@
char buffer[64];
if (!id_write_format(&pv->id, buffer, sizeof(buffer)))
- log_error("Couldn't find device.");
+ log_verbose("Couldn't find device.");
else
- log_error("Couldn't find device with uuid '%s'.",
+ log_verbose("Couldn't find device with uuid '%s'.",
buffer);
if (partial_mode())
Index: lib/metadata/metadata.c
===================================================================
--- lib/metadata/metadata.c 9 May 2006 12:29:45 -0000 1.2
+++ lib/metadata/metadata.c 8 Jun 2006 14:25:44 -0000
@@ -1096,6 +1096,25 @@
return correct_vg;
}
+static void warn_pv_missing(struct volume_group *vg)
+{
+ struct physical_volume *pv;
+ struct pv_list *pvl;
+ char buffer[64];
+
+ list_iterate_items(pvl, &vg->pvs) {
+ pv = pvl->pv;
+ if (!pv->dev) {
+ if (!id_write_format(&pv->id, buffer, sizeof(buffer))) {
+ log_error("Volume group %s has missing PVs", vg->name);
+ } else {
+ log_error("Missing PV with uuid '%s' in VG %s",
+ buffer, vg->name);
+ }
+ }
+ }
+}
+
struct volume_group *vg_read(struct cmd_context *cmd, const char *vgname,
const char *vgid, int *consistent)
{
@@ -1118,6 +1137,8 @@
return NULL;
}
}
+
+ warn_pv_missing(vg);
return vg;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [linux-lvm] [PATCH] lvm metadata handling, warn only once about missing PV
@ 2006-06-09 9:37 Jens Wilke
2006-06-09 10:07 ` Dieter Stüken
0 siblings, 1 reply; 4+ messages in thread
From: Jens Wilke @ 2006-06-09 9:37 UTC (permalink / raw)
To: linux-lvm
Hi,
When a disk is missing the messages of the lvm tools are quite
verbose. Example output for a VG with a mirror LV:
Without patch:
# vgchange -ay -P
Partial mode. Incomplete volume groups will be activated read-only.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
Couldn't find device with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw'.
2 logical volume(s) in volume group "main" now active
With patch:
# vgchange -ay -P
Partial mode. Incomplete volume groups will be activated read-only.
Missing PV with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw' in VG main
2 logical volume(s) in volume group "main" now active
Regards,
Jens
--
Jens Wilke
Linux on zSeries - Application Development Tools + GCC
phone +49-(0)7031-16-3936 - tl *120-3936 - email jens.wilke@de.ibm.com
IBM Germany Lab, Schoenaicher Str. 220, 71032 Boeblingen
Signed-Off-By: Jens Wilke <jens.wilke@de.ibm.com>
Index: lib/format_text/import_vsn1.c
===================================================================
--- lib/format_text/import_vsn1.c 9 May 2006 12:29:44 -0000 1.2
+++ lib/format_text/import_vsn1.c 8 Jun 2006 14:25:44 -0000
@@ -151,9 +151,9 @@
char buffer[64];
if (!id_write_format(&pv->id, buffer, sizeof(buffer)))
- log_error("Couldn't find device.");
+ log_verbose("Couldn't find device.");
else
- log_error("Couldn't find device with uuid '%s'.",
+ log_verbose("Couldn't find device with uuid '%s'.",
buffer);
if (partial_mode())
Index: lib/metadata/metadata.c
===================================================================
--- lib/metadata/metadata.c 9 May 2006 12:29:45 -0000 1.2
+++ lib/metadata/metadata.c 8 Jun 2006 14:25:44 -0000
@@ -1096,6 +1096,25 @@
return correct_vg;
}
+static void warn_pv_missing(struct volume_group *vg)
+{
+ struct physical_volume *pv;
+ struct pv_list *pvl;
+ char buffer[64];
+
+ list_iterate_items(pvl, &vg->pvs) {
+ pv = pvl->pv;
+ if (!pv->dev) {
+ if (!id_write_format(&pv->id, buffer, sizeof(buffer))) {
+ log_error("Volume group %s has missing PVs", vg->name);
+ } else {
+ log_error("Missing PV with uuid '%s' in VG %s",
+ buffer, vg->name);
+ }
+ }
+ }
+}
+
struct volume_group *vg_read(struct cmd_context *cmd, const char *vgname,
const char *vgid, int *consistent)
{
@@ -1118,6 +1137,8 @@
return NULL;
}
}
+
+ warn_pv_missing(vg);
return vg;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] [PATCH] lvm metadata handling, warn only once about missing PV
2006-06-09 9:37 [linux-lvm] [PATCH] lvm metadata handling, warn only once about missing PV Jens Wilke
@ 2006-06-09 10:07 ` Dieter Stüken
2006-06-09 10:30 ` Jens Wilke
0 siblings, 1 reply; 4+ messages in thread
From: Dieter Stüken @ 2006-06-09 10:07 UTC (permalink / raw)
To: LVM general discussion and development
Jens Wilke wrote:
> With patch:
>
> # vgchange -ay -P
> Partial mode. Incomplete volume groups will be activated read-only.
> Missing PV with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw' in VG main
> 2 logical volume(s) in volume group "main" now active
the metadata backup also shows the device name as a hint.
Is this saved by the on-disk MD, too? Might be helpful to see.
Dieter.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] [PATCH] lvm metadata handling, warn only once about missing PV
2006-06-09 10:07 ` Dieter Stüken
@ 2006-06-09 10:30 ` Jens Wilke
0 siblings, 0 replies; 4+ messages in thread
From: Jens Wilke @ 2006-06-09 10:30 UTC (permalink / raw)
To: LVM general discussion and development
On Friday 09 June 2006 12:07, Dieter St�ken wrote:
> Jens Wilke wrote:
> > With patch:
> >
> > # vgchange -ay -P
> > Partial mode. Incomplete volume groups will be activated read-only.
> > Missing PV with uuid 'egDxmo-sVp7-OQGB-6mgt-84mk-xioM-ahdzBw' in VG
> > main 2 logical volume(s) in volume group "main" now active
>
> the metadata backup also shows the device name as a hint.
> Is this saved by the on-disk MD, too? Might be helpful to see.
Dieter,
Yes, the on-disk and backup metadata is identical so we have the
device hint. But I don't think that it is really a good idea to show it,
because this would make up a bit pitfall and confusing in stress
situations.
But it would be usefull to add a list of lvs that are partially available
or degraded in case of mirrors, so you have a quick info what is
the actual state of your system.
Best,
Jens
--
Jens Wilke
Linux on zSeries - Application Development Tools + GCC
phone +49-(0)7031-16-3936 - tl *120-3936 - email jens.wilke@de.ibm.com
IBM Germany Lab, Schoenaicher Str. 220, 71032 Boeblingen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-06-09 10:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-09 9:37 [linux-lvm] [PATCH] lvm metadata handling, warn only once about missing PV Jens Wilke
2006-06-09 10:07 ` Dieter Stüken
2006-06-09 10:30 ` Jens Wilke
-- strict thread matches above, loose matches on Subject: below --
2006-06-08 16:55 Jens Wilke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).