RE: create metadata from DMRAID

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

 



 

>-----Original Message-----
>From: ataraid-list-bounces@xxxxxxxxxx 
>[mailto:ataraid-list-bounces@xxxxxxxxxx] On Behalf Of Heinz Mauelshagen
>Sent: Tuesday, July 03, 2007 8:31 AM
>To: Fang, Ying
>Cc: ATARAID (eg, Promise Fasttrak, Highpoint 370) related discussions
>Subject: Re: create metadata from DMRAID
>
>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.
>

The parameters we need to be passed to isw are:
 - Volume name
 - RAID level
 - stripe size
 - size of the volume
 - list of devices 

Of these all except the stripe size can be sent through raid_dev. Stripe
size is available only in raid_set. If we can send the stripe size
through raid_dev structure, that will be the only structure we need to
send to isw. Also in case of RAID 10, we need to send the top level
also. So, if we can accommodate these two parameters, we can do away
with building and sending raid_set structure.
I am assuming we can send the volume size through sectors field of
raid_dev, eventhough that field actually indicates total sectors on the
disk. 

>> 4. call .write to write metadata to each hard drive.
>
>Correct.
>

I feel there is no need to make an extra call to .write after .create.
The create function does all the creation of the metadata and all that
is left is just write it to the disks. If you want to use extra .write
function to write this, it will cause confusion as to write the
previously created data with .create or write new data as the .write
function is used currently.

>> 
>> 
>> >>
>> >> 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
>
>Heinz
>
>> 
>> Thanks,
>> Ying
>
>_______________________________________________
>Ataraid-list mailing list
>Ataraid-list@xxxxxxxxxx
>https://www.redhat.com/mailman/listinfo/ataraid-list
>

_______________________________________________
Ataraid-list mailing list
Ataraid-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ataraid-list

[Index of Archives]     [Linux RAID]     [Linux Device Mapper]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Yosemite Campgrounds]     [AMD 64]

  Powered by Linux