|
21 |
|
21 |
|
22 |
FS_TYPE="$4" |
22 |
FS_TYPE="$4" |
23 |
MOUNTPOINT="$5" |
23 |
MOUNTPOINT="$5" |
24 |
DEVICES="$6" |
24 |
RAID_DEVICES=$(echo $6 | sed -e "s/#/ /g") |
25 |
SPARE_DEVICES="$7" |
25 |
SPARE_DEVICES=$(echo $7 | sed -e "s/#/ /g") |
26 |
|
26 |
EXTRA_ARGS=$(echo $8 | sed -e "s/#/ /g") |
27 |
RAID_DEVICES=$(echo $DEVICES | sed -e "s/#/ /g") |
|
|
28 |
|
29 |
SPARE_DEVICES=$(echo $SPARE_DEVICES | sed -e "s/#/ /g") |
30 |
|
27 |
|
31 |
NAMED_SPARES=$(echo $SPARE_DEVICES | wc -w) |
28 |
NAMED_SPARES=$(echo $SPARE_DEVICES | wc -w) |
32 |
|
29 |
|
|
76 |
|
73 |
|
77 |
if ! log-output -t partman-auto-raid \ |
74 |
if ! log-output -t partman-auto-raid \ |
78 |
mdadm --create /dev/md$MD_NUM --auto=yes --force -R -l raid$RAID_TYPE \ |
75 |
mdadm --create /dev/md$MD_NUM --auto=yes --force -R -l raid$RAID_TYPE \ |
79 |
-n $DEV_COUNT $MDADM_PARAMS |
76 |
-n $DEV_COUNT $MDADM_PARAMS $EXTRA_ARGS |
80 |
then |
77 |
then |
81 |
logger -t partman-auto-raid "Error creating array /dev/md$MD_NUM" |
78 |
logger -t partman-auto-raid "Error creating array /dev/md$MD_NUM" |
82 |
exit 1 |
79 |
exit 1 |
Lines 119-128
while [ -n "$recipes" ]; do
|
Link Here
|
---|
|
119 |
|
116 |
|
120 |
# Do the recipe! |
117 |
# Do the recipe! |
121 |
echo $recipe >/tmp/partman-auto-raid-recipe |
118 |
echo $recipe >/tmp/partman-auto-raid-recipe |
122 |
read raidtype devcount sparecount fstype mountpoint devs sparedevs \ |
119 |
read raidtype devcount sparecount fstype mountpoint devs sparedevs args \ |
123 |
</tmp/partman-auto-raid-recipe |
120 |
</tmp/partman-auto-raid-recipe |
124 |
create_raid $raidtype $devcount $sparecount $fstype $mountpoint \ |
121 |
create_raid $raidtype $devcount $sparecount $fstype $mountpoint \ |
125 |
$devs $sparedevs |
122 |
$devs $sparedevs $args |
126 |
done |
123 |
done |
127 |
|
124 |
|
128 |
exit 0 |
125 |
exit 0 |
129 |
- |
|
|
130 |
-- |
131 |
doc/devel/partman-auto-raid-recipe.txt | 5 ++++- |
126 |
doc/devel/partman-auto-raid-recipe.txt | 5 ++++- |
132 |
1 file changed, 4 insertions(+), 1 deletion(-) |
127 |
1 file changed, 4 insertions(+), 1 deletion(-) |