Monday May 26, 2014

Validating Petabytes of Data with Regularity and Thoroughness

by Brian Zents

When former Intel CEO Andy Grove said “only the paranoid survive,” he wasn’t necessarily talking about tape storage administrators, but it’s a lesson they’ve learned well. After all, tape storage is the last line of defense to prevent data loss, so tape administrators are extra cautious in making sure their data is secure. Not surprisingly, we are often asked for ways to validate tape media and the files on them.

In the past, an administrator could validate the media, but doing so was often tedious or disruptive or both. The debut of the Data Integrity Validation (DIV) and Library Media Validation (LMV) features in the Oracle T10000C drive helped eliminate many of these pains. Also available with the Oracle T10000D drive, these features use hardware-assisted CRC checks that not only ensure the data is written correctly the first time, but also do so much more efficiently.

Traditionally, a CRC check takes at least 25 seconds per 4GB file with a 2:1 compression ratio, but the T10000C/D drives can reduce the check to a maximum of nine seconds because the entire check is contained within the drive. No data needs to be sent to a host application. A time savings of at least 64 percent is extremely beneficial over the course of checking an entire 8.5TB T10000D tape.

While the DIV and LMV features are better than anything else out there, what storage administrators really need is a way to check petabytes of data with regularity and thoroughness. With the launch of Oracle StorageTek Tape Analytics (STA) 2.0 in April, there is finally a solution that addresses this longstanding need. STA bundles these features into one interface to automate all media validation activities across all Oracle SL3000 and SL8500 tape libraries in an environment. And best of all, the validation process can be associated with the health checks an administrator would be doing already through STA.

In fact, STA validates the media based on any of the following policies:

  • Random Selection – Randomly selects media for validation whenever a validation drive in the standalone library or library complex is available.
  • Media Health = Action – Selects media that have had a specified number of successive exchanges resulting in an Exchange Media Health of “Action.” You can specify from one to five exchanges.
  • Media Health = Evaluate – Selects media that have had a specified number of successive exchanges resulting in an Exchange Media Health of “Evaluate.” You can specify from one to five exchanges.
  • Media Health = Monitor – Selects media that have had a specified number of successive exchanges resulting in an Exchange Media Health of “Monitor.” You can specify from one to five exchanges.
  • Extended Period of Non-Use – Selects media that have not had an exchange for a specified number of days. You can specify from 365 to 1,095 days (one to three years).
  • Newly Entered – Selects media that have recently been entered into the library.
  • Bad MIR Detected – Selects media with an exchange resulting in a “Bad MIR Detected” error. A bad media information record (MIR) indicates degraded high-speed access on the media.

To avoid disrupting host operations, an administrator designates certain drives for media validation operations. If a host requests a file from media currently being validated, the host’s request takes priority. To ensure that the administrator really knows it is the media that is bad, as opposed to the drive, STA includes drive calibration and qualification features. In addition, validation requests can be re-prioritized or cancelled as needed. To ensure that a specific tape isn’t validated too often, STA prevents a tape from being validated twice within 24 hours via one of the policies described above. A tape can be validated more often if the administrator manually initiates the validation.

When the validations are complete, STA reports the results. STA does not report simply a “good” or “bad” status. It also reports if media is even degraded so the administrator can migrate the data before there is a true failure. From that point, the administrators’ paranoia is relieved, as they have the necessary information to make a sound decision about the health of the tapes in their environment.

About the Photograph

Photograph taken by Rick Ramsey in Death Valley, California, May 2014

- Brian

Follow OTN Garage on:
Web | Facebook | Twitter | YouTube

Friday May 16, 2014

Orgad Strikes Again

"And while you're at it, use the Unified Archive to deploy a cloud in a box."

Orgad is too smart. Or maybe, he does what Einstein claims to do:

"It's not that I'm so smart, it's just that I stay with problems longer."
- Albert Einstein

How to Set Up a Hadoop 2.2 Cluster on Oracle Solaris 11.2

Technical Article by Orgad Kimchi

Figuring out how to set up a Hadoop 2.2 Cluster helps keep Orgad challenged on those late nights when, after a few too many shots of Joov, he strikes up a casual game of chess with Deep Blue. As he explains,

