Re: create metadata from DMRAID

Heinz Mauelshagen <[email protected]>
Newsgroups gmane.linux.ataraid
Message-ID <[email protected]>
On Tue, Jul 03, 2007 at 05:31:00PM +0200, Heinz Mauelshagen wrote:
> On Mon, Jul 02, 2007 at 04:51:24PM -0700, Fang, Ying wrote:
> > >
> > >The data structure already exist: raid_set and raid_dev.
> > >For one-level sets, a raid_set structure with multiple raid_dev
> > >structures hanging off.
> > >For 2-level sets (eg. RAID10), a top-level raid_set structure, multiple
> > >bottom level raid_set structures hanging off it and multiple raid_dev
> > >structures hanging off the bottom level ones.
> > >
> > >You got to check, if the properties (ie. the structure mebers) are
> > >sufficient or if we need to add some.
> > >
> > >> Then it calls .create of an
> > >> appropriate handler to build and write metadata to each hard device
> > of
> > >> the raid set.
> > >
> > >It calls a) .create and of that succeeds it'll call b) .write
> > >in a followup step.
> > 
> > You mean the metadata creation procedure is the reverse path of building
> > a raidset from metadata:
> > 1. create a raid set (struct raid_set) and its subsets
> > 2. create a list of raid devices for all subsets
> 
> Yes, a list of raid devices for each lowest level subset.
> 
> > 3. call .create for each raid device to generate a complete metadata
> > attached to the device (struct raid_dev)
> 
> Right, that's where we got to think about needing any additional
> members in structs raid_set and raid_dev in case we can't store 
> enough RAID set or RAID device properties.
> 
> > 4. call .write to write metadata to each hard drive.
> 
> Correct.
> 
> > 
> > 
> > >>
> > >> How about manual and auto rebuilding? Should updating metadata status
> > be
> > >> handled by DMRAID or device drivers?
> > >
> > >By dmraid using dmeventd, which is part of libdevmapper.
> > >You got to create a dmraid DSO for dmeventd to make that happen.
> > >Look at the mirror DSO for dmeventd for an example.
> > >
> > 
> > Is it to call dm_event_handler_create, and dm_event_registered_device to
> > create a dmraid DSO? I didn't find the mirror DSO. Could you give me the
> > name of the file? 
> 
> It is part of liblvm2:
> lib/mirror/mirror.c

s/mirror.c/mirrored.c/ :)

> 
> Heinz
> 
> > 
> > Thanks,
> > Ying
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.