Document ID: 0002
Topic: Disks, Filesystems, Volume Manager
Created: 2003-10-10
Last Updated: 2007-02-17
Author: Stefan Parvu
References: Solaris Volume Manager
OS: Solaris Express. Applicable to Solaris 8, 9, 10

Solaris Volume Manager

The Solaris volume manager, SVM, comes with the latest version of Solaris, Solaris OE 9. This is know as Solstice DiskSuite[tm] from previous versions of Solaris. Several new features are present: soft partitions, monitoring active disks, access via SMC. I will provide a simple guide how you can create a RAID 0 concatenation or stripe, a RAID 1 configuration mirroring the root, var and swap slices and maybe a RAID 5 in the near future. Please let me know if you find mistakes or if you have any comments



Note:

Table of Contents

RAID 0

RAID 1


Concatenation

I will describe how you can create four mount points, /u01 /u02 /u03 and /u04 for Oracle software. This is a basic exercise and should be avoided when are you planning to setup a real database environment. Concatenation does not offer a very good I/O performance and better choose a stripe model.

We will use a simple RAID 0 concatenation between two IDE disks (c0t0d0 and c0t1d0) to do this. As you might see these disks are on the same IDE channel. Consider using them as separeate channels. On the first disk it is space left for the last slice, 7th, which will hold four different soft partitions, d1-d4. On the second disk, c0t1d0, four slices will be created as c0t1d0s0, c0t1d0s1, c0t1d0s3, c0t1d0s4 where all these will concatenate with the first four soft partitions from disk one, c0t0d0, in order to create the OFA mount points /u01 - /u04. Let's start !

For this example we will use two IDE disks, c0t0d0 and c0t1d0. I think many people can get two cheap IDE disks and play around under Solaris. The first disk has already six slices defined and I will create the last slice, the 7th one.

Image c0pic

Stripe

We will create a basic stripe between two IDE disks, c0t0d0 and c0t2d0. We will stripe two slices together to create a mount point, which it will be used to install some software later on. You can create a stripe using as many possible slice you like if you have disks.

When you define a stripe create equal size slices ! Previously under concatenation example you can use different sizes of slices as you like. Remember than under Solaris SPARC you can have max to 7 slices per disk. Using Volume manager now you can define soft partitions which extend this limitation. So if we have the following layout of the disk:




Image format_c0t0d0

As you can see the slice 0 holds the root, slice 1 represents the swap used under this system and the slice 3 is the var to hold the logs. The 4th slice had been defined as a dedicated crash dump device. The 7th slice holds the Volume Manager state replicas. So the 5th slice has space, around 24.41GB free and it is the only one available under this configuration. We are planning to define four more slices like /u01 /u02 /u03 and /u04 but we can't because we have only two available slices: 5th and 6th. For this we will make use of soft partitions. We will take the 5th slice and break it into four distinct soft partitions.

Let's start to define four soft partitions under c0t0d0s5

Create under c0t0d0s5 four different soft partitions: 
 d31, d32, d33, d34 as 6GB, 7GB, 4GB and 7GB:
 # metainit d31 -p c0t0d0s5 5g
 d31: Soft Partition is setup

 # metainit d32 -p c0t0d0s5 7500m
 d32: Soft Partition is setup

 # metainit d33 -p c0t0d0s5 4400m
 d33: Soft Partition is setup

 # metainit d34 -p c0t0d0s5 7500m
 d34: Soft Partition is setup

To create a stripe you should create the exact four slices 
to the second disk, c0t2d0:
 # metainit d41 -p c0t2d0s5 5g
 d41: Soft Partition is setup

 # metainit d42 -p c0t2d0s5 7500m
 d42: Soft Partition is setup

 # metainit d43 -p c0t2d0s5 4400m
 d43: Soft Partition is setup

 # metainit d44 -p c0t2d0s5 7500m
 d44: Soft Partition is setup

Now we have four soft partitions, or we can consider them as four different slices, 
under first disk and another four equal size soft partitions, to the second disk. 
We could stripe them and create four mount points to install, Oracle software, for instance.
 # metainit d51 1 2 d31 d41
 d51: Concat/Stripe is setup

 # metainit d52 1 2 d32 d42
 d52: Concat/Stripe is setup

 # metainit d53 1 2 d33 d43
 d53: Concat/Stripe is setup

 # metainit d54 1 2 d34 d44
 d54: Concat/Stripe is setup

Our new volumes are: d51, d52, d53 and d54. These will be our mount points 
what we are looking for. We just have to format and add them to the vfstab.
 # newfs -v /dev/md/rdsk/d51
 # newfs -v /dev/md/rdsk/d52
 # newfs -v /dev/md/rdsk/d53
 # newfs -v /dev/md/rdsk/d54

Create the mount points: /u01 /u02 /u03 and /u04 and mount the previous volumes
 # mkdir /u01 /u02 /u03 /u04
 # mount -F ufs -o logging /dev/md/dsk/d51 /u01
 # mount -F ufs -o logging /dev/md/dsk/d52 /u02
 # mount -F ufs -o logging /dev/md/dsk/d53 /u03
 # mount -F ufs -o logging /dev/md/dsk/d54 /u04


Mirror

For mirroring purpose we would need to have 2 identical hard disks, SCSI, SATA or PATA. For a cheap solution you could buy 2 SATA disks for less than 150 euros. I prefer Seagate disks. I will describe all these examples under Ultra 10 workstation. We will plan to mirror root, swap and var slices.

First there are couple of things to make sure they are done in order to get a mirroring solution under Solaris:



Back to main homepage

This document is Copyright (c) 2007 Stefan Parvu
Document License: PDL