Path: blob/main/tools/regression/ccd/layout/ccd.sh
48249 views
#!/bin/sh12set -e34if mount | grep ccd3 ; then5echo "ccd3 seems to be mounted"6exit 17fi89(10ccdconfig -u ccd3 || true11mdconfig -d -u 90 || true12mdconfig -d -u 91 || true13mdconfig -d -u 92 || true14mdconfig -d -u 93 || true15) > /dev/null 2>&11617mdconfig -a -t malloc -s $1 -u 9018mdconfig -a -t malloc -s $2 -u 9119mdconfig -a -t malloc -s $3 -u 9220mdconfig -a -t malloc -s $4 -u 932122ccdconfig -v ccd3 $5 $6 /dev/md90 /dev/md91 /dev/md92 /dev/md9323./a > /dev/ccd32425md5 < /dev/md9026md5 < /dev/md9127md5 < /dev/md9228md5 < /dev/md932930(31./b < /dev/md90 | sed -e 1,16d -e 's/^/md90 /'32./b < /dev/md91 | sed -e 1,16d -e 's/^/md91 /'33./b < /dev/md92 | sed -e 1,16d -e 's/^/md92 /'34./b < /dev/md93 | sed -e 1,16d -e 's/^/md93 /'35) | sort +2n | awk '36{37if ($1 != l1) {38if (l1 != "") {39if (l1 == "md90") printf ""40if (l1 == "md91") printf " "41if (l1 == "md92") printf " "42if (l1 == "md93") printf " "43print l3,l2,l44}45l1 = $146l2 = $247l3 = $348l = 0;49}50l++;51}52END {53if (l1 == "md90") printf ""54if (l1 == "md91") printf " "55if (l1 == "md92") printf " "56if (l1 == "md93") printf " "57print l3,l2,l58}59'606162