
functions
files
intro
|
|
configuration of raid:
|
raid_lib.ycp
|
|
|
|
----------------------
rd or Rd == raid device, a device like hda1 or /dev/system/usr
that belongs to a raid
Imports
- Mode
- Partitions
- Storage
- Wizard
Local Functions
- CheckItemIsNotRaid (string id)
- CheckItemIsRaid (string id)
- IsRaidCreated (string device, symbol what)
- addRaid (string id, string current_raid)
- add_main_dev_to_partition_map (map<string,map> targetMap)
- all_raid_partitions (map<string,map> targetMap)
- change_raidtab (map<string,map> targetMap)
- create_raidtab (map<string,map> targets)
- get_free_raid_nr (map<string,map> targetMap, integer min)
- get_raid_devices (integer raid_nr)
- get_raid_size_byte (list<map> partition_list, string subdevraidindex, string current_raid_type)
- get_raid_widget_table (list<map> possRdList)
- isItemRd (string id)
- new_raid_list (list<term> all_raids)
- onepartition2raidtab (map raid, list<map> r_partitions)
- removeRaid (string id, string current_raid, symbol what)
|
|
|
local get_raid_devices (integer raid_nr) -> list<term>
|
|
Build raid dev item list e.g.: [`item (`id ("2//dev/md"), "/dev/md2", false)]
- Parameters:
local IsRaidCreated (string device, symbol what) -> boolean
|
|
Checks if a RAID is currently created or if it was already
- Parameters:
local new_raid_list (list<term> all_raids) -> void
|
|
Update Raid ComboBox
- Parameters:
local get_raid_size_byte (list<map> partition_list, string subdevraidindex, string current_raid_type) -> integer
|
|
Get the current sum of raid devices which belong to raid "current_raid"
[ $[
"fsid":142,
"fstype":"RAID",
"nr":"var",
"region":[255, 16],
"type":`primary,
"fsid":131,
"fstype":"Linux native",
"nr":4, "region":[271, 844],
...
out: 10000000200
- Parameters:
partition_list |
|
subdevraidindex |
|
current_raid_type |
|
local addRaid (string id, string current_raid) -> void
|
|
add a partition to the current raid
- Parameters:
local removeRaid (string id, string current_raid, symbol what) -> void
|
|
Removes a partition from its current raid.
- Parameters:
local isItemRd (string id) -> boolean
|
|
belongs the the partition "id" already to a raid
- Parameters:
local CheckItemIsNotRaid (string id) -> boolean
|
|
belongs the the partition "id" already to a raid
if YES: popup a proper Message and return(false)
- Parameters:
local CheckItemIsRaid (string id) -> boolean
|
|
belongs the the partition "id" already to a raid?
if NO: popup a proper Message and return(false)
- Parameters:
local get_raid_widget_table (list<map> possRdList) -> list
|
|
partition list to widget table
in:
[ $["fsid":142,
"fstype":"Linux raid",
"nr":"var",
"region":[255, 16],
"type":`primary],
$[
"fsid":131,
"fstype":"Linux native",
"nr":4, "region":[271, 844],
...
out:
[
`item(`id("/dev/hda1"), "/dev/hda1 ", " 2G ", " LVM ", "md1"),
`item(`id("/dev/hda2"), "/dev/hda2 ", " 1G ", " Linux ", " ")
];
- Parameters:
local get_free_raid_nr (map<string,map> targetMap, integer min) -> string
|
|
number for /dev/mdX, 0 for /dev/md0, 1 for /dev/md1
- Parameters:
local add_main_dev_to_partition_map (map<string,map> targetMap) -> map
|
|
Add the main device ( "/dev/hda") to the partition map.
partition = $[
"nr" : 1,
"main_dev": "/dev/hda",
......
];
Use change !!!!!!!!!
- Parameters:
- Return value:
local all_raid_partitions (map<string,map> targetMap) -> list<map>
|
|
- Parameters:
- Return value:
|
a list with all partition that have a key raid_name != "". |
local onepartition2raidtab (map raid, list<map> r_partitions) -> string
|
|
Create one raidtab entry.
- Parameters:
raid |
raid partition map |
r_partitions |
all raid partitions |
- Return value:
local create_raidtab (map<string,map> targets) -> string
|
|
Build the initial /etc/raidtab by installation.
If no raids are to be created, an empty string in returned.
- Parameters:
- Return value:
|
a string that has /etc/raidtab format. |
local change_raidtab (map<string,map> targetMap) -> string
|
|
Change an existing /etc/raidtab ( in running system )
-> add new entries for new raids
-> remove entries of deleted raids
-> no change in /etc/raidtab for modified raids
- Parameters:
|