]> code.delx.au - monosys/commitdiff
dmsetup-hack
authorJames Bunton <jamesbunton@delx.au>
Mon, 29 Jan 2024 13:17:11 +0000 (00:17 +1100)
committerJames Bunton <jamesbunton@delx.au>
Mon, 29 Jan 2024 13:17:11 +0000 (00:17 +1100)
hacks/dmsetup-hack [new file with mode: 0755]

diff --git a/hacks/dmsetup-hack b/hacks/dmsetup-hack
new file mode 100755 (executable)
index 0000000..a4a334c
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+DEVNAME="ST3000DM001-Z1F4RTWN_then_WD15EADS-WMAVU0714940"
+echo -e '0 5858433934 linear /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F4RTWN-part3 0\n5858433934 2928175821 linear /dev/nbd0 0' > "/tmp/$DEVNAME"
+dmsetup create "$DEVNAME" --verbose --table "/tmp/$DEVNAME"
+