Previous Page
Next Page

Disk Storage

Before you begin to install a system, you need to think about how you want data stored on your system's disks. With one disk, the decision is easy. When multiple disks are installed, you must decide which disks to use for the operating system, the swap area, and the user data.

As described in Chapter 1, "Managing File Systems," Solaris breaks disks into pieces called partitions, or slices. A Solaris disk can be divided into a maximum of seven slices.

Why would you want to divide the disk into multiple slices? Some administrators don't; they use the entire disk with one slice. By using one slice, all of the space on the disk is available for anyone to use. When the system administrator creates a slice, the space in that slice is available only to the file system that is mounted on it. If another file system on the same disk runs out of space, it cannot borrow space from the other slice without repartitioning the disk. However, having multiple slices can provide some advantages. The following list describes some of the reasons why you might want to consider partitioning disks into multiple slices:

  • Slices allow finer control over tasks such as creating backups. Unix commands such as ufsdump work on entire file systems. For backups, you might want to separate data and swap space from the application software so that backups are completed faster with a ufsdump. For example, you might want to back up only data on a daily basis. On the other hand, you'll need to take the system down to single-user mode to back up / and /usr, so separating the data will make your backup complete much more quickly and will result in less downtime.

  • If one file system becomes corrupted, the others remain intact. If you need to perform a recovery operation, you can restore a smaller file system more quickly. Also, when data is separated from system software, you can modify file systems without shutting down the system or reloading operating system software.

  • Slices allow you to control the amount of disk storage allocated to an activity or type of use. For example, /var can grow rapidly because it stores mail, log files, and patch backups. To keep /var from filling up the root (/) file system, we typically create a slice specifically for the /var file system.

  • If file systems are mounted remotely from other systems, you can share only the data that needs to be accessed, not the entire system disk.

The installation process gives you the option of creating slices. Start with the default partition scheme supplied with the installation program, which is to set up a file system for root (/) and swap. This scheme sets up the required slices and provides you with the sizes required, based on the software group you select to install. The following is a typical partitioning scheme for a system with a single disk drive:

  • root (/) and /usr Solaris creates the root (/) slice by default. It is also recommended that you create a slice for /usr. The auto_layout function of the installation program determines how much space you need in root (/) and /usr. Most of the files in these two slices are static. Information in these file systems will not increase in size unless you add software packages later. If you plan to add third-party software after the installation of Solaris, make sure you increase the root (/) and /usr slices to accommodate the additional files you plan to load. If the root (/) file system fills up, the system will not operate properly.

  • Swap This area on the disk doesn't have files in it. In Unix, you're allowed to have more programs than will fit into memory. The pieces that aren't currently needed in memory are transferred into swap to free up physical memory for other active processes. Swapping into a dedicated slice is a good idea for two reasons: Swap slices are isolated so that they aren't put on tape with the daily backups, and a swap slice can be laid out on a disk in an area to optimize performance.

  • /export/home On a single-disk system, everything not in root (/), /usr, or swap should go into a separate slice. /export/home is where you would put user-created files.

  • /var (optional) Solaris uses this area for system log files, print spoolers, and email. The name /var is short for variable; this file system contains system files that are not static but are variable in size. One day the print spooler directory might be empty; another day it might contain several 1MB files. This separate file system is created to keep the root (/) and /usr file systems from filling up with these files. If the /var file system does not exist, make sure you make root (/) larger.

  • /opt (optional) By default, the Solaris installation program loads optional software packages here. Also, third-party applications are usually loaded into /opt. If this file system does not exist, the installation program puts the optional software in the root file system. If the /opt file system does not exist, make sure you make root (/) larger.

File systems provide a way to segregate data, but when a file system runs out of space, you can't "borrow" from a file system that has some unused space. Therefore, the best plan is to create a minimal number of file systems with adequate space for expansion. This concept is discussed in Chapter 1, "Managing File Systems," and the ability to make file systems larger is described in Chapter 10, "Managing Storage Volumes."

Basic Considerations for Planning Partition (Slice) Sizes

