begin_script to mirror two drives on a Netra T2000

This is a quick script to configure mirroring of two drives in a Netra T2000 under Solaris. You may need to alter the device settings for your system, but once you have a script like this that works, it can save lots of time when rolling out multiple servers and serves as a mental backup for the future when you need to repeat the configuration.


#!/bin/sh
# Delete any pre-existing raidsets
echo
echo Delete any preexisting raidsets
raidctl -d -f c0t1d0
echo running devfsadm
echo
devfsadm -Cv

# Label the drives and set the drive type
echo
echo Label the drives and set the drive type
printf “type\n0\nlabel\ny\n” | format -d c0t1d0

# Create the raid sets for both disks
echo
echo Create the raid sets for both disks
raidctl -c -f c0t1d0 c0t3d0

# Relabel
echo
echo Relabel
printf “type\n0\nlabel\ny\n” | format -d c0t1d0

# print out

raidctl -l c0t1d0

exit 0

The Conversation

Follow the reactions below and share your own thoughts.