"Setting up a Hadoop cluster on Oracle Solaris 11.2 gives you fast provisioning via zone cloning, best I/O performance from ZFS compression, and rapid provisioning with the Unified Archive."

But setting up a Hadoop cluster and configuring its failover capabilities (yawn) is just not enough to keep Orgad interested. Nope. To stay awake he has to toss in a neat little trick at the end of his article: how to use the Unified Archive in Oracle Solaris 11.2 to create a cloud-in-a-box that you can deploy in a variety of environments.

I don't know what Orgad does between midnight and 2:00 am, but in case you want to take a guess, here are more gems from Orgad:

About the Photograph

Photograph of plant killed by Mrs. Ramsey taken by Rick Ramsey in Colorado

- Rick
Follow Rick on:
Personal Blog | Personal Twitter
  Follow OTN Garage on:
Web | Facebook | Twitter | YouTube

Wednesday May 07, 2014

Make Your Database Run Faster on Oracle Linux

If you can get your hands on a Sun Flash Accelerator F40 PCIe Card, and you're running Oracle Database 11g Release 2 or later on Oracle Linux, you can use the Oracle Database Smart Flash Cache to improve performance and response times. That was a mouthful, so let me say it again.

  1. Configure Sun Flash Accelerator F40 PCIe Card as a file system.
  2. Configure Oracle Automatic Storage Management, a feature of Oracle Database, to use multiple Sun Flash Accelerator F40 PCIe Cards.
  3. Configure the Database Smart Flash Cache capability of Oracle Database.

Your pals at Jay Leno's garage can keep a 27-liter 1930 Bentley humming, but they can't help you with that little procedure can they? No worries, Rick Stenho may not own a Bentley, but he can help your database run faster.

Tech Article: How to Improve Database Performance Using Database Smart Flash Cache on Oracle Linux

by Rick Stenho

Oracle Database 11g Release 2 Enterprise Edition allows you to use flash devices to increase the effective size of the Oracle Database buffer cache (Level 2 cache) without adding more main memory. This capability is referred to as Database Smart Flash Cache. This article walks you through the steps required to take advantage of it.

Caution: Any performance advantages you obtain with smart flash cache will probably be nullified by the time you waste watching Jay Leno's garage.

About the Photograph

Photograph of lamp at the Venetian and Sands Expo Center
in Las Vegas taken by Rick Ramsey during Collaborate 2014

- Rick
Follow Rick on:
Personal Blog | Personal Twitter
  Follow OTN on:
Web | Facebook | Twitter | YouTube

Tuesday May 06, 2014

Replay of Solaris Labs From OTN Virtual Sysadmin Day

Missed OTN's last Virtual Sysadmin Day? That's OK, so did the majority of Earth's 7 billion inhabitants. A stalwart 400 did manage to pull themselves away from The Daily Grind and attend in person. To accommodate the remaining 7 billion slackers, I published videos of the Solaris hands-on labs. I'll do the same for the Oracle Linux and Virtualization sessions over the next few days.

Lab Intro - How Oracle Solaris 11 Simplifies the Life of a Sysadmin

Typical tasks and challenges in a sysadmin's work and how Oracle Solaris 11 simplifies them. Managing software packages, updating systems, managing users, monitoring system performance and diagnosing problems, assessing, assigning and redistributing system resources according to workload patterns. Which Oracle Solaris 11 features can help. Examples and best practices. Exercises that model everyday situations.

Lab 1: Managing the Software Lifecycle with Oracle Solaris 11

Tricks to help you to manage software packages installed on your systems. Most organizations have separate environments for development, test, QA and production applications. How can you make sure the right versions of software packages are installed in each of them, and avoid inconsistencies? How can you configure your production systems to avoid accidental updates? How should you integrate your software packages with SMF services? These and many other questions will be answered by using practical hands-on examples.

Lab 2: Managing Your Data with ZFS in Oracle Solaris 11

ZFS has been a round a long time, but it has so many new capabilities to explore that you might still have a lot of questions. For instance, how do I create a ZFS file system that will have a guaranteed amount of available space, instead of sharing it with other file systems in a pool? What are the best practices for backing up ZFS file systems? How can I use ZFS encryption? Can I create a raw block device on ZFS and why do I need it? These and many other questions will be answered by using practical hands-on examples.

Lab 3: Managing Virtual Environments in Oracle Solaris 11

