Solaris 10
Features and Setup



This page is intended for the novice Solaris 10 administrator who needs more information on Solaris and some of the features it offers.

On this page I will show you some cool features that you can use with Solaris after you installed it. It is not an administration page. If you want to look at all the features and how to implement them them in detail, then I suggest you head on over to the Oracle website for more information.

They have detailed system administration pages and docs.

On my Solaris 10 pages I will just show you some of the features that I use quite often and how to create and configure these.

We'll have a look at the following Solaris 10 features.

UFS (Unix File System) - Formatting a disk, creating filesystems and mounting these filesystems.

Solaris Volume Manager (SVM) - Creating volumes using multiple disks in various raid configurations.

ZFS (Zetabyte File System) - Creating filesystems using ZFS.

IPMP (Internet Protocol Multi Pathing) - Setup IPMP for redundancy and outbound load balancing.

Solaris Live Upgrade - Upgrading and patching you Solaris 10 system with minimal downtime.

Solaris Cluster - What is a cluster and how to setup a cluster in Solaris 10.

iSCSI - What is iSCSI and how to configure iSCSI in Solaris 10 and for using ZFS as targets and Windows as initiator, have a look at this link. How to setup a iSCSI Initiator using Windows 7

Solaris zones or containers - Built in virtualization software where you create zones that operate as independent systems.

These are just some of the great features that Solaris 10 offers. I will not discuss how to install Solaris 10. There are hundreds of docs and websites on the web where installation is discussed in detail. I just want to show you some cool features and how to quickly set these up.

So, lets start. The first thing we will look at is creating filesystems.

Solaris UFS filesystem


There will be times when you would need to add a disk or disks to a Solaris 10 system, and create a file system on the disk to be able to use it. These disks might be physical disks or lun's (logical unit number) presented from a hardware raid storage device.

Whatever the disks are, you need to format it and create a filesystem on the disk so it can be mounted and used by applications. So, how do we do it. It's not that difficult at all, let me show you how.

First of all, we need to check whether we can see the disk on Solaris 10. There are various ways to do this, but I just use the format command on Solaris. This is a quick way of checking if new disks, or luns, have been added to the system.

bash-3.00# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0d0 DEFAULT cyl 2085 alt 2 hd 255 sec 63
          /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
       1. c2t0d0 DEFAULT cyl 1021 alt 2 hd 64 sec 32
          /pci@0,0/pci8086,2829@d/disk@0,0
Specify disk (enter its number):

If we look at the output, we see two disks. The c0d0 is the internal disk where Solaris 10 is installed and c2t0d0, which is an extra disk added at some time. Let's discuss the disk name. The disk is called, c0d0. This is a typical example of a x86, ide disk name where Solaris 10 is running on an Intel or AMD type CPU.

For SATA and SAS, the disks usually have the, t in the logical path as well. On SPARC systems the disks will be, c0t0d0.

The basics remain the same. The c0 is the controller number. The d0, for x86 is the disk number or lun number. This is typical for internal disks or virtual disks on VirtualBox virtual machines using ide controllers. I'm using virtualbox with Solaris 10 installed in the VM. The internal disk is an ide disk. I also added a virtual SATA controller to the VM and added 4 disks to it.

The logical device path to a device is as follows, c0 is the controller on the Solaris host, t0 is the target controller on the storage system, d0 is the lun number or disk number. To access a specific partition, you would use s0 or s1 or whatever partition you want to refer to. So the full device name to access slice 4 on a disk would be, c0t0d0s4. For x86 it depends on what type of storage is connected.

In Solaris you can use up to 8 slices on a single disk. They are numbered, 0 to 7. Actually it's only 7 cause slice 2 represents the entire disk and should not be used.

With SCSI you can have a up to 16 devices attached to the SCSI channel. So, the t numbers for directly attached SCSI disks will reflect the target id that the disk is set to. The d number will always be 0 because there can only be one disk at the specified target id.

