Key Users
  Product Detail
  Automated Brochure
  Automated Demos
  Press Releases
  Newsletter
  Brochure
  Testimonials
  Customers
  Analyst Reviews
  Live Demo Request
  ROI

 


 
Join Our Mailing List
Email:
 
    > Newsletter > November 2006 > Spotlight on Solaris - Introduction to Sun Volume Manager (SVM)
 
   
 

Spotlight On: Introduction to Solaris Volume Manager (SVM)
by Bill Calkins

Those of you involved in hardware maintenance have probably come across logical volumes at one time or another. In Solaris 8, Sun called it DiskSuite. In Solaris 9 and 10, Sun renamed it to Solaris Volume Manager (SVM). It's the same package, just a different name.

Logical volumes have been used for years on HP-UX and AIX. For any of you with experience on those platforms, the transition to SVM will be fairly simple, once you understand some of the terminology and concepts. For those of you that have used Sun's conventional hard partitions, SVM will take some understanding. This article will introduce SVM and explain SVM terminology. Learning SVM is much easier once you understand the terminology used.

Before the introduction of logical volumes, the system administrator was stuck with conventional hard slices. Each physical disk was limited to a maximum of 7 hard slices (0-7, not including slice 2). They are called hard slices because the slices are created by selecting actual physical cylinders from the disk. The slice starts at one cylinder and ends at another, and a slice cannot be larger than a single disk drive. A file system gets created on this slice. File systems can only span a single slice, therefore the size of a file system was limited to the total size of a disk. On the OS drive, hard slices get created when the OS is installed. If you run out of space, for example if /var fills up, it is difficult to resize the hard slice without destroying all of the data on the disk.

SVM, using logical volumes, gets us past this limitation. Where a physical volume represents one single disk, a "logical" volume can represent several disks at once. In SVM, a slice is built on this logical volume. Therefore SVM is not bound by physical hardware limitations and slices can span multiple physical disks. Soft slices, built on top of the logical volume, can span many disks and can be as large as we want them to be. Furthermore, logical volumes can be increased by adding more drives and soft slices and can be increased if your file system needs more room.

To start using SVM, you need a physical disk drive. You'll need at least one hard slice on the disk so that SVM can use that disk. Wait Bill, I thought you just said that SVM does not use hard slices? To create our logical volume, we need to start with a formatted disk- a hard slice. Remember though, this slice can be an entire disk and SVM will concatenate these slices (disks) together when it creates its logical volume. Once the logical volume has been created, we no longer work with the hard slice.

Let's say that you have two 76GB disk drives. Every disk has a particular geometry that defines it. My 76GB disk has 39418 cylinders. When I go into the format command, I see that slice 2 starts at cylinder 0 and ends at cylinder 39417 for a total of 39418 cylinders, or roughly 76GB. Slice 2 always represents the entire disk. Therefore, I really don't need to slice the disk, and I'll just use slice 2.

Next, I'll use SVM to concatenate both disks and create a logical volume that represents both drives- a 152GB logical volume. After I create the logical volume, I need to create file systems on the logical volume. I'll divide the logical volume up into soft slices, also called soft or "logical" partitions. Each soft partition will become a file system. I could create 100 or more soft partitions, so I'll chop this disk into 100 soft slices and divvy out a 1GB file system to each of my users. That leaves me with 52GB remaining, which I'll save for later. When a user runs out of space, I'll use this extra space to increase their file system- while the file system is in use and without affecting the other file systems on that disk.

I'll also use SVM to mirror my OS drives. It's a bit more complex but, to make a long story short, I first install the OS as I did before on a single disk. Just like I've always done, I use suninstall to create hard slices on the boot disk and load the OS onto those hard slices. Once the system is installed, I'll go through a simple conversion and put those slices under SVM control. Then I'll add in a second disk and use SVM to mirror the data to the second drive.

Here are some terms to get familiar with as you learn SVM:

Volume - A volume, or metadevice, is a group of physical slices that appear to the system as a single, logical device. A volume is used to increase storage capacity and increase data availability. Solaris 10 SVM can support up to 8,192 logical volumes per disk set (see below), but the default is to support 128 logical volumes, namely d0 thru d127. The various types of volumes are described in the next section of this chapter.

State database - A state database is a database that stores information about the state of the SVM configuration. Each state database is a collection of multiple, replicated database copies. Each copy is referred to as a state database replica. SVM cannot operate until you have created the state database and its replicas. You should create at least three state database replicas when using SVM because the validation process requires a majority (half + 1) of the state databases to be consistent with each other before the system will start up correctly. Each state database replica should ideally be physically located on a separate disk (and preferably a separate disk controller for added resilience).

Soft partition - A soft partition is a means of dividing a disk or volume into as many partitions as needed, overcoming the current limitation of eight. This is done by creating logical partitions within physical disk slices or logical volumes.

There is a lot to talk about with SVM and it would take several articles to explain such as:

  • How important are metadatabases? Why do I need copies of them? What happens when a device fails?
  • How do I allocate my metadatabases for optimum performance and uptime?
  • What rules do I need to follow when creating metadevices?
  • How do I use SVM to improve disk I/O
  • What are the specifics of mirroring the OS?
  • How do I detect failures in an SVM environment?
  • How do I replace a failed device in an SVM environment?
  • How do I create a striped volume?

If you need to support SVM or are a hardware tech responsible for hardware running in an SVM environment, I invite you to attend an online training session being held in December. It's the same course I teach in the classroom and I assure you that it will fill in the gaps on SVM. SVM is a topic that can be tough to figure out on your own. There are some fundamental concepts that you need to understand before building your SVM volumes, and the correct foundation and training can save you a lot of grief later on.

Click here to get the details on the course and sign up soon - it's my most popular course and space is limited. In the online course, we'll have live lecture and you'll be able to perform live labs. Following the SVM course, in Q1 2007, we'll move on and cover Veritas and Zeta File System (ZFS), which are other logical volume management tools that you'll run into, but those will be covered in future articles. If you plan to use any of these LVM packages, it's important not to miss any of the courses as each course builds on the previous course material.

If you have questions or comments regarding this article or would like to submit a question or topic for future discussion, please email me at billcalkins@stsolutions.com