From 83da1359dfca7eb5e07838abc868d6bc97ce3046 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 15 Jun 2022 08:40:23 -0400 Subject: [PATCH] Add a sample vroc 'pre' script for reference --- misc/vroc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 misc/vroc diff --git a/misc/vroc b/misc/vroc new file mode 100644 index 00000000..ee6b72a8 --- /dev/null +++ b/misc/vroc @@ -0,0 +1,15 @@ +DEVICES="/dev/sda /dev/sdb" +RAIDLEVEL=1 +mdadm --detail /dev/md* | grep imsm >& /dev/null && exit 0 +lvm vgchange -a n +mdadm -S -s +NUMDEVS=$(for dev in $DEVICES; do + echo wipefs -a $dev +done|wc -l) +for dev in $DEVICES; do + wipefs -a $dev +done +mdadm -C /dev/md/imsm0 $DEVICES -n $NUMDEVS -e imsm +mdadm -C /dev/md/md0_0 /dev/md/imsm0 -n $NUMDEVS -l $RAIDLEVEL +mdadm -S -s +mdadm --assemble --scan