包含在查找更多文档专项支持资源 | 以 PDF 格式下载本书 (4505 KB)
lucreate(1M)NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | EXIT STATUS | FILES | ATTRIBUTES | SEE ALSO | NOTES NAME
SYNOPSIS
DESCRIPTION
The lucreate command is part of a suite of commands that make up the Live Upgrade feature of the Solaris operating environment. See live_upgrade(5) for a description of the Live Upgrade feature and its associated terminology. The lucreate command offers a set of command line options that enable you to perform the following functions: You can perform the preceding functions using only lucreate command-line options or you can enter a set of options that will automatically invoke an FMLI-based interface that provides curses-based screens for Live Upgrade administration. The creation of a BE includes selecting the disk or device slices for all the mount points of the BE. You can also change the mount points of the BE using the SPLIT and MERGE functions of the FMLI-based configuration screen. Upon successful creation of a BE, you can use lustatus(1M) to view the state of that BE and lufslist(1M) to view the BE's file systems. You use luupgrade(1M) to upgrade the OS on that BE and luactivate(1M) to make a BE active, that is, designate it as the BE to boot from at the next reboot of the system. The lucreate command makes a distinction between the file systems that contain the OS—/, /usr, /var, and /opt—and those that do not, such as /export, /home, and other, user-defined file systems. The file systems in the first category cannot be shared between the source BE and the BE being created; they are always copied from the source BE to the target BE. By contrast, the user-defined file systems are shared by default. For Live Upgrade purposes, the file systems that contain the OS are referred to as non-shareable file systems; other file systems are referred to as shareable. A non-shareable file system listed in the source BE's vfstab is always copied to a new BE. For a shareable file system, if you specify a destination slice, the file system is copied. If you do not, the file system is shared. Except for a special use of the -s option, described below, you must have a source BE for the creation of a new BE. By default, it is the current BE. You can use the -s option to specify a BE other than the current BE. By default, all swap partitions on a source BE are shared between the source and target BE. You can use the -m option (see below) to specify a subset of swap partitions on a source BE for sharing with a target BE. The lucreate command requires root privileges. OPTIONS
The lucreate command has the options listed below. Note that a BE name must not exceed 30 characters in length and must consist only of alphanumeric characters and other ASCII characters that are not special to the Unix shell. See the “Quoting” section of sh(1). The BE name can contain only single-byte, 8–bit characters. Omission of -m or -M options (described below) in an lucreate command line invokes the FMLI-based interface, which allows you to select disk or device slices for a BE. EXAMPLESThe lucreate command produces copious output. In the following examples, this output is not reproduced, except where it is needed for clarity. Example 1 Creating a New Boot Environment for the First TimeThe following command sequence creates a new boot environment on a machine on which a BE has never been created. Note that, in the first command, the -c option is omitted.
The same command is entered, with the addition of -c:
Following creation of a BE, you use luupgrade(1M) to upgrade the OS on the new BE and luactivate(1M) to make that BE the BE you will boot from upon the next reboot of your machine. Note that the swap partition and all shareable file systems for first_disk will be available to (shared with) second_disk.
See luupgrade(1M) and luactivate(1M) for descriptions of those commands. Example 2 Creating a BE using a Source Other than the Current BEThe following command uses the -s option to specify a source BE other than the current BE.
Example 3 Creating a BE from a Flash ArchivePerforming this task involves use of lucreate with the -s – option and luupgrade.
With the -s option, the lucreate command completes it work within seconds. At this point, you can use luupgrade to install the flash archive:
See luupgrade(1M) for a description of that command. Example 4 Using Swap Partitions on Multiple DisksThe command below creates a BE on a second disk and specifies the sharing of swap partitions on both the first and second disks. Note that the current boot environment must already be using /dev/dsk/c0t0d0s1 and /dev/dsk/c0t4d0s1 (on the second disk) as its swap partitions before entering this command.
Following completion of the preceding command, the BE second_disk will use both /dev/dsk/c0t0d0s1 and /dev/dsk/c0t4d0s1 as swap partitions. These swap assignments take effect only after booting from second_disk. If you have a long list of swap partitions, it is useful to use the -M option, as shown below. Example 5 Using a Combination of -m and -M OptionsIn this example, a list of swap partitions is collected in the file /etc/lu/swapslices. The location and name of this file is user-defined. The contents of /etc/lu/swapslices:
This file is specified in the following command:
The BE second_disk will swap onto the partitions specified in /etc/lu/swapslices. As with the previous example, the current BE must already be using the swap partitions specified on the command line before you enter the lucreate command. Example 6 Copying Versus SharingThe following command copies the user file system /home (in addition to the non–shareable file systems / and /usr) from the current BE to the new BE:
The following command differs from the preceding in that the -m option specifying a destination for /home is omitted. The result of this is that /home will be shared between the current BE and the BE second_disk.
Example 7 Invoking FMLI-based InterfaceThe command below, by omitting -m or -M options, invokes the FMLI-based interface for Live Upgrade operations. See lu(1M) for a description of this interface.
The preceding command uses the current BE as the source for the target BE second_disk. In the FMLI interface, you can specify the target disk slices for second_disk. The following command is a variation on the preceding:
In the preceding command, a source for the target BE is specified. As before, the FMLI interface comes up, enabling you to specify target disk slices for the new BE. Example 8 Merging File SystemsThe command below merges the /usr/opt file system into the /usr file system. First, here are the disk slices in the BE first_disk, expressed in the format used for arguments to the -m option:
The following command creates a BE second_disk and performs the merge operation, merging /usr/opt with its parent, /usr.
Example 9 Splitting a File SystemAssume a source BE with /, /usr, and /var all mounted on the same disk slice. The following command creates a BE second_disk that has /, /usr, and /var all mounted on different disk slices.
This separation of a file system's (such as root's) components onto different disk slices is referred to as splitting a file system. Example 10 Specifying Alternative SlicesThe following command uses multiple -m options as alternative disk slices for the new BE second_disk.
The preceding command specifies three possible disk slices, s0, s1, and s5 for the / file system. lucreate selects the first one of these slices that is not being used by another BE. Note that the -s option is omitted, meaning that the current BE is the source BE for the creation of the new BE. EXIT STATUSFILESATTRIBUTESSee attributes(5) for descriptions of the following attributes:
SEE ALSOlu(1M), luactivate(1M), lucancel(1M), lucompare(1M), lucurr(1M), ludelete(1M), lufslist(1M), lumake(1M), lumount(1M), lurename(1M), lustatus(1M), luupgrade(1M), lutab(4), attributes(5), live_upgrade(5) NOTESWhen splitting a directory into multiple mount points, hard links are not maintained across file systems. For example, if /usr/test1/buglist is hard linked to /usr/test2/buglist, and /usr/test1 and /usr/test2 are split into separate file systems, the link between the files will no longer exist. lucreate issues a warning message to that effect and a symbolic link is created to replace the lost hard link. lucreate cannot prevent you from making invalid configurations with respect to non-shareable file systems. For example, you could enter an lucreate command that would create separate file systems for / and /kernel—an invalid division of /. When creating file systems for a boot environment, the rules are identical to the rules for creating file systems for the Solaris operating environment. NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | EXIT STATUS | FILES | ATTRIBUTES | SEE ALSO | NOTES |
||||||||||||||||||||||