For luns on hardware raid controllers, the t and d numbers will vary depending on the storage device and number of luns created.

Below is a simple diagram to explain this.

Solaris disk map using SCSI
Solaris 10 scsi disks

Let's get back to checking the disks. The previous format output showed only two disks. So, where are the other disks? After you have have physically added the disks to Solaris 10, you need to tell it that there are new disks. You may either do a reconfiguration boot, boot -r, or you can use the devfsadm command in Solaris. This will rescan the system and detect any new devices attached to it.

I will run the devfsadm command and then we will run format again to check if there are any new disks.

bash-3.00# devfsadm -vC
devfsadm[1254]: verbose: symlink /dev/dsk/c0d1s0 
-> ../../devices/pci@0,0/pci-ide@1,1/ide@0/cmdk@1,0:a
devfsadm[1254]: verbose: symlink /dev/dsk/c0d1s1 
-> ../../devices/pci@0,0/pci-ide@1,1/ide@0/cmdk@1,0:b
devfsadm[1254]: verbose: symlink /dev/dsk/c0d1s2 
-> ../../devices/pci@0,0/pci-ide@1,1/ide@0/cmdk@1,0:c
.
.
.
../../devices/pci@0,0/pci-ide@1,1/ide@0/cmdk@1,0:t,raw
devfsadm[1254]: verbose: symlink /dev/rdsk/c0d1p4 
-> ../../devices/pci@0,0/pci-ide@1,1/ide@0/cmdk@1,0:u,raw

bash-3.00# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0d0 DEFAULT cyl 2085 alt 2 hd 255 sec 63
          /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
       1. c2t0d0 DEFAULT cyl 1020 alt 2 hd 64 sec 32
          /pci@0,0/pci8086,2829@d/disk@0,0
       2. c2t1d0 DEFAULT cyl 1020 alt 2 hd 64 sec 32
          /pci@0,0/pci8086,2829@d/disk@1,0
       3. c2t2d0 DEFAULT cyl 1020 alt 2 hd 64 sec 32
          /pci@0,0/pci8086,2829@d/disk@2,0
       4. c2t3d0 DEFAULT cyl 1020 alt 2 hd 64 sec 32
          /pci@0,0/pci8086,2829@d/disk@3,0
Specify disk (enter its number):

The format output now shows that there's 3 new disks, c0t1d0, c0t2d0, c0t3d0 that's been added. The devfsadm command added the disks and linked it to /dev/dsk. This is the logical device path to the disk. The physical device path starts with /devices and the logical device path starts with a /dev. In Solaris we use the /dev device path. It's easier to remember than the difficult and long /devices path.

For every disk there are two paths, dsk and rdsk. the dsk refers to block devices and rdsk refers to raw devices. When you mount a filesystem you will use the dsk.

Great stuff. Now we can format the disk and create partitions. I will only create one partition with all the space assigned to that one partition on c2t0d0.

Partitions or slices are similar to Windows partitions. You take a disk and divide it into logical areas that can be used as different drive letters.

Below is the procedure to create a partition on a disk. All the disks have a number assigned to it on the left. I will then use commands inside the format command to partition the disk. We select the disk number on the left "1" which is c2t0d0 -> then we type the command "partition", to display the partition menu, then the command -> "print", to show or print the partition table.

bash-3.00# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0d0 DEFAULT cyl 2085 alt 2 hd 255 sec 63
          /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
       1. c2t0d0 DEFAULT cyl 1020 alt 2 hd 64 sec 32
          /pci@0,0/pci8086,2829@d/disk@0,0
       2. c2t1d0 DEFAULT cyl 1020 alt 2 hd 64 sec 32
          /pci@0,0/pci8086,2829@d/disk@1,0
       3. c2t2d0 DEFAULT cyl 1020 alt 2 hd 64 sec 32
          /pci@0,0/pci8086,2829@d/disk@2,0
       4. c2t3d0 DEFAULT cyl 1020 alt 2 hd 64 sec 32
          /pci@0,0/pci8086,2829@d/disk@3,0
