for disk in $(ls /dev/disk/by-path/pci-0000:03:00.0-sas*lun-0); do echo "zeroing $disk" dd if=/dev/zero of=$disk bs=1M count=10 sync echo "creating RAID paritions on SAS disks" (echo n; echo p; echo 1; echo ; echo; echo t; echo fd; echo w) | fdisk $disk echo "verifying..." (echo p; echo q) | fdisk $disk doneThis is just a sample of the script found here:
https://github.com/ppetraki/storage-tools/blob/master/create-mdraid-from-scratch.sh
Which will take your disks from bare block devices all the way to running md and create the config.
No comments:
Post a Comment