What are the best ways to create and manage zones? How should I use Solaris virtual networking to separate traffic from different applications? How can I monitor and manage system resources assigned to zones? How should I protect my zones from malicious users? How can I migrate zones between hosts? These and many other questions will be answered with practical hands-on examples.

About the Photograph

Photo of Las Vegas skyline taken by Rick Ramsey at Collaborate 2014

- Rick
Follow Rick on:
Personal Blog | Personal Twitter
  Follow OTN on:
Web | Facebook | Twitter | YouTube

Tuesday Apr 29, 2014

How Easy Is It To Run OpenStack on Oracle Solaris 11.2?

Three resources to help you see how easy it is to create, provision, and manage an internal cloud using OpenStack on Oracle Solaris 11.2.

Sofia, Where's My Cloud?

An OTN Home Movie

7-year old Sofia installs a cloud using OpenStack running on Oracle Solaris 11.2 and shows her clueless Daddy how to manage it using the OpenStack Dashboard.

OpenStack Dashboard Walkthrough - The Admin Panel

An OTN Tech Demo

David Comay, Solaris engineer, shows you how to use the Admin panel in the OpenStack Dashboard, including how to define the types of virtual machines and software images a user can create, and how to give them networking capabilities.

OpenStack Dashboard Walkthrough - The Project Panel

An OTN Tech Demo

David Comay, Solaris engineer, shows you how to use the Project panel in the OpenStack dashboard, including how to create an instance of a virtual compute and storage resource, how to associate it with a network, how to view its topology, and more.

Stay tuned in the coming days for more video interviews of the Solaris engineers that developed this and other technologies in Oracle Solaris 11.

About the Photograph

Photograph of fountain at Oracle's Santa Clara campus taken by Rick Ramsey, April 2014.

- Rick

Follow me on:
Web | Blog | Facebook | Twitter | YouTube

Monday Apr 14, 2014

Which Type of Virtualization Should I Use?

I routinely ask techies which type of virtualization they'd recommend for which type of job. I seldom get an answer as crystal clear as Brian Bream's.

Video Interview: Which Type of Virtualization Should I Use?

with Brian Bream, CTO Collier IT

Oracle's portfolio of virtualization technologies includes Oracle VM Server for x86, Oracle VM Server for SPARC (previously known as LDOMS), and Oracle Solaris Zones, among others. Brian Bream provides a crystal clear technical overview of their differences and examples of what you would use them to do to. After you listen to the recording, which is about 5 minutes long, you'll understand why Brian was selected Instructor of the Year for both Oracle University and Sun Microsystems University before that.

More Resources About Virtualization

Here's an 8-part series about Oracle virtualization products written by Detlef Drewanz and Lenz Grimmer that might also be helpful:

About the Photograph

Photograph of Vaillancourt Fountain in San Francisco taken by Rick Ramsey, April 2014.

- Rick

Follow me on:
Web | Blog | Facebook | Twitter | YouTube

Friday Apr 11, 2014

New Oracle Solaris/SPARC SIG Launched by IOUG

What happens in Vegas ...

... stays in Vegas.

Well, most of it does, anyway.

Collaborate 2014, put on by the Independent Oracle User Group (IOUG), the Oracle Applications User Group (OAUG), and the Quest International User Group was terrific. Great content, great people, great event. And lots of sysadmins!

One of the most interesting things to come out of Collaborate is a new Special Interest Group (SIG) for Oracle Systems technologies, sponsored by Independent Oracle User Group (IOUG). It's called the Solaris/SPARC SIG, but the first meeting covered a lot of ground that included the other technologies in Oracle's Systems portfolio, including engineered systems, storage, networking, and optimized solutions. This perspective on Oracle Solaris is significant because the value of Oracle Solaris becomes increasingly evident when viewed from the perspective of the database, engineered systems like Oracle SuperCluster, and cloud strategies.

So keep an eye on the SIG and join us in future activities. I'll be sure to promote them here, but also keep an eye on the SIG Calendar.

Seth Miller and Ed Whalen, Oracle ACES, were kind enough to tape a couple of video interviews for the OTN Garage. I'll be posting them there soon.

About the Photograph

Photograph of your Systems Community Manager and friends taken by Laura Ramsey in Las Vegas, Nevada, USA, in April 2014.

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube

