Skip to content

Commit

Permalink
Merge pull request #344 from aafeijoo-suse/059-bsc1226412
Browse files Browse the repository at this point in the history
fix(mdraid): try to assemble the missing raid device (bsc#1226412)
  • Loading branch information
aafeijoo-suse authored Jun 28, 2024
2 parents ab27ef7 + 1356a35 commit cf68881
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules.d/90mdraid/mdraid_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ _md_force_run() {
local _md
local _UUID
local _MD_UUID
local _LEFT_UUID
local _uuid

_MD_UUID=$(getargs rd.md.uuid -d rd_MD_UUID=)
[ -n "$_MD_UUID" ] || getargbool 0 rd.auto || return

if [ -n "$_MD_UUID" ]; then
_LEFT_UUID=$(str_replace "$_MD_UUID" "-" ":")
_MD_UUID=$(str_replace "$_MD_UUID" "-" "")
_MD_UUID=$(str_replace "$_MD_UUID" ":" "")

Expand All @@ -51,6 +54,9 @@ _md_force_run() {
)

[ -z "$_UUID" ] && continue
# remove the UUID already assembled from the list
_LEFT_UUID=$(str_replace "$_LEFT_UUID" "$_UUID" "")

_UUID=$(str_replace "$_UUID" ":" "")

# check if we should handle this device
Expand All @@ -65,6 +71,14 @@ _md_force_run() {
_md_start "${_md}"
done
fi

# try to assemble all the left md devices that should be assembled
# probably failed because of timing issue in the first beginning
if [ -n "$_LEFT_UUID" ]; then
for _uuid in ${_LEFT_UUID}; do
mdadm --assemble --scan --uuid="$_uuid"
done
fi
}

_md_force_run
1 change: 1 addition & 0 deletions suse/README.susemaint
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,5 @@ b5a35f9d feat(zfcp_rules): remove zfcp handling consolidated in s390-tools
22f51730 fix(znet): append to udev rules so each rd.znet_ifname is effective
2d8fa8be refactor(ifcfg): delete code duplication using iface_get_subchannels()
457e66e6 feat(ifcfg): minimize s390-specific network configuration aspects
3fd43858 fix(mdraid): try to assemble the missing raid device

0 comments on commit cf68881

Please sign in to comment.