Specify disk (enter its number): 1
selecting c2t0d0
[disk formatted]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !cmd     - execute , then return
        quit
format> partition


PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        ! - execute , then return
        quit
partition> print
Current partition table (original):
Total disk cylinders available: 1020 + 2 (reserved cylinders)

Part Tag        Flag Cylinders  Size            Blocks
  0  unassigned wm    0          0         (0/0/0)      0  
  1  unassigned wm    0          0         (0/0/0)      0
  2  backup     wu    0 - 1019   1020.00MB (1020/0/0) 2088960
  3  unassigned wm    0          0         (0/0/0)      0
  4  unassigned wm    0          0         (0/0/0)      0
  5  unassigned wm    0          0         (0/0/0)      0
  6  unassigned wm    0          0         (0/0/0)      0
  7  unassigned wm    0          0         (0/0/0)      0
  8  boot       wu    0 -    0   1.00MB    (1/0/0)   2048
  9  unassigned wm    0          0         (0/0/0)      0

partition>

Let's have a look at the partitions. The above is the default partition table for the specified disk. On the left you see the different slice numbers. In this example there are actually 10 slices. We can only use slice 0 to 7. Slice 8 and 9 is used by Solaris for internal usage. These 2 slices are usually present with disks partitioned in an x86 environment. In SPARC you will only see from 0 to 7, depending on the type of label.

You can now select the individual slices and specify the sizes. You can easily make an error by overlapping the slices in this way. I use the "modify" command mostly. It will adjust the cylinder boundaries for you automatically.

You can also select to use the original partition table and modify that, or you can specify to put all free remaining space in a partition. This is called "All Free Hog". I will select all free hog and place all the space in the partition I select.

You could also use the modify command and specify different sizes for different partition, and then put the remaining available space in the free hog partition.

Below is the procedure to partition the disk using the "modify" option.

partition> modify
Select partitioning base:
        0. Current partition table (original)
        1. All Free Hog
Choose base (enter number) [0]? 1

Part Tag       Flag Cylinders    Size            Blocks
  0  root       wm  0            0         (0/0/0)          0
  1  swap       wu  0            0         (0/0/0)          0
  2  backup     wu  0 - 1019     1020.00MB    (1020/0/0) 2088960
  3  unassigned wm  0            0         (0/0/0)          0
  4  unassigned wm  0            0         (0/0/0)          0
  5  unassigned wm  0            0         (0/0/0)          0
  6  usr        wm  0            0         (0/0/0)          0
  7  unassigned wm  0            0         (0/0/0)          0
  8  boot       wu  0 -    0     1.00MB    (1/0/0)       2048
  9  alternates wm  0            0         (0/0/0)          0

Do you wish to continue creating a new partition
table based on above table[yes]? yes
Free Hog partition[6]? 6
Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]:
Enter size of partition '7' [0b, 0c, 0.00mb, 0.00gb]:

Part Tag        Flag Cylinders        Size            Blocks
  0  root       wm   0               0         (0/0/0)          0
  1  swap       wu   0               0         (0/0/0)          0
  2  backup     wu   0 - 1019     1020.00MB    (1020/0/0) 2088960
  3  unassigned wm   0               0         (0/0/0)          0
  4  unassigned wm   0               0         (0/0/0)          0
  5  unassigned wm   0               0         (0/0/0)          0
  6  usr        wm   1 - 1019     1019.00MB    (1019/0/0) 2086912
  7  unassigned wm   0               0         (0/0/0)          0
  8  boot       wu   0 -    0        1.00MB    (1/0/0)       2048
  9  alternates wm   0               0         (0/0/0)          0

Okay to make this the current partition table[yes]? yes
Enter table name (remember quotes): "newdisk"

