b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / share / dracut / modules.d / 90dmraid /
Filename/usr/share/dracut/modules.d/90dmraid/dmraid.sh
Size930
Permissionrwxr-xr-x
Ownerapache
Create time23-Dec-2025 17:41
Last modified19-Jun-2018 21:13
Last accessed19-Jun-2018 21:13
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
#!/bin/sh

. /lib/dracut-lib.sh

DM_RAIDS=$(getargs rd_DM_UUID=)

DM_CLEANUP="no"

# run dmraid if udev has settled
info "Scanning for dmraid devices $DM_RAIDS"
SETS=$(dmraid -c -s)

if [ "$SETS" = "no raid disks" -o "$SETS" = "no raid sets" ]; then
return
fi

info "Found dmraid sets:"
echo $SETS|vinfo

if [ -n "$DM_RAIDS" ]; then
# only activate specified DM RAIDS
for r in $DM_RAIDS; do
for s in $SETS; do
if [ "${s##$r}" != "$s" ]; then
info "Activating $s"
dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
[ -e "/dev/mapper/$s" ] && kpartx -a -p p "/dev/mapper/$s" 2>&1 | vinfo
udevsettle
fi
done
done
else
# scan and activate all DM RAIDS
for s in $SETS; do
info "Activating $s"
dmraid -ay -i -p --rm_partitions "$s" 2>&1 | vinfo
[ -e "/dev/mapper/$s" ] && kpartx -a -p p "/dev/mapper/$s" 2>&1 | vinfo
done
fi