RE: create metadata from DMRAID

"Fang, Ying" <[email protected]>
Newsgroups gmane.linux.ataraid
Message-ID <39B20DF628532344BC7A2692CB6AEE07017DEE99@orsmsx420.amr.corp.intel.com>
>> 2. A metadata handler needs build metadata based on several data such
as
>> raid set name, raid level, size, etc. Can they be carried into as a
>> string argument or a field in "struct lib_context"? It's possible to
>> build disk sets, raid device sets, and raid set sets too.
>
>No, a create_set() function needs adding to the library, which can
>be called with a struct holding the respective parameters and lists of
>devices involved.
>
>That function will derive properties of raid_dev arguments
>for the metadata format handler .create method.
>
>commands.[ch] need the respective extensions to support
>the "-C/--create" command line option.
>
>> 3. Can I design my own option format to create metadata by DMRAID
such
>> as:"dmraid -ms isw_xxxxxx_raidSet1" (d and D have been used.) to
delete
>> a raid set and "dmraid -f isw -w "isw_xxxx_raidNewSet device-mapper
>> format" where device-mapper format is "0 1028160 striped 2 256
/dev/sdb
>> 0 /dev/sdc 0". But I have trouble for nested raid setup and try to
use
>> raid10 or raid51 to identify it.
>
>To create a RAID set:
>dmraid -C isw_xxxxxx_raidSet1 [--layout LAYOUT] [--size X[kmgt]]
>[DevicePath...]
>
>LAYOUT = string types defined in metadata.c (see get_type() function;
>eg. "mirror").
>X = size in KB, MB, GB, TB.
>
>In the isw case, which is different from most other metadata format
>handlers
>but DDF1, isw.c's create method would need to cover more complex
>allocation,
>because other volumes might already be on the devices.
>
>To delete a specific RAID set we can add to the existing erase option:
>
>dmraid -rE isw_xxxxxx_raidSet1
>


Let me rephrase what you've said. The input of DMRAID includes all
necessary attributes of a raid set (called volume in ISW) to be created.
An internal function, create_set, grabs user's choices and fills into a
data structure, e.g. struct raidset_attr. Then it calls .create of an
appropriate handler to build and write metadata to each hard device of
the raid set. 

Also struct raidset_attr should cover parameters used to setup spare
devices, resize an old raid set, and migrate non-raid device to a raid
set, etc. 

How about manual and auto rebuilding? Should updating metadata status be
handled by DMRAID or device drivers?


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.