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

Bug#335230: More stub code



On Tue, October 25, 2005 10:13 pm, Erik van Konijnenburg said:
> On Tue, Oct 25, 2005 at 08:09:06PM +0200, Mattia Dongili wrote:
>> I've been able to setup an almost-working evms box (at least evms_query
>> reports useful data).
>>
>> I tried following Erik's suggestions and also implemented part of the
>> init() method and reworked some of Marco's code.
>> Some parts are still to be finished, but I'd like some feedback
>> expecially on evms_query commands and the expected content of some
>> EvmsDev properties.
>
> The init() function looks OK.  Detail: you're doing a fork/exec of
> "evms_query info ..." just to find a major/minor number.  Using
> Base::devno() is cheaper: just a stat() system call.

Yes, that was my first implementation actually. But the Device Number in
evms_query info doesn't match the real device maj/min and I really don't
know which one might be useful when filtering with findByDevNo eg:

# evms_query info /dev/evms/e3
Name: /dev/evms/e3
Type: Volume
Device Number: 0:0
Size (sectors): 19531006
Filesystem: Unknown

# evms_query disks /dev/evms/e3
hda

# ls -l /dev/hda
brw-rw----  1 root disk 3, 0 2005-10-25 14:39 /dev/hda

My current evms setup is really stupid so I'm probably missing a lot of
more complex or even corner cases. :)
And in my case 'Device Number' is always 0:0 ...hmmm...
And more: in case an evms volume spans multiple devices shall we provide
an array of devno? Isn't ok to have an array of disk names (currently
EvmsTab->devices) and loop on them in tryEvms (as in the tryRaid case)?

Marco, could you also provide full output in your case?

> The properties look OK to find devices, but don't yet provide enough
> information to decide whether to load raid0/raid5.  The crude fix is
> to just load them always ...   Marco, opinions?

well, AFAICT you might get this by looking at the needed plugins:

Plug-in ID: 531640325
Full Name: MD Raid 1 Region Manager
Short Name: MDRaid1RegMgr
OEM: IBM
Version 1.1.18
...
Plug-in ID: 531640326
Full Name: MD RAID0 Region Manager
Short Name: MDRaid0RegMgr
OEM: IBM
Version 1.1.18
...
Plug-in ID: 531640327
Full Name: MD RAID 4/5 Region Manager
Short Name: MDRaid5RegMgr
OEM: IBM
Version 1.1.18

so if any of the volumes makes use of one of those we can take such a
decision knowingly

> Here's a twist: what if there are two devices on evms that yaird accesses?
> So far we've been able to do a depth-first walk over devices needed,
> but if evms_activate does not take an argument indicating which device
> we're trying to activate, we'll need to find an alternative approach.

evms_activate will try to discover them all. I still don't get why this is
an issue but this is due to limited computing power in my brain :)

-- 
mattia
:wq!





Reply to: