RE: create metadata from DMRAID

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

>> 2. A metadata handler needs build metadata based on several data such
>> 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
>> as:"dmraid -ms isw_xxxxxx_raidSet1" (d and D have been used.) to
>> a raid set and "dmraid -f isw -w "isw_xxxx_raidNewSet device-mapper
>> format" where device-mapper format is "0 1028160 striped 2 256
>> 0 /dev/sdc 0". But I have trouble for nested raid setup and try to
>> raid10 or raid51 to identify it.
>To create a RAID set:
>dmraid -C isw_xxxxxx_raidSet1 [--layout LAYOUT] [--size X[kmgt]]
>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
>but DDF1, isw.c's create method would need to cover more complex
>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?


Ataraid-list mailing list

[Linux RAID]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Photos]     [Yosemite Photos]     [Yosemite News]     [AMD 64]
  Powered by Linux