[Yaird-devel] Re: evms first try

Marco Amadori marco.amadori at gmail.com
Sun Dec 4 16:14:19 UTC 2005


Alle 19:06, sabato 3 dicembre 2005, Erik van Konijnenburg ha scritto:
> On Fri, Dec 02, 2005 at 11:56:26AM +0100, Marco Amadori wrote:
> > Alle 00:36, venerdì 2 dicembre 2005, hai scritto:
> > > You probably have evms and lvm2 installed on a single box?
> >
> > I had in the past, in  this case I had an old broken initramfs-tools
> > image that included all the three tools, mdadm, lvm and evms, so the mess
> > is coming from here.
>
> Good, this makes an excellent test case.
>
> > > A more reliable way might be to look at the tool that will be used to
> > > activate the device: evms_activate uses /dev/evms, the rest uses
> > > /dev/mapper.  In order to make that work, we would have to annotate the
> > > active block device in tryEvms and friends, then use that annotation in
> > > yspecial.
> >
> > I think I only partially understood, How could I help now?
>
> I only understand it partially myself, this is where we work out
> what yaird is supposed to do.

meanwhile, this patch makes yaird fail later...

marco at tremendo:~/src/bzr/yaird.bzr$ bzr diff
=== modified file 'perl/ActiveBlockDev.pm'
--- perl/ActiveBlockDev.pm
+++ perl/ActiveBlockDev.pm
@@ -84,13 +84,17 @@
                }
                my $match = undef;
                for my $p (@{$paths}) {
-                       if ($p =~ m!^/dev/mapper/([^/]*)$!
-                               ||$p =~ m!^/dev/evms/.*$!)
+                       if ( !( $p =~ m!^/dev/evms/\..*$! )
+                               && ( $p =~ m!^/dev/mapper/([^/]*)$!
+                               || $p =~ m!^/dev/evms/.*$! ) )
                        {
-                               if (defined ($match)) {
-                                       Base::fatal ("Don't know how to choose 
between $match and $p for $name");
+                               if (defined ($match) )
+                               {
+
+                                       base::fatal ("Don't know how to choose 
between $match and $p for $name");
                                }
-                               $match = $p;
+
+                                       $match = $p;
                        }
                }
                if (! defined ($match)) {

with "yaird error: No block special file for dm-4 in /dev/mapper or /dev/evms 
(fatal)"

this is strange since dm-4 is not a evms_volume nor an evms disk.

So maybe I just do not understand what yaird tries to do. At this moment our 
evms implementation scan only for evms volumes, an evms volume is an object 
directly mountable or mkfs-able. In this previous case dm-4 was an evms 
object but not an evms volume.

So I think I just need to make EvmsTab scans for all objects and not only for 
volumes, right?

I'll try to do that.

> Is it comprehensible?  The following text describes how it is supposed
> to be, not the implementation we now have.

It have understood I think, but I don't know how comprehensible could be.

> Note that the above is as it should be, not as it currently is implemented.

What are the differences? I saw in the code that it tryes to work like this.

-- 
ESC:wq



More information about the Yaird-devel mailing list