Ready to label disk, continue? y

partition> print
Current partition table (newdisk):
Total disk cylinders available: 1020 + 2 (reserved cylinders)

Part      Tag    Flag Cylinders     Size            Blocks
  0 unassigned    wm  0              0         (0/0/0)          0
  1 unassigned    wm  0              0         (0/0/0)          0
  2     backup    wu  0 - 1019   1020.00MB    (1020/0/0) 2088960
  3 unassigned    wm  0              0         (0/0/0)          0
  4 unassigned    wm  0              0         (0/0/0)          0
  5 unassigned    wm  0              0         (0/0/0)          0
  6 unassigned    wm  1 - 1019   1019.00MB    (1019/0/0) 2086912
  7 unassigned    wm  0              0         (0/0/0)          0
  8       boot    wu  0 -    0       1.00MB    (1/0/0)       2048
  9 unassigned    wm  0              0         (0/0/0)          0

partition>

How easy was that! No need to worry about where slices start and end. Modify did everything for me and I assigned all the available space to slice 6. I could have specified different sizes for the slices and modify would use the correct cylinder boundaries for me. Modify also asked me if it could label the disk, which I replied "yes" to.

Now we can create our file system and mount it. First, we need to exit format.

partition> quit


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        show       - translate a disk address
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        volname    - set 8-character volume name
        !     - execute , then return
        quit
format> quit
bash-3.00#

Cool stuff. So now we have a disk with slice 6 containing all the space. Just what we need. Next step is to create the filesystem with the newfs command.

We use newfs to create a filesystem. The default type is UFS or Unix File System. You could use the -F option and specify different types of filesystems. This depends on the type of disk that you want to newfs. You could also buy third party products such as Veritas Filesystem, and create the file system as a vfs, or veritas filesystem. In stock standard Solaris 10, we use stock standard UFS that's been around for years.

The newfs command creates a structure on the raw disk so that we can mount and use it. Applications know how to write to UFS filesystems. So, we need to create this structure on the slice we created in order for us to use the disk.

bash-3.00# newfs /dev/rdsk/c2t0d0s6
newfs: construct a new file system /dev/rdsk/c2t0d0s6: (y/n)? y
Warning: 946 sector(s) in last cylinder unallocated
/dev/rdsk/c2t0d0s6:       2040254 sectors in 135 cylinders of 
240 tracks, 63 sectors
        996.2MB in 27 cyl groups (5 c/g, 36.91MB/g, 17536 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 75696, 151360, 227024, 302688, 378352, 454016, 529680,
 605344, 681008,
 1286320, 1361984, 1437648, 1513312, 1588976, 1664640, 1740304,
 1815968,
 1891632, 1967296
bash-3.00#

The output just shows how it formatted the disk and where the backup superblocks are put.

Looking good. Now we have the structure on the slice so we can mount the filesystem. We will use the mount command to achieve this. Before we can mount the fs, we need to tell the mount command where to mount it. We need to create a mount point. We will use the mkdir command to this and then mount the file system.

bash-3.00# mkdir /newfs
bash-3.00# mount /dev/dsk/c2t0d0s6 /newfs
bash-3.00# df -h /newfs
Filesystem        size   used  avail capacity  Mounted on
/dev/dsk/c2t0d0s6   938M   1.0M   881M     1%    /newfs
bash-3.00#

You can now use the filesystem to store data or run applications or whatever you want to do. You now have an extra 1Gbyte of space to use. If we reboot the server, then we would need to mount the /newfs filesystem again. We have to edit the /etc/vfstab to make the mounts persistent across reboots.

I will use the vi command to edit the vfstab.

bash-3.00# vi /etc/vfstab

"/etc/vfstab" 12 lines, 399 characters
#device         device      mount  FS    fsck    mount   mount
#to mount       to fsck     point  type  pass    at boot options

/dev/dsk/c2t0d0s6 /dev/rdsk/c2t0d0s6 /newfs ufs 2 yes logging

bash-3.00# umount /newfs
bash-3.00# mount /newfs
bash-3.00#

I took out the other mount points to make things easier to understand. Lets look at the format of the vfstab.

device to mount - Is the block or dsk logical device.
device to fsck - Is the raw device or rdsk logical device. fsck is a Solaris utility that checks a file system for errors.
mount point - Where the filesystem will be mounted.
FS type - The type of filesystem. ufs in our example.
fsck pass - In what order do you want to check the fs. If you have 3 filesystems all with 2, then they will be checked after 1 and all will be checked in parallel.
mount at boot - Do you want to mount the fs at boot time.
mount options - Specific options for the filesystem. I use logging so that fsck need only check the area that changed and not the entire file system when a crash happens.

I then test the entry in the vfstab by unmounting and mounting the filesystem using only the name of the mount point.

That's all that there is to it! This was really a crash course in how to format and mount a partition. There's a lot more information on filesystems.

I showed the quick way to do things. If you are unsure about some of the concepts, then go to the Oracle web site and download the administration manual on filesystems.

Solaris 10 Cluster


What is a Solaris 10 Cluster? What is a Cluster for that matter?

A cluster makes applications, running on a system, highly available. Ok great, what is highly available? Let me explain.

If you install an application on a system, and the system panics or shuts down, due to hardware or software errors, the application will not be available anymore. The users will not be able to log on and do their work. You will have very unhappy users.

How many times have you been to a bank where the teller just tells you that the computer is offline. Sorry, he cannot transfer that money or book that ticket or whatever. In the old days this might be an excuse, but with today's technology, it should not happen.

Just about every mission critical system runs some kind of high available software.

So what does it mean? A cluster will fail the application over to another system if a critical errors occurs on the system that it's running on. These could be hardware or software errors. If anything prevents the application from running on the system, the cluster software will fail it over to another node that's part of the cluster.

Most cluster works like this. Not just Solaris 10 cluster software. Below is a diagram of what a cluster is made up of.

Solaris 10 Cluster components
Solaris 10 cluster

Let's discuss these components in a little more detail. The diagram above shows a typical 2 node cluster meaning there are two servers that are clustered together. You could, of course, have more than two nodes clustered. You may have a 3 or 4 or more nodes in a cluster.

Private Cluster Interconnects and quorum device

The two lines between the cluster is called the cluster interconnect. This is also referred to as the heart beat. The cluster interconnects are there for communications between the two nodes. The nodes need to know what the status of the other node is. If it cannot communicate with the node through the interconnects, then it assumes that something is wrong and it will initiate a fail over.

Well, it's not that simple. There are things like cluster amnesia and split brain scenarios that has to be taken into account. You see, If there is no communications between the nodes via the interconnects, then both nodes may assume that the other is down. So, it's very possible that both will try to start up as the master or owner of the application and the application might ping pong fail over between the nodes.

This is something you don't want! To stop this from happening, the cluster uses a concept of a quorum. A node needs to have quorum in order for it to become the master or owner of the application. In a two node cluster this is not possible, because both nodes have one vote count. The Solaris 10 cluster needs a mechanism to have three quorum votes or nodes.

To do this, you create a quorum device when you install the cluster. Most of the times a disk on the shared storage device acts as the third quorum device. In Solaris 10 cluster, a third server could also be assigned as a quorum device. This is done via a small program that's install on a server that then acts as a quorum server. This quorum server is not part of the Solaris 10 cluster. It merely acts as a quorum device.

A bit of an overkill, but sometimes it's your only option.

Shared storage and multi pathing

Storage is also very important in a Solaris 10 Cluster. Remember, the application has to fail over and that means the storage must also be available on the other node.

This is done using shared storage that's connected to both nodes. In fail over applications, only the node that that runs the application, will have access to the disks. The other node will not have access until you switch the application over.

In this case the disk groups will be exported from the one node, and imported on the other. So, the storage needs to be visible to both nodes.

Some types of clusters can run the application on both nodes at the same time. These are usually special types of clusters where the applications need to know that it's running in a cluster where both nodes can have access to the storage. A good example of this is Oracle's Real Application Clusters (Oracle RAC). This cluster also uses a special type of filesystem that locks access to data until it's released by the application.

The shared storage also needs to be multi pathed. This means that there is two physical connections or paths to the storage and luns. This is needed if you loose a host bus adapter or link to the storage. If this happens, then the multi pathing software will just switch the path over to the surviving path and continue to work as if nothing has happened.

This is cool because the application does not need to failover in the event that a path to storage id unavailable.

You could use JBOD (Just A Bunch Of Disks) storage, but then you should have two arrays where the volumes are mirrored across the the two arrays. If you use hardware raid, then one device is sufficient. As long as it has two controllers.

Solaris 10 Cluster Public Network Interface

The users connect through the public network interface to the application. This is you LAN or Local Area Network. You will notice that there's two of these interfaces. This dual configurations should become quite apparent by now. Everything is dual connected and redundant.

Again, if we loose a network interface on the Solaris 10 Cluster, then the IPMP (Internet Protocol Multi Pathing) software will switch the IP address from the failed to the working interface.

All of this stuff that I'm talking about comes stock standard with Solaris. No extra licenses needed. Few vendors can claim this.

IPMP also does outbound load spreading. This is useful if you have things like web servers where there is a lot of outbound traffic.

Solaris 10 and Solaris Cluster software

On both nodes you need to install Solaris 10 and the Cluster software. The Solaris 10 Cluster software is also sometimes referred to as the Cluster frame work. This includes all the software and agents needed to make the cluster work.

You need to know what type of applications you are going to run on you cluster to ensure that you install the correct agent software. The agent software is a little piece of software that manages the application and makes it highly available.

These agents have been specifically developed with the application in mind. For instance, if you want to make the Oracle database highly available, you need to install and configure the Oracle database agent and listener service agents as well.

Oracle continuously creates and develops new agents as new software is made available.

In Solaris 10 cluster the software uses a concept called resource groups that contain resources that's managed by the agents. A resource typically consists of the logical host, storage and the application. This resource is then placed in a resource group. You can then manipulate these resources via the resource group or individually via the resources themselves.

The agent software will also try to restart the application in the event that it's stopped or killed. This is cool cause you don't want to just fail the application whenever something happens on the node. This will waste time.

Example of application fail over in Solaris 10 Cluster

Let's look at a typical example where a node fails and the application fails over to the other node.

Refer back to the previous diagram on this page and keep the setup in mind. You have two nodes connected to shared storage. We also have two cluster interconnects and two public network interfaces.

Solaris 10 and the cluster software is running on both nodes. On node 1 we have the application running. Great stuff. Now lets say that node 1 fails, for whatever reason. It could be a hardware, software or application error.

Below is a diagram to show the node 1 failure.

Solaris 10 Cluster node 1 failure
Solaris 10 cluster node failure

If the application was not in a cluster, then it would stay down until the problem is fixed and the application started up again. In this example the application is clustered. Node 2 will check, via the private interconnects, if node 1 is still up.

In this example the node has failed and node 2 cannot communicate with node 1. Node 2 will race to get control of the quorum and initiate a fail over. After this is successful, the application will start on node 2.

Below is a diagram showing the fail over.

Solaris 10 Cluster application fail over
Solaris 10 cluster application fail over

After the application starts on node 2, users will be able to log in, and continue to work as if nothing has happened. There's some downtime, but it's nothing compared to the system being down for hours or days. This makes HA cluster so popular. It's not very expensive, and you get the job done.

After the application has failed over, you can now start your troubleshooting on the failed node to see whats wrong. After you fixed the problem you bring node 1 up and it becomes part of the cluster again. You can now decide to fail the application back to the original node or continue running it on node 2.

When there's some scheduled maintenance on node 2, you can then fail the application back to node 1.

Solaris 10 Cluster Node 1 restored
Solaris 10 cluster node restored

In the previous diagram it shows that the application is now running on node 1 again.

This is the basis for clusters. Applications failing over from one node to another. There are lot's of different scenarios. For instance, if both storage paths from a node to the storage fails, then the application would fail over. If bot public networks on a node fails, it will fail over the application.

If a single path to the storage would fail, the multi path driver will just switch the to the other working path and no application fail over would be needed. There are lots and lots of these scenarios that the Solaris 10 cluster needs to consider before it needs to decide whether the application needs to fail over or not. This is what makes a cluster worth the money you pay for it.

There are numerous documents on the net that goes in detail how to install a cluster on a Solaris 10 system. For this reason I will not go through an installation example. You also need patches for the Solaris 10 Cluster and you need a service contract with Oracle to get these Solaris Cluster patches.

I can show an example but I think people will get confused and frustrated when I install the patches. They would not know where to get it from. Sometimes these patches are crucial in installing a Solaris 10 Cluster. Do a search on Google or head over to the Oracle website for details on how to install and configure a Solaris Cluster.

Solaris 10 Live Upgrade


Lot's of people don't even know about Solaris 10 Live upgrade. It such a great tool to use but I guess it's because of the name that administrators are scared of it. Live upgrade sounds pretty scary, especially if the server runs some serious applications such as Oracle or SAP.

First of all, what is Live Upgrade. It's a tool in Solaris 10 that allows you to upgrade your operating system level and patches on a server running Solaris with very minimal downtime. The only downtime that's involved is the boot after you have finished the upgrade.

Even if that fails you can easily restore the system to it's previous state by just telling live upgrade that you want to boot from the previous working slice again. It's really as easy as that.

What do you need? Planning is a good place to start. When you do a live upgrade, you basically copy the existing root filesystems to another slice or slices and then do your upgrade from the copied slices. After the upgrade is finished, you then tell live upgrade that you want to boot from the new slices you just upgraded.

The system then boots from the new boot environment, and that's it. So, you need to create a new boot environment that's just as large or larger than the original. You need some extra space.

This could be on the same disk as you current boot disk, or a different disk. The choice is up to you where you want to put it.

Keep Solaris 10 Live Upgrades in mind when installing your Solaris 10 operating system. Create some extra space where you could do some live upgrades. It might just save you some time in the future.

Like I always say, the best way to learn is by example. So let me show you how it works.

I will use my trusted VirtuaBox with my Solaris 10 VM to demonstrate the live upgrade. Again, this is a simple how to. There are lots of documents on the web if you are interested in the nitty gritties of live upgrade.

I have Solaris 10 running in a VirtualBox with a root disk and one extra disk. The disks are the same size so I will use the extra disk as my live upgrade disk. If you have enough space on you root disk, you could use that space as well.

So, lets go.

My root disk layout is as follows:

Current root disk c0d0 16Gb
s0 root /    14Gb
s1 swap      2Gb

New boot environment c0d1 16Gb
s0 root /    14Gb
s1 swap      2Gb

In my scenario I have an extra disk to create the new boot environment with, I could have used the same c0d0 disk if I had space on it.

If there is a /var or /export, you could also specify to copy these filesystems separately or or include it into one slice. You could also split your current boot environment into different slices in the new boot environment.

You could even migrate your existing UFS root environment to ZFS filesystem. This is just to cool!

Anyway, first we need to create the new boot environment. We do this with the lucreate command. Below is the example.

bash# lucreate -n "NewBE" -c "OldBE" -m /:/dev/dsk/c0d1s0:ufs
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Checking GRUB menu...
Analyzing system configuration.
.
.
.
Copying.
Creating shared file system mount points.
.
.
.
Population of boot environment  successful.
Creation of boot environment  successful.
bash-3.00#
bash-3.00# lustatus
Boot Environment Is       Active Active    Can    Copy
Name             Complete Now    On Reboot Delete Status
---------------- -------- ------ --------- ------ ----------
OldBE            yes      yes    yes       no     -
NewBE            yes      no     no        yes    -

Let's look at the options.

-n "NewBe" is the name of the new boot environment.
-c "OldBE" is the name I used for the current boot environment.
-m /:/dev/dsk/c0d1s0:ufs specifies that I want to create the root fs in c0d1s0. If I had other file systems I would just specify where I want to copy them.

If my root filesystem had /var and /export, then I could specify them all with the -m option.

Example:

s0 /       10Gb
s1 swap    2Gb
s3 /var    2Gb
S6 /export 500Mb 

My -m option would then look like this:

-m /:/dev/dsk/c0d1s0:ufs -m /var:/dev/dsk/c0d1s3:ufs -m /export:/dev/dsk/c0d1s6:ufs

If you don't specify the filesystems, it's all placed under root.

We then use the lustatus command to see what was created.

If something goes wrong you could use the ludelete -n BE_name command.

So my new boot environment is created. We are ready to upgrade it. We can upgrade from a Solaris 10 DVD, ISO, network or flash created image.

In my example I will use VirtualBox media manager and mount an ISO Solaris 10 image from my host OS. I mounted the ISO on /mnt.

bash-3.00# luupgrade -u -n NewBE -s /mnt

System has findroot enabled GRUB
No entry for BE  in GRUB menu
Copying failsafe kernel from media.
61364 blocks
miniroot filesystem is 
Mounting miniroot at 
.
.
.
.

-u specifies that this is an upgrade.
-n NewBE specifies that the NewBE image must be upgraded.
-s /mnt specifies where the upgrade media is located. This could have been a DVD drive or network drive or ISO mounted filesystem.

All that's left to do is to tell live upgrade to make the new boot environment, the current BE at boot time. We use the luactivate command to do this.

bash-3.00# luactivate
OldBE

bash-3.00# luactivate NewBE
.
.
.
.
File  propagation successful
Deleting stale GRUB loader from all BEs.
File  deletion successful
File  deletion successful
File  deletion successful
Activation of boot environment  successful.
bash-3.00# luactivate
NewBE
bash-3.00#

Now, a reboot of the system is needed and you will now be running from the NewBE boot environment.

The luactivate command also show you how to recover if the boot is unsuccessful. The text below is from the luactivate command:

In case of a failure while booting to the target BE, the 
following process needs to be followed to fallback to the
 currently working boot environment:

1. Boot from the Solaris failsafe or boot in Single User mode 
from Solaris Install CD or Network.

2. Mount the Parent boot environment root slice to some 
directory (like /mnt). You can use the following command to
 mount:

     mount -Fufs /dev/dsk/c0d0s0 /mnt

3. Run  utility with out any arguments from the 
Parent boot environment root slice, as shown below:

     /mnt/sbin/luactivate

4. luactivate, activates the previous working boot environment 
and indicates the result.

5. Exit Single User mode and reboot the machine.

We will reboot with the init 6 command.

bash-3.00# init 6

When the Solaris 10 system comes back up, we will have an upgraded Solaris 10 disk and the only downtime was the reboot that was needed to boot from the new boot environment. Nice!

Windows related iSCSI


How to setup a iSCSI Initiator using Windows 7
Yeah I know it's not Solaris, but knowing how to configure a Windows 7 system as an initiator, might just help you in the future. Just check it out.






Return from Solaris 10 to What is my Computer














Search what-is-my-computer.com




What is my Computer

What is in my computer?


Computer Components

Discover what goes into a PC?