]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(TEST ISCSI): try to debug md error 524
authorHarald Hoyer <harald@redhat.com>
Mon, 12 Apr 2021 09:13:21 +0000 (11:13 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 16 Apr 2021 14:27:16 +0000 (16:27 +0200)
While creating the striped md raid0 sometimes this error occures:

```
mdadm: Defaulting to version 1.2 metadata
mdadm: RUN_ARRAY failed: Unknown error 524
  Failed to clear hint file.
  Device /dev/md0 not found.
Powering off.
```

Add debug output with the size of the disks.

Also create disks with multiple of 4096.

test/TEST-30-ISCSI/create-client-root.sh
test/TEST-30-ISCSI/test.sh
test/TEST-35-ISCSI-MULTI/create-client-root.sh
test/TEST-35-ISCSI-MULTI/test.sh

index c34ce069f8eebdeffb9d7ce92dc7783ccf35c026..04cfaeb7e0e5798ca8f8017fbb6daa69841e5d06 100755 (executable)
@@ -7,6 +7,9 @@ rm -f -- /etc/lvm/lvm.conf
 udevadm control --reload
 udevadm settle
 
+echo "Size of /dev/sdc and /dev/sdd"
+blockdev --getsize64 /dev/sdc /dev/sdd
+
 mkfs.ext3 -j -L singleroot -F /dev/sda \
     && mkdir -p /sysroot \
     && mount /dev/sda /sysroot \
index 22025dcabbb85690d04ba3945ae81f2a19ae85cf..2e558f882e754cfa1ce10071dacebdc60a9740b0 100755 (executable)
@@ -129,9 +129,12 @@ test_setup() {
     fi
 
     # Create the blank file to use as a root filesystem
-    dd if=/dev/zero of="$TESTDIR"/root.ext3 bs=1M count=100
-    dd if=/dev/zero of="$TESTDIR"/iscsidisk2.img bs=1M count=50
-    dd if=/dev/zero of="$TESTDIR"/iscsidisk3.img bs=1M count=50
+    rm -f "$TESTDIR"/root.ext3
+    dd if=/dev/zero of="$TESTDIR"/root.ext3 bs=4096 count=$((200 * 256))
+    rm -f "$TESTDIR"/iscsidisk2.img
+    dd if=/dev/zero of="$TESTDIR"/iscsidisk2.img bs=4096 count=$((100 * 256))
+    rm -f "$TESTDIR"/iscsidisk3.img
+    dd if=/dev/zero of="$TESTDIR"/iscsidisk3.img bs=4096 count=$((100 * 256))
 
     kernel=$KVERSION
     # Create what will eventually be our root filesystem onto an overlay
@@ -175,7 +178,7 @@ test_setup() {
         export initdir=$TESTDIR/overlay
         # shellcheck disable=SC1090
         . "$basedir"/dracut-init.sh
-        inst_multiple sfdisk mkfs.ext3 poweroff cp umount setsid dd sync
+        inst_multiple sfdisk mkfs.ext3 poweroff cp umount setsid dd sync blockdev
         inst_hook initqueue 01 ./create-client-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules
index c34ce069f8eebdeffb9d7ce92dc7783ccf35c026..04cfaeb7e0e5798ca8f8017fbb6daa69841e5d06 100755 (executable)
@@ -7,6 +7,9 @@ rm -f -- /etc/lvm/lvm.conf
 udevadm control --reload
 udevadm settle
 
+echo "Size of /dev/sdc and /dev/sdd"
+blockdev --getsize64 /dev/sdc /dev/sdd
+
 mkfs.ext3 -j -L singleroot -F /dev/sda \
     && mkdir -p /sysroot \
     && mount /dev/sda /sysroot \
index 14e05c0619c0c22a1bd37d8d3baf58e32a60781d..62dd41ec8370bd8bcd65297fcb4cfa127f35c714 100755 (executable)
@@ -145,9 +145,12 @@ test_setup() {
     fi
 
     # Create the blank file to use as a root filesystem
-    dd if=/dev/zero of="$TESTDIR"/root.ext3 bs=1M count=180
-    dd if=/dev/zero of="$TESTDIR"/iscsidisk2.img bs=1M count=90
-    dd if=/dev/zero of="$TESTDIR"/iscsidisk3.img bs=1M count=90
+    rm -f "$TESTDIR"/root.ext3
+    dd if=/dev/zero of="$TESTDIR"/root.ext3 bs=4096 count=$((200 * 256))
+    rm -f "$TESTDIR"/iscsidisk2.img
+    dd if=/dev/zero of="$TESTDIR"/iscsidisk2.img bs=4096 count=$((100 * 256))
+    rm -f "$TESTDIR"/iscsidisk3.img
+    dd if=/dev/zero of="$TESTDIR"/iscsidisk3.img bs=4096 count=$((100 * 256))
 
     kernel=$KVERSION
     # Create what will eventually be our root filesystem onto an overlay
@@ -191,7 +194,7 @@ test_setup() {
         export initdir=$TESTDIR/overlay
         # shellcheck disable=SC1090
         . "$basedir"/dracut-init.sh
-        inst_multiple sfdisk mkfs.ext3 poweroff cp umount setsid dd
+        inst_multiple sfdisk mkfs.ext3 poweroff cp umount setsid dd sync blockdev
         inst_hook initqueue 01 ./create-client-root.sh
         inst_hook initqueue/finished 01 ./finished-false.sh
         inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules