[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#335230: More Code also Random, but less :-)



Alle 23:00, martedì 1 novembre 2005, hai scritto:

> > Could Steinar, the maintainer of evms, could help to clear us some
> > things?
>
> You have two issues I can see from the previous information in the bug:
>
> - The swapfs plugin not loading. This is probably because you do not have
>   /sbin/swapon (or /sbin/mkswap, I forget). You don't need the plugin for
>   yaird, so you can simply ignore it. (Or perhaps not if you want to use
>   swsusp?)

If it is not fatal, no problem then, at least for now.

> - "devfs_mk_dev: could not append to parent for md/0" This one is harder.
>   Do you have a writable /dev? Could you check out
> /var/log/evms-engine.log? (evms_activate will create it if /var/log exists
> and is writable.) Give evms_activate -d 9 to increase the amount of logging
> if you still can't find it.

No idea on that.

But you missed to clear us if mdadm and vgchange are needed to evms to shows 
up in case of compatibility volumes, but I think so anyway so I produced this 
random code:

so EvmsTab could have in init this lines too:

-------------------
# Find if compatibility volumes are needed
		my @compatdevs = ();
		my $lines = Base::getOutput
			('/usr/sbin/evms_query', 'regions', $volume);
		for my $line (@{$lines}) {
			if ($line =~ /^lvm2\/(\w+)\/(\w+)$/) {
				# it is a LVM2 comp vol
				my $devname= "/dev/mapper/$1-$2";

				my $devno = Base::getDevnoByRealName ($devname); 
				# there is already a function that does that?

				push @compatdevs, $devno;
			} 
			else { # should be md/mdX instead
				my $infos = Base::getOutput 
					('/usr/sbin/evms_query', 'info', $line);
				for my $info (@{$infos}) {
					if ($info =~ /^Device Number: (\d+),(\d+)$/) {
						my $devno = "$1:$2";
						push @compatdevs, $devno;
					}
				}
			}
			
		}
-------------------

And in Plan.pm at tryEvms we should also add:

---------
for my $c (@{$ed->compatdevs()}) {
		my $pdev = ActiveBlockDevTab::findByDevno ($c);
		addDevicePlan ($actions, $pdev, $working);
	}
-------

Im setting up qemu too for tests so this code is obviously untested.


-- 
ESC:wq



Reply to: