以 PDF 格式下載這本書 (1055 KB)
Part II Understanding Installations That Relate to ZFS, Booting, Solaris Zones, and RAID-1 VolumesThis part provides an overview of several technologies that relate to a Solaris OS installation or upgrade. Guidelines and requirements are also included.
Chapter 6 ZFS Root File System Installation (Planning)This chapter provides system requirements and limitations to assist you when you install a ZFS root pool. Also provided is an overview of the installation programs that can install a ZFS root pool. If you have multiple boot environments on your system see Chapter 7, SPARC and x86 Based Booting (Overview and Planning) for information on booting. Requirements for Installing a ZFS Root PoolTable 6–1 System Requirements and Limitations
Disk Space Requirements for a ZFS InstallationNormally, on a system with a UFS root file system, swap and dump are on the same slice. Therefore, UFS shares the swap space with the dump device. In a ZFS root pool, swap and dump are separate zvols, so they do not share the same physical space. When a system is installed or upgraded with a ZFS root file system, the size of the swap area and the dump device are dependent on the amount of physical memory. The minimum amount of available pool space for a bootable ZFS root file system depends on the amount of physical memory, the disk space available, and the number of boot environments to be created. Approximately 1 Gbyte of memory and at least 2 Gbytes of disk space are recommended. The space is consumed as follows:
Solaris Installation Programs for Installing ZFS Root PoolsThe following installation programs perform an initial installation of a ZFS root pool.
Solaris Live Upgrade can migrate a UFS file system to a ZFS root pool. Also, Solaris Live Upgrade can create ZFS boot environments that can be upgraded. Table 6–2 ZFS Installation Programs and Limitations
Chapter 7 SPARC and x86 Based Booting (Overview and Planning)Starting with the Solaris 10 10/08 release, changes in Solaris boot architecture provides many new features, including booting from different file system types, such as ZFS file systems. This chapter describes some of these changes and provides references to more information about booting. Also, this chapter provides an overview of GRUB based booting for x86 systems. This chapter contains the following sections: Booting for Solaris (Overview)Starting with the Solaris 10 10/08 release, the Solaris SPARC bootstrap process has been redesigned to increase commonality with the Solaris x86 boot architecture. The improved Solaris boot architecture brings direct boot, ramdisk-based booting, and the ramdisk miniroot to the SPARC platform. These enabling technologies support the following functions:
Additional improvements include significantly faster boot times, increased flexibility, and reduced maintenance requirements. As part of this architecture redesign, the Solaris boot archives and the bootadm command, previously only available on the Solaris x86 platform, are now an integral part of the Solaris SPARC boot architecture. Although the implementation of the Solaris SPARC boot has changed, no administrative procedures for booting a SPARC-based system have been impacted. Solaris installations have changed to include installing from a ZFS file system, but otherwise have not changed for the new boot architecture. Booting ZFS Boot Environments (Overview)If your system has more than one OS installed on the system or more than one root boot environment in a ZFS root pool, you can boot from these boot environments for both SPARC and x86 platforms. The boot environments available for booting include boot environments created by Solaris Live Upgrade.
On both SPARC and x86 based systems, each ZFS root pool has a dataset designated as the default root file system. If for SPARC, you type the boot command or for x86, you take the default from the GRUB menu, then this default root file system is booted. Table 7–1 Where to Find Information on Booting
x86: GRUB Based Booting (Overview)GRUB, the open source boot loader, is the default boot loader in the Solaris OS. The boot loader is the first software program that runs after you power on a system. After you power on an x86 based system, the Basic Input/Output System (BIOS) initializes the CPU, the memory, and the platform hardware. When the initialization phase has completed, the BIOS loads the boot loader from the configured boot device, and then transfers control of the system to the boot loader. GRUB is an open source boot loader with a simple menu interface that includes boot options that are predefined in a configuration file. GRUB also has a command-line interface that is accessible from the menu interface for performing various boot commands. In the Solaris OS, the GRUB implementation is compliant with the Multiboot Specification. The specification is described in detail at http://www.gnu.org/software/grub/grub.html. Because the Solaris kernel is fully compliant with the Multiboot Specification, you can boot a Solaris x86 based system by using GRUB. With GRUB, you can more easily boot and install various operating systems. A key benefit of GRUB is that it is intuitive about file systems and kernel executable formats, which enables you to load an operating system without recording the physical position of the kernel on the disk. With GRUB based booting, the kernel is loaded by specifying its file name, and the drive, and the partition where the kernel resides. GRUB based booting replaces the Solaris Device Configuration Assistant and simplifies the booting process with a GRUB menu. x86: GRUB Based Booting (Planning)This section describes the basics of GRUB based booting and describes the GRUB menu. When you install the Solaris OS, two GRUB menu entries are installed on the system by default. The first entry is the Solaris OS entry. The second entry is the failsafe boot archive, which is to be used for system recovery. The Solaris GRUB menu entries are installed and updated automatically as part of the Solaris software installation and upgrade process. These entries are directly managed by the OS and should not be manually edited. During a standard Solaris OS installation, GRUB is installed on the Solaris fdisk partition without modifying the system BIOS setting. If the OS is not on the BIOS boot disk, you need to do one of the following:
The preferred method is to install the Solaris OS on the boot disk. If multiple operating systems are installed on the machine, you can add entries to the menu.lst file. These entries are then displayed in the GRUB menu the next time you boot the system. For additional information on multiple operating systems, see How Multiple Operating Systems Are Supported by GRUB in System Administration Guide: Basic Administration. x86: Performing a GRUB Based Installation From the NetworkPerforming a GRUB based network boot requires a DHCP server that is configured for PXE clients and an install server that provides tftp service. The DHCP server must be able to respond to the DHCP classes, PXEClient and GRUBClient. The DHCP response must contain the following information:
Note – rpc.bootparamd, which is usually a requirement on the server side for performing a network boot, is not required for a GRUB based network boot. If no PXE or DHCP server is available, you can load GRUB from CD-ROM or local disk. You can then manually configure the network in GRUB and download the multiboot program and the boot archive from the file server. For more information, see Overview of Booting and Installing Over the Network With PXE in Solaris 10 10/08 Installation Guide: Network-Based Installations. Chapter 8 Upgrading When Solaris Zones Are Installed on a System (Planning)This chapter provides an overview of how Solaris Zones partitioning technology relates to upgrading the Solaris OS when non-global zones are configured. This chapter contains the following sections: Solaris Zones (Overview)The Solaris Zones partitioning technology is used to virtualize operating system services and provide an isolated and secure environment for running applications. A non-global zone is a virtualized operating system environment created within a single instance of the Solaris OS. When you create a non-global zone, you produce an application execution environment in which processes are isolated from the rest of the system. This isolation prevents processes that are running in one non-global zone from monitoring or affecting processes that are running in other non-global zones. Even a process running with superuser credentials cannot view or affect activity in other zones. A non-global zone also provides an abstract layer that separates applications from the physical attributes of the machine on which they are deployed. Examples of these attributes include physical device paths. Every Solaris system contains a global zone. The global zone has a dual function. The global zone is both the default zone for the system and the zone used for system-wide administrative control. All processes run in the global zone if no non-global zones are created by the global administrator. The global zone is the only zone from which a non-global zone can be configured, installed, managed, or uninstalled. Only the global zone is bootable from the system hardware. Administration of the system infrastructure, such as physical devices, routing, or dynamic reconfiguration (DR), is only possible in the global zone. Appropriately privileged processes running in the global zone can access objects associated with the non-global zones.
Upgrading With Non-Global ZonesAfter the Solaris OS is installed, you can install and configure non-global zones. You can upgrade the Solaris OS when non-global zones are installed. If you have branded non-global zones installed, they are ignored during the upgrade process. Changes to accommodate systems that have non-global zones installed are summarized below.
Backing Up Your System Before Performing an Upgrade With ZonesYou should back up the global and non-global zones on your Solaris system before you perform the upgrade. For information about backing up a system with zones installed, see Chapter 26, Solaris Zones Administration (Overview), in System Administration Guide: Solaris Containers-Resource Management and Solaris Zones. Disk Space Requirements for Non-Global ZonesWhen installing the global zone, be sure to reserve enough disk space for all of the zones you might create. Each non-global zone might have unique disk space requirements. No limits are placed on how much disk space can be consumed by a zone. The global zone administrator is responsible for space restriction. Even a small uniprocessor system can support a number of zones running simultaneously. The characteristics of the packages installed in the global zone affect the space requirements of the non-global zones that are created. The number of packages and space requirements are factors. For complete planning requirements and recommendations, see Chapter 18, Planning and Configuring Non-Global Zones (Tasks), in System Administration Guide: Solaris Containers-Resource Management and Solaris Zones. Chapter 9 Creating RAID-1 Volumes (Mirrors) During Installation (Overview)This chapter discusses the advantages of creating RAID-1 volumes (mirrors) for the root (/) file system. This chapter also describes the Solaris Volume Manager components that are required to create mirrors for file systems. This chapter describes the following topics. For additional information specific to Solaris Live Upgrade or JumpStart, see the following references:
Why Use RAID-1 Volumes?During the installation or upgrade, you can create RAID-1 volumes to duplicate your system data over multiple physical disks. By duplicating your data over separate disks, you can protect your data from disk corruption or a disk failure. The Solaris custom JumpStart and Solaris Live Upgrade installation methods use the Solaris Volume Manager technology to create RAID-1 volumes that mirror a file system. Solaris Volume Manager provides a powerful way to reliably manage your disks and data by using volumes. Solaris Volume Manager enables concatenations, stripes, and other complex configurations. The custom JumpStart and Solaris Live Upgrade installation methods enable a subset of these tasks, such as creating a RAID-1 volume for the root (/) file system. You can create RAID-1 volumes during your installation or upgrade, eliminating the need to create them after the installation.
How Do RAID-1 Volumes Work?Solaris Volume Manager uses virtual disks to manage physical disks and their associated data. In Solaris Volume Manager, a virtual disk is called a volume. A volume is a name for a group of physical slices that appear to the system as a single, logical device. Volumes are actually pseudo, or virtual, devices in standard UNIX® terms. A volume is functionally identical to a physical disk in the view of an application or a file system (such as UFS). Solaris Volume Manager converts I/O requests that are directed at a volume into I/O requests to the underlying member disks. Solaris Volume Manager volumes are built from slices (disk partitions) or from other Solaris Volume Manager volumes. You use volumes to increase performance and data availability. In some instances, volumes can also increase I/O performance. Functionally, volumes behave the same way as slices. Because volumes look like slices, they are transparent to end users, applications, and file systems. Like physical devices, you can use Solaris Volume Manager software to access volumes through block or raw device names. The volume name changes, depending on whether the block or raw device is used. The custom JumpStart installation method and Solaris Live Upgrade support the use of block devices to create mirrored file systems. See RAID Volume Name Requirements and Guidelines for Custom JumpStart and Solaris Live Upgrade for details about volume names. When you create RAID-1 volumes ) with RAID-0 volumes (single-slice concatenations), Solaris Volume Manager duplicates data on the RAID-0 submirrors and treats the submirrors as one volume. Figure 9–1 shows a mirror that duplicates the root (/) file system over two physical disks. Figure 9–1 Creating RAID-1 Volumes on the Root (/) File System on Two Disks
Figure 9–1 shows a system with the following configuration.
Overview of Solaris Volume Manager ComponentsThe custom JumpStart installation method and Solaris Live Upgrade enable you to create the following components that are required to replicate data.
This section briefly describes each of these components. For complete information about these components, see Solaris Volume Manager Administration Guide. State Database and State Database ReplicasThe state database is a database that stores information on a physical disk. The state database records and tracks changes that are made to your configuration. Solaris Volume Manager automatically updates the state database when a configuration or state change occurs. Creating a new volume is an example of a configuration change. A submirror failure is an example of a state change. The state database is actually a collection of multiple, replicated database copies. Each copy, referred to as a state database replica, ensures that the data in the database is always valid. Having copies of the state database protects against data loss from single points of failure. The state database tracks the location and status of all known state database replicas. Solaris Volume Manager cannot operate until you have created the state database and its state database replicas. A Solaris Volume Manager configuration must have an operating state database. The state database replicas ensure that the data in the state database is always valid. When the state database is updated, each state database replica is also updated. The updates occur one at a time to protect against corruption of all updates if the system crashes. If your system loses a state database replica, Solaris Volume Manager must identify which state database replicas still contain valid data. Solaris Volume Manager determines this information by using a majority consensus algorithm. This algorithm requires that a majority (half + 1) of the state database replicas be available and in agreement before any of them are considered valid. Because of this majority consensus algorithm, you must create at least three state database replicas when you set up your disk configuration. A consensus can be reached if at least two of the three state database replicas are available. Each state database replica occupies 4 Mbytes (8192 disk sectors) of disk storage by default. Replicas can be stored on the following devices:
Replicas cannot be stored on the root (/), swap, or /usr slices, or on slices that contain existing file systems or data. After the replicas have been stored, volumes or file systems can be placed on the same slice. You can keep more than one copy of a state database on one slice. However, you might make the system more vulnerable to a single point of failure by placing state database replicas on a single slice.
RAID-1 Volumes (Mirrors)A RAID-1 volume, or mirror, is a volume that maintains identical copies of the data in RAID-0 volumes (single-slice concatenations). After you configure a RAID-1 volume, the volume can be used just as if it were a physical slice. You can duplicate any file system, including existing file systems. You can also use a RAID-1 volume for any application, such as a database. Using RAID-1 volumes to mirror file systems has advantages and disadvantages:
RAID-0 Volumes (Concatenations)A RAID-0 volume is a single-slice concatenation. The concatenation is a volume whose data is organized serially and adjacently across components, forming one logical storage unit. The custom JumpStart installation method and Solaris Live Upgrade do not enable you to create stripes or other complex Solaris Volume Manager volumes. During the installation or upgrade, you can create RAID-1 volumes (mirrors) and attach RAID-0 volumes to these mirrors. The RAID-0 volumes that are mirrored are called submirrors. A mirror is made of one or more RAID-0 volumes. After the installation, you can manage the data on separate RAID-0 submirror volumes by administering the RAID-1 mirror volume through the Solaris Volume Manager software. The custom JumpStart installation method enables you to create a mirror that consists of up to two submirrors. Solaris Live Upgrade enables you to create a mirror that consists of up to three submirrors. Practically, a two-way mirror is usually sufficient. A third submirror enables you to make online backups without losing data redundancy while one submirror is offline for the backup.
Example of RAID-1 Volume Disk LayoutThe following figure shows a RAID-1 volume that duplicates the root file system (/) over two physical disks. State database replicas (metadbs) are placed on both disks. Figure 9–2 RAID-1 Volume Disk Layout
Figure 9–2 shows a system with the following configuration.
Chapter 10 Creating RAID-1 Volumes (Mirrors) During Installation (Planning)This chapter describes the requirements and guidelines that are necessary to create RAID-1 volumes with the custom JumpStart or Solaris Live Upgrade installation methods. This chapter describes the following topics. For additional information specific to Solaris Live Upgrade or JumpStart, see the following references:
System RequirementTo create RAID-1 volumes to duplicate data on specific slices, the disks that you plan to use must be directly attached and available to the system during the installation. State Database Replicas Guidelines and RequirementsYou should distribute state database replicas across slices, drives, and controllers, to avoid single points of failure. You want a majority of replicas to survive a single component failure. If you lose a replica, when a device fails, for example, the failure might cause problems with running Solaris Volume Manager software or when rebooting the system. Solaris Volume Manager software requires at least half of the replicas to be available to run, but a majority (half plus one) to reboot into multiuser mode. For detailed instructions about creating and administering state database replicas, see Solaris Volume Manager Administration Guide. Selecting Slices for State Database ReplicasBefore selecting slices for state database replicas, consider the following guidelines and recommendations.
Choosing the Number of State Database ReplicasBefore choosing the number of state database replicas, consider the following guidelines.
Distributing State Database Replicas Across ControllersIf multiple controllers exist, replicas should be distributed as evenly as possible across all controllers. This strategy provides redundancy if a controller fails and also helps balance the load. If multiple disks exist on a controller, at least two of the disks on each controller should store a replica. RAID-1 and RAID-0 Volume Requirements and GuidelinesWhen you are working with RAID-1 volumes (mirrors) and RAID-0 volumes (single-slice concatenations), consider the following guidelines. Custom JumpStart and Solaris Live Upgrade GuidelinesThe custom JumpStart installation method and Solaris Live Upgrade support a subset of the features that are available in the Solaris Volume Manager software. When you create mirrored file systems with these installation programs, consider the following guidelines.
RAID Volume Name Requirements and Guidelines for Custom JumpStart and Solaris Live UpgradeObserve the following rules when assigning names for volumes.
RAID Volume Naming Conventions for Solaris Live UpgradeWhen you use the Solaris Live Upgrade to create RAID-1 volumes (mirrors) and RAID-0 volumes (submirrors), you can enable the software to detect and assign volume names, or you can assign the names. If you enable the software to detect the names, the software assigns the first mirror or submirror name that is available. If you assign mirror names, assign names ending in zero so that the installation can use the names ending in 1 and 2 for submirrors. If you assign submirror names, assign names ending in 1 or 2. If you assign numbers incorrectly, the mirror might not be created. For example, if you specify a mirror name with a number that ends in 1 or 2 (d1 or d2), Solaris Live Upgrade fails to create the mirror if the mirror name duplicates a submirror's name. Note – In previous releases, an abbreviated volume name could be entered. Starting with the 10 10/08 release, only the full volume name can be entered. For example, only the full volume name, such as /dev/md/dsk/d10, can be used to specify a mirror. Example 10–1 Solaris Live Upgrade: Enable the Software to Detect and Name the Mirror and SubmirrorIn this example, Solaris Live Upgrade assigns the volume names. The RAID-1 volumes d0 and d1 are the only volumes in use. For the mirror d10, Solaris Live Upgrade chooses d2 for the submirror for the device c0t0d0s0 and d3 for the submirror for the device c1t0d0s0.
Example 10–2 Solaris Live Upgrade: Assign Mirror and Submirror NamesIn this example, the volume names are assigned in the command. For the mirror d10, d11 is the name for the submirror for the device c0t0d0s0 and d12 is the name for the submirror for the device c1t0d0s0.
For detailed information about Solaris Volume Manager naming requirements, see Solaris Volume Manager Administration Guide. RAID-Volume Naming Conventions for Custom JumpStartWhen you use the custom JumpStart installation method to create RAID-1 volumes (mirrors) and RAID-0 volumes (submirrors), you can enable the software to detect and assign volume names to mirrors, or you can assign the names in the profile.
Note – You can abbreviate the names of physical disk slices and Solaris Volume Manager volumes. The abbreviation is the shortest name that uniquely identifies a device. Examples follow.
Example 10–3 Enable the Software to Detect the Mirror and Submirror NamesIn the following profile example, the mirror is assigned the first volume numbers that are available. If the next available mirror ending in zero is d10, then the names d11 and d12 are assigned to the submirrors. filesys mirror c0t0d0s1 / Example 10–4 Assigning Mirror and Submirror NamesIn the following profile example, the mirror number is assigned in the profile as d30. The submirror names are assigned by the software, based on the mirror number and the first available submirrors. The submirrors are named d31 and d32. filesys mirror:d30 c0t1d0s0 c0t0d0s0 / For detailed information about Solaris Volume Manager naming requirements, see Solaris Volume Manager Administration Guide. Guidelines for Selecting Disks and ControllersWhen you choose the disks and controllers that you want to use to mirror a file system, consider the following guidelines.
Guidelines for Selecting SlicesWhen you choose the slices that you want to use to mirror a file system, consider the following guidelines.
Booting Into Single-User Mode Causes Mirror to Appear to Need MaintenanceIf a system with mirrors for root (/), /usr, and swap is booted into single-user mode, the system indicates that these mirrors are in need of maintenance. When you view these mirrors with the metastat command, these mirrors, and possibly all mirrors on the system, appear in the “Needing Maintenance” state. Though this situation appears to be potentially dangerous, do not be concerned. The metasync -r command, which normally occurs during boot to resynchronize mirrors, is interrupted when the system is booted into single-user mode. After the system is rebooted, the metasync -r command runs and resynchronizes all mirrors. If this interruption is a concern, run the metasync -r command manually. For more information about the metasync, see the metasync(1M) man page, and Solaris Volume Manager Administration Guide. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||