Wednesday Mar 26, 2014

More Tips for Remote Access with Oracle Linux

In a previous blog, Oracle Linux Tips and Tricks, I covered alternative ways to use SSH. In this article, I will cover some additional tips and tricks for using SSH for remote access, as well as some other ways to connect remotely to a server.

SSH's primary use is for remote access to hosts. SSH is not only able to provide us a terminal interface to a server, it's also able to provide us a transport for a graphical interface. In order to utilize this functionality, we must have an X server running on our local workstation. On a Linux workstation with a graphical environment, this functionality is built in. On other systems, such as a Windows machine or a Mac, this functionality is not built in. Both XQuartz on the Mac and MobaXTerm are X servers for these platforms. There are also a number of other open source and paid products available for both platforms.

Once you have an acceptable X server installed on your local workstation, you can connect with SSH using the following ssh command. The -X enables X11 forwarding for the connection. Keep in mind that the X11 forwarding is based on the user who originally connected. Logging in with one user and then using sudo often will not work, depending on the permissions and ownership needed to complete a task.

[user@laptop ~]$ ssh -X

Once you authenticate, you drop directly to a standard prompt. If you look closely, though, and examine the environment variables in your terminal, you will find an additional environment variable that has the IP address of your workstation. You can examine your environment variables using the env command.


Now you can launch an application that has a graphical interface, and the interface will be displayed on your local workstation. The following example will launch gedit. The ampersand symbol is useful for forking the process in the background so we can retain the use of our terminal.

[user@remotehost ~]$ gedit &

Using X11 connections over SSH can be quite useful for using application installers that are graphical, such as the Oracle Universal Installer for Oracle Database.

The screen application is a great compliment to SSH and is quite useful for sharing an SSH session with another user. Because of the way screen preserves sessions for the user, it is also great for high-latency network connections that have frequent disconnects and for maintaining sessions that time out due to security policies. With a regular SSH connection, if you are disconnected, any processes that were running are not preserved. Unlike SSH, the screen application keeps the session alive so it can be connected to again later.

One of the simplest things you can do with screen is share a session. You can launch screen on the terminal you wish to share by issuing the screen command. Once you do this, a new shell is running inside of screen. Another user can log in to the same machine and use the command screen -x to be immediately connected to your shell. They see everything you type. Even if you disconnect from the machine on either terminal, the shell will continue to run. This can be quite useful for sharing a terminal for a demonstration in a remote office or for running a terminal-based console that is shared between many users.

To see all of the active screen sessions, you can use screen -list, which will show active and detached sessions. To connect to a detached session, you can use screen -r and the pid.session name listed in the screen -list output. In the following example, there are five screen sessions running. One of them is detached.

[user@server ~]$ screen -list
There are screens on:
        24565.pts-1.server     (Attached)
        24581.pts-2.server     (Attached)
        24597.pts-3.server     (Attached)
        24549.pts-0.server     (Attached)
        24613.pts-4.server     (Detached)
5 Sockets in /var/run/screen/S-user.

The command screen -x can be used to connect to a currently attached session. In the following example, a connection to session 24565 is made:

[user@server ~]$ screen -x 24565

If you need access to a full graphical desktop environment remotely, there are a number of packages that can accomplish this. The package tigervnc-server is useful for connections to a remote machine providing a full Linux desktop experience. To set up and install the package, perform the following steps.

First, run the following command to install the package:

[root@server ~]# yum install tigervnc-server

