begin_script to mirror two drives on a Netra T2000

Home -> UNIX -> Solaris -> System administration

493 views

From the computer of: weezlboy (2 recipes)
Created: Jul 29, 2008     Updated: Aug 03, 2008


Add a comment

Add to:
Add to stumbleuponAdd to del.icio.usDigg itAdd to FURL

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

Subscribe to the Tech-Recipes Newsletter

You can get tips like this delivered in your email every week!

Enter your Email

We will never, ever sell your email address or spam you.





Related recipes:

  ZFS: Create a mirrored storage pool
  Solaris: Delete ZFS slices from a disk
  ZFS: Set or change the mount point of a filesystem
  ZFS: How to fsck or check filesystem integrity with scrub
  Display Solaris system configuration with prtconf
  Solaris software RAID
  ZFS: List or view filesystems
  Solaris: Copy disk labels to duplicate drive layout
  Determine the CD-ROM device target id in Solaris
  ZFS: Ten reasons to reformat your hard drives

 

Sponsored links

 

Login

Nickname

Password

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.