Planning disk and partition space depends on many factors: the number of users, the application requirements, and the number and size of files and databases. The following are some basic considerations for determining your disk space requirements:

  • Allocate additional disk space for each language selected (for example, Chinese, Japanese, and Korean).

  • If you need printing or mail support, create a slice for a separate /var file system and allocate additional disk space. You need to estimate the number and size of email messages and print files to size this slice properly. In addition to this space, if you intend to use the crash dump feature savecore, allocate additional space in /var equal to twice the amount of physical memory.

  • Allocate additional disk space on a server that will provide home file systems for users. Again, the number of users and the size of their files will dictate the size of this file system. By default, home directories are usually located in the /export file system.

  • Allocate additional disk space on an operating system server for JumpStart clients if this server will be used as a JumpStart installation server.

  • Make sure you allocate enough swap space. The minimum size for the swap slice is 512MB. Factors that dictate the amount of swap space are the concurrent number of users and the application requirements. Consult with your application vendor for swap-space requirements. Vendors usually give you a formula to determine the amount of swap space you need for each application. In addition, the swap slice will be used for core dumps and should contain enough space to hold a complete core dumpthat is, exceed the size of the installed RAM. See Chapter 9 for more information on configuring core dumps.


    Sizing the Swap Area In the past, system administrators sized their swap based on the amount of RAM installed in their system. A simple rule of "set your minimum swap space at two times the amount of physical memory" was used. With newer systems now containing several gigabytes of RAM, this rule is no longer relevant. See Chapter 9, "Virtual File Systems, Swap, and Core Dumps" for more information on swap.

  • Determine the software packages you will be installing and calculate the total amount of disk space required. When planning disk space, remember that the Solaris Interactive Installation program lets you add or remove individual software packages from the software group that you select.

  • Create a minimum number of file systems. By default, the Solaris Interactive Installation program creates file systems for only root (/) and swap, although /export is also created when space is allocated for operating system services. Creating a minimum number of file systems helps with future upgrades and file system expansion because separate file systems are limited by their slice boundaries. Be generous with the size of your file systems, especially root (/) and /usr. Even when using logical volumes, these file systems cannot be increased without completely reloading the operating system.

  • For each file system you create, allocate an additional 30% more disk space than you need to allow for future Solaris upgrades. This is because each new Solaris release needs approximately 10% more disk space than the previous release. By allocating an additional 30% more space for each file system, you'll allow for several Solaris upgrades before you need to repartition your system disk.

  • Calculate additional disk space for copackaged or third-party software.

  • If you will be using Solaris Volume Manager (SVM), you'll need to allocate an empty slice for the metadb replicas. See Chapter 10, "Managing Storage Volumes," for more information on SVM.

Slice Arrangements on Multiple Disks

Although a single large disk can hold all slices and their corresponding file systems, two or more disks are often used to hold a system's slices and file systems.


Conventional File Systems Using conventional Solaris file systems, you cannot split a slice between two or more disks. Solaris Volume Manager is described in Chapter 9 and allows us to overcome this limitation. For this chapter, however, I'm going to describe the use of conventional file systems.

For example, a single disk might hold the root (/) file system, a swap area, and the /usr file system, and a second disk might be used for the /export/home file system and other file systems containing user data. In a multiple-disk arrangement, the disk containing the root (/) and /usr file systems and swap space is referred to as the system disk or boot disk. Disks other than the system disk are called secondary disks or nonsystem disks.

Locating a system's file systems on multiple disks allows you to modify file systems and slices on the secondary disks without shutting down the system or reloading the operating system software. Also, using multiple disks allows you to distribute the workload as evenly as possible among different I/O systems and disk drives, such as distributing the /home and swap slices evenly across disks.

Having more than one disk increases input/output (I/O) volume. By distributing the I/O load across multiple disks, you can avoid I/O bottlenecks.


Improving System Performance with Multiple Swap Slices A good way to improve system performance is to create more than one swap slice and assign each one to a separate disk drive. When the system needs to access swap, the disk I/O is spread evenly across the multiple disk drives.

Previous Page
Next Page