Once the package is installed, you need to edit the file /etc/sysconfig/vncservers. The VNCSERVERS line establishes the user accounts that you want to enable the VNC server for and their display number. In the example below, the user bob is configured for display 2 and the user sue is configured for display 3. The VNCSERVERARGS[#] section allows you to specify options for each display. In this example, we are specifying a 1280 x 1024 resolution for display 2 and a 1024 x 768 resolution for display 3:

VNCSERVERS="2:bob 3:sue"
VNCSERVERARGS[2]="-geometry 1280x1024 "
VNCSERVERARGS[3]="-geometry 1024x768"

Once the /etc/sysconfig/vncservers file has been edited, you need to set passwords for each user account. This is accomplished with the vncpasswd command. In the following example, the user bob sets a password using the vncpasswd command.

[bob@server ~]$ vncpasswd

Once the package is installed, the configuration file is edited, and passwords are set, you are ready to turn on the vncserver service. The following two commands start the service and set the service to start automatically at the next boot:

chkconfig vncserver on
service vncserver start

Once configured and running, you can connect to your Linux system using a standard VNC client. When connecting, be sure to specify the display and password credentials that are needed in order to connect.


I hope these tips and tricks have been useful and that you will take advantage of some of them in the course of your day. We will be publishing more of these tips-and-tricks articles in the future. Feel free to leave a comment for further topics that you would like to see in this series.

See Also

Oracle Linux blog

About the Author

Robert Chase is a member of the Oracle Linux product management team. He has been involved with Linux and open source software since 1996. He has worked with systems as small as embedded devices and with large supercomputer-class hardware.

About the Photograph

Photograph taken by Rick Ramsey in Durango in the Fall of 2012

Follow OTN Garage on:
Blog | Facebook | Twitter | YouTube

If You Have to Ask, You Wouldn't Understand

Although being subjected to that kind of attitude is unpleasant, subjecting someone else to it is loads of fun. Just ask someone who rides a Harley why they ride a Harley, and watch how much they enjoy unloading that sentiment on your head, you member of the unwashed, you.

I feel the same way about Oracle Solaris. Don't talk to me about how much Windows or some other OS is capable of doing. I don't care. Your OS is a metric cruiser. Go away.

That feeling of vast superiority is even more pronounced when I'm talking about Oracle Solaris Studio. Which should have been renamed Oracle Solaris and Oracle Linux Studio, if you are insightful enough to ask me, because any Linux developer who is working on anything remotely interesting should be using Oracle Solaris Studio as their IDE. I freakin love it. I've had the pleasure of interviewing Don Kretch, the head of the Solaris Studio engineering team, many times. And I've enjoyed myself every single time. If you think you're worthy, you are welcome to try to understand our conversation (jump to "Interviews with Don Kretch," below).

If my rhetoric has convinced you, as it would convince anyone of vastly superior intelligence, you'll want to pretend that you already knew how good Oracle Solaris (and Linux) Studio is, and berate me for even suggesting you didn't. Good for you. You're catching on. But you'll still be faced with a dearth of actual knowledge about this IDE for the Vastly Intelligent.

Not to worry. There's a way for you to learn what you need to learn without anyone else finding out so you can pretend to have known all along.

Oracle Solaris (and Linux) Studio 12.4 Beta Program

The Beta Program for Oracle Solaris Studio 12.4 begins today. Download the software, try out its new features, and join in the discussions. These resources will help:

Landing Page, including links to Beta Program Forums
Download Center, where you can download a free copy

Interviews with Don Kretch

About the Photograph

Photograph of 2002 Harley Davidson Softail Deuce taken by Rick Ramsey in Massachusetts, USA.

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube

Monday Mar 24, 2014

Four High Performance Configurations for SuperCluster and SPARC Servers

When a surfing buddy of mine asked me to look at a banking application that runs on Solaris, I thought he'd been hit on the head by his board one too many times. Solaris is cool. Banking is not. But I looked into it, anyway, and to my surprise, I found the banking app had a certain amount of geek appeal.

If geek appeal is not enough to hold your interest, Mister Hair-on-Fire, the other reason for talking about this banking application is that it helped identify four high performance configurations for Oracle's SuperCluster and SPARC servers that might be useful for other types of applications. So keep reading. Or ...

Go directly to white paper (pdf) that describes the configurations.

What first caught my interest was the idea of a bank operating system. A traditional computer OS manages hardware devices and provides services for application software. A bank headquarters does something very similar. It manages the branches (hardware) and provides services for its operations (applications). Turns out, that's the idea behind Finacle's Core Banking Solution.

Core banking sounds dull as hell, but it's a big deal for banks. It replaces cumbersome end-of-day consolidation between branch banks and HQ. (I almost feel asleep just writing that.) In fact, centralized banks worldwide now mandate the implementation of core banking technology to prevent fraud and meet regulatory requirements.

As a result, Finacle's Core Banking Solution is designed as configurable modules with layered Service-Oriented Architecture (SOA), straight-through processing (STP) capabilities, web-enabled technology, and support for 24 x 7 operations.

But no matter how sophisticated the application, the underlying architecture can limit its performance. Not a problem! Since Finacle 10 is now available on Oracle Solaris, it can be run on the screaming fast Oracle SuperCluster or Oracle’s SPARC T-Series servers. As you might expect, Finacle tested this combination for both batch and OLTP processing and found:

  • Batch results that processed 15% more accounts and 3.2 to 3.7 times the required minimum records per second, all achieved within one third of the specified time, with plenty of CPU resources available to handle further load.
  • OLTP results that exceeded Finacle acceptance criteria with more users and more transactions per second, all with sub-second response times and with considerable CPU resources remaining available.

White Paper: Infosys Finacle Core Banking Solution on Oracle SuperCluster and Oracle’s SPARC T-Series Servers

Roger Bitar provides technical details about the software and hardware layers in this solution, and describes the configurations that obtained the best performance:

  • Configuration for Fastest OLTP Processing on SuperCluster T4-4
  • Configuration for Fastest Batch Processing on SuperCluster T4-4
  • Configuration for Fastest OLTP Processing on SPARC T4-4 Server
  • Configuration for Fastest Batch Processing on SPARC T4-4 Server

About the Photograph

I took this picture of bike race taken in Durango, Colorado, in the Fall of 2012.

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube

Tuesday Mar 18, 2014

Configuring COMSTAR to Provide Local iSCSI Storage

Oracle Solaris 11 introduced two storage capabilities that I wasn't aware of until Oracle ACE Alexandre Borges brought them to my attention.

A Solaris 11 system can serve as an iSCSI target that offers storage to other machines, or as an iSCSI initiator to access the storage offered by another iSCSI target. This capability is a real advantage, because any storage offered through the iSCSI protocol is available to an iSCSI initiator as local storage, without the need to use expensive technologies such as Fibre Channel (FC).

Solaris provides this service through a framework named Common Multiprotocol SCSI TARget (COMSTAR). Alexandre Borges shows you how to use it:

Tech Article: Using COMSTAR and ZFS to Configure a Virtualized Storage Environment

How to use COMSTAR to provide local iSCSI storage for any service that runs in Windows, Linux, or Mac OS. It also shows you how to configure authentication using the Challenge Handshake Authentication Protocol (CHAP) to secure the iSCSI storage against forbidden access. Part 1 of a series about ZFS.

About Alexandre Borges

Alexandre Borges is an Oracle ACE who worked as an employee and contracted instructor at Sun Microsystems from 2001 to 2010 teaching Oracle Solaris, Oracle Solaris Cluster, Oracle Solaris security, Java EE, Sun hardware, and MySQL courses. Nowadays, he teaches classes for Symantec, Oracle partners, and EC-Council, and he teaches several very specialized classes about information security. In addition, he is a regular writer and columnist at Linux Magazine Brazil.

More content from Alexandre:

Exploring Installation Options and User Roles in Oracle Solaris 11

Part 1 of a two-part series that describes how Alexandre installed Oracle Solaris 11 and explored its new packaging system and the way it handles roles, networking, and services. This article focuses first on exploring Oracle Solaris 11 without the need to install it, and then actually installing it on your system.

Exploring Networking, Services, and the New Image Packaging System in Oracle Solaris 11

Alexandre walks you through the new way Oracle Solaris 11 manages networking, services, and packages, compared to the way it managed them in Solaris 10.

Articles in Linux Brazil Magazine (Portuguese)

Columns in Linux Brazil Magazine (Portuguese)

More About ZFS and COMSTAR

About the Photograph

Photograph of San Rafael Swell taken in Utah by Rick Ramsey on the way to Java One.

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel

Wednesday Mar 05, 2014

Preserving Unpacked Software During a Package Uninstall

I love it when I can wriggle out of the unintended side effects created by an automated system designed to simplify my life.

Here's a side effect created by the very good Image Packaging System (IPS) in our beloved Oracle Solaris 11. If you use the IPS to uninstall all packaged content from a directory, it also removes the directory. Not good if you also kinda sorta loaded unpackaged content into that directory.

For instance, let's say you worked with a third-party IPS package that installed its software into /usr/local. After a pause to polish the chrome on your custom Softail Deluxe, you install a second application into /usr/local from a tar file. What happens to that second application when you use IPS to remove the third-party IPS package from the /usr/local directory? Yup. IPS dumps the directory on the asphalt and high-sides the unpackaged content all the way to /var/pkg/lost+found.

Thank goodness somebody watches out for those of us who don't follow directions. Alta Elstad, from the Solaris Documentation Team at Oracle, is one of them. Here's how she suggests you avoid this problem.

How to Preserve the Directory

To prevent the packaged directory from being removed along with its content, package the directory separately. Create an IPS package that delivers only the one directory or directory structure that you want. Then that directory structure will remain in place until you uninstall that specific package. Uninstalling a different package that delivers content to that directory will not remove the directory.

Here's a detailed example.

  1. Create the directory structure you want to deliver. This example shows /usr/local. You could easily expand this to include /usr/local/bin and other subdirectories if necessary.
    $ mkdir -p usrlocal/usr/local
  2. Create the initial package manifest.
    $ pkgsend generate usrlocal | pkgfmt > usrlocal.p5m.1
    $ cat usrlocal.p5m.1
    dir path=usr owner=root group=bin mode=0755
    dir path=usr/local owner=root group=bin mode=0755
  3. Create a pkgmogrify input file to add metadata and to exclude delivering /usr since that directory is already delivered by Oracle Solaris. You might also want to add transforms to change directory ownership or permissions.
    $ cat usrlocal.mog
    set name=pkg.fmri value=pkg://site/usrlocal@1.0
    set name=pkg.summary value="Create the /usr/local directory."
    set name=pkg.description value="This package installs the /usr/local \
    directory so that /usr/local remains available for unpackaged files."
    set name=variant.arch value=$(ARCH)
    <transform dir path=usr$->drop>
  4. Apply the changes to the initial manifest.
    $ pkgmogrify -DARCH=`uname -p` usrlocal.p5m.1 usrlocal.mog | 
      pkgfmt > usrlocal.p5m.2
    $ cat usrlocal.p5m.2
    set name=pkg.fmri value=pkg://site/usrlocal@1.0
    set name=pkg.summary value="Create the /usr/local directory."
    set name=pkg.description value="This package installs the /usr/local \
    directory so that /usr/local remains available for unpackaged files."
    set name=variant.arch value=$(ARCH)
    <transform dir path=usr$->drop> 
  5. Check your work.
    $ pkglint usrlocal.p5m.2
    Lint engine setup...
    Starting lint run...
  6. Publish the package to your repository.
    $ pkgsend -s yourlocalrepo publish -d usrlocal usrlocal.p5m.2
  7. Make sure you can see the new package that you want to install.
    $ pkg refresh site
    $ pkg list -a usrlocal
    usrlocal (site)       1.0          --- 
  8. Install the package.
    $ pkg install -v usrlocal
               Packages to install:         1
         Estimated space available:  20.66 GB
    Estimated space to be consumed: 454.42 MB
           Create boot environment:        No
    Create backup boot environment:        No
              Rebuild boot archive:        No
    Changed packages:
        None -> 1.0,5.11:20140303T180555Z
    PHASE                                          ITEMS
    Installing new actions                           5/5
    Updating package state database                 Done
    Updating package cache                           0/0
    Updating image state                            Done
    Creating fast lookup database                   Done
    Reading search index                            Done
    Updating search index                            1/1
  9. Make sure the package is installed.
    $ pkg list usrlocal
    usrlocal (site)       1.0          i-- 
    $ pkg info usrlocal
              Name: usrlocal
           Summary: Create the /usr/local directory.
       Description: This package installs the /usr/local directory so that
                    /usr/local remains available for unpackaged files.
             State: Installed
         Publisher: site
           Version: 1.0
     Build Release: 5.11
            Branch: None
    Packaging Date: March  3, 2014 06:05:55 PM
              Size: 0.00 B
              FMRI: pkg://site/usrlocal@1.0,5.11:20140303T180555Z
    $ ls -ld /usr/local
    drwxr-xr-x   2 root     bin            2 Mar  3 10:17 /usr/local/

For More Information

About the Photograph

Photograph of Vancouver's laughing statues courtesy of BMK via Wikipedia Commons Creative Commons License 2.0

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel

Wednesday Feb 26, 2014

Oracle Solaris 11 Resources for the AIX Sysadmin

Start buttons belong on Tiger Wood's golf cart. Give me car keys that jangle when I insert them into a 1968 Dodge Charger. The music that engine makes ... it enters your body through your soul before your ear drums even register the vibration. And give me Save buttons on browser-based interfaces, too. This amorphous invisible background save that I'm supposed to trust is happening is the brainchild of developers who put posters of Joseph Stalin on their walls.

In spite of my Luddite tendencies, I do like new technologies. I also like a variety of them. If you ask my personal opinion, the more operating systems, the better. More jobs for sysadmins. More jobs for developers. More arm-wrestling matches in the server room. And more interesting problems. That's my idea of fun.

Unfortunately, it's not The Man's idea of fun. Forces I can't possibly understand and would never take for a joy ride in a stolen Dodge Charger push for consolidation and cost-cutting with the frenzy of a four barrel carburetor sucking air at wide open throttle (WOT). Even if, like me, you prefer a more genteel IT environment, you have to adapt. And so, we sometimes wave good-bye to our friends.

If you're facing a migration away from AIX, consider Oracle Solaris. Yeah, it's designed to handle the competitive pressures of today's IT environments...

  • Cloud-ready provisioning, security, and virtualization
  • Quick to reallocate compute, storage, and network resources
  • Zones, ZFS, Dynamic Tracing, Predictive Self Healing and Trusted Extensions reduce downtime and simplify the application deployment
  • Optimized to run on Oracle hardware, and to run Oracle applications
  • Automated migration tools plus assistance and education for DBAs and Power/AIX administrators migrating to Oracle Solaris.

... and yeah, because the Oracle stack is optimized to run best on Oracle Solaris (and Oracle Linux), it gives you some crazy good numbers compared to AIX ...

  • Up to 2.4x greater database performance
  • Up to 3.4x faster Java application server performance
  • Increased Oracle application performance : 1.9x faster for Siebel CRM (4) and 3x faster for JD Edwards

... but it's also got soul. And it doesn't have a dumb Start button.

Below is a link to a hands-on lab and some other resources to help you understand what's involved in migrating from AIX to Oracle Solaris.

Hands-On Lab: Oracle Solaris Administration for AIX Sysadmins

by Glynn Foster

Walks an AIX sysadmin through the basic administration of Oracle Solaris 11 and how it compares to IBM AIX Enterprise in areas including installation, software packaging, file systems, user management, services, networking, and virtualization. Even makes helps you navigate your way through documentation, man pages, and online how-to articles.

More Resources

About the Photograph

Photograph of '68 Dodge Charger courtesy of Kobac via Wikipedia Commons Creative Commons License 2.0

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel

Monday Feb 24, 2014

If Your Processor Stalls From a Read After Writer Operation ...

... rewrite your code. Better yet, write code that avoids this problem in the first place. The problem can occur when an application wants to load a value that it has just stored in memory. Read After Write (RAW) operations are common, so most chips are designed with hardware that makes that happen fast. But in some cases, you can write code that stumps the hardware. And so it stalls.

And you tumble to earth in horror, screaming for your life and clawing at the controls.

And you smack into the a pile of rocks. Or, to the horror of young mothers in minivans, the freeway during rush-hour traffic. Or worse, the middle of the ocean, so that if you somehow survive the impact, you drown. And nobody finds your body. And your loved ones can never move on.

Unless you're wearing a parachute. Like the one we just published from Darryl Gove.

Tech Article: Avoid Performance Loss (And a Fiery Death) from RAW Hazards

by Darryl Gove

Darryl explains exactly how a processor can stall from a bad RAW operation, and the common situations that cause this problem. Then he shows you how to identify, fix, and avoid writing that kind of code. Examples included. Help your loved ones move on. Read Darryl's article.

About the Author

Darryl Gove is a senior principal software engineer in the Oracle Solaris Studio team, working on optimizing applications and benchmarks for current and future processors. He is also the author of the books Multicore Application Programming, Solaris Application Programming, and The Developer's Edge.

Read Darryl Gove's blog on

Picture of radial engine taken by Rick Ramsey at Bay Area Aerospace Museum

- Rick

Follow me on:
Blog | Facebook | Twitter | YouTube | The Great Peruvian Novel


Logan Rosenstein
and members of the OTN community


« November 2015
Blogs We Like