JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1M: System Administration Commands     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

Introduction

System Administration Commands - Part 1

6to4relay(1M)

accept(1M)

acct(1M)

acctadm(1M)

acctcms(1M)

acctcon1(1M)

acctcon(1M)

acctcon2(1M)

acctdisk(1M)

acctdusg(1M)

acctmerg(1M)

accton(1M)

acctprc1(1M)

acctprc(1M)

acctprc2(1M)

acctsh(1M)

acctwtmp(1M)

acpihpd(1M)

adbgen(1M)

add_allocatable(1M)

addbadsec(1M)

add_drv(1M)

add_install_client(1M)

add_to_install_server(1M)

afbconfig(1M)

apache(1M)

arp(1M)

atohexlabel(1M)

audit(1M)

auditconfig(1M)

auditd(1M)

auditrecord(1M)

auditreduce(1M)

auditstat(1M)

audit_warn(1M)

automount(1M)

automountd(1M)

autopush(1M)

bart(1M)

beadm(1M)

boot(1M)

bootadm(1M)

bootconfchk(1M)

bootparamd(1M)

busstat(1M)

cachefsd(1M)

cachefslog(1M)

cachefspack(1M)

cachefsstat(1M)

cachefswssize(1M)

captoinfo(1M)

catman(1M)

cfgadm(1M)

cfgadm_ac(1M)

cfgadm_cardbus(1M)

cfgadm_fp(1M)

cfgadm_ib(1M)

cfgadm_pci(1M)

cfgadm_sata(1M)

cfgadm_sbd(1M)

cfgadm_scsi(1M)

cfgadm_sdcard(1M)

cfgadm_shp(1M)

cfgadm_sysctrl(1M)

cfgadm_usb(1M)

cfsadmin(1M)

chargefee(1M)

chat(1M)

check(1M)

check-hostname(1M)

check-permissions(1M)

chk_encodings(1M)

chroot(1M)

cimworkshop(1M)

ckpacct(1M)

clear_locks(1M)

clinfo(1M)

closewtmp(1M)

clri(1M)

comsat(1M)

consadm(1m)

conv_lp(1M)

conv_lpd(1M)

coreadm(1M)

cpustat(1M)

cron(1M)

cryptoadm(1M)

cvcd(1M)

datadm(1M)

dcopy(1M)

dcs(1M)

dd(1M)

devattr(1M)

devfree(1M)

devfsadm(1M)

devfsadmd(1M)

device_allocate(1M)

device_remap(1M)

devinfo(1M)

devlinks(1M)

devnm(1M)

devprop(1M)

devreserv(1M)

df(1M)

dfmounts(1M)

dfmounts_nfs(1M)

dfshares(1M)

dfshares_nfs(1M)

df_ufs(1M)

dhcpagent(1M)

dhcpconfig(1M)

dhcpmgr(1M)

dhtadm(1M)

dig(1M)

directoryserver(1M)

disks(1M)

diskscan(1M)

dispadmin(1M)

dladm(1M)

dlmgmtd(1M)

dlstat(1M)

dmesg(1M)

dminfo(1M)

dns-sd(1M)

dnssec-dsfromkey(1M)

dnssec-keyfromlabel(1M)

dnssec-keygen(1M)

dnssec-makekeyset(1M)

dnssec-signkey(1M)

dnssec-signzone(1M)

dodisk(1M)

domainname(1M)

drd(1M)

drvconfig(1M)

dsbitmap(1M)

dscfg(1M)

dscfgadm(1M)

dscfglockd(1M)

dsstat(1M)

dsvclockd(1M)

dtrace(1M)

dumpadm(1M)

editmap(1M)

edquota(1M)

eeprom(1M)

efdaemon(1M)

embedded_su(1M)

etrn(1M)

fbconfig(1M)

fbconf_xorg(1M)

fcadm(1M)

fcinfo(1M)

fdetach(1M)

fdisk(1M)

ff(1M)

ffbconfig(1M)

ff_ufs(1M)

fingerd(1M)

fiocompress(1M)

flar(1M)

flarcreate(1M)

flowadm(1M)

flowstat(1M)

fmadm(1M)

fmd(1M)

fmdump(1M)

fmstat(1M)

fmthard(1M)

format(1M)

fpsd(1M)

fruadm(1M)

fsck(1M)

fsck_cachefs(1M)

fsck_pcfs(1M)

fsck_udfs(1M)

fsck_ufs(1M)

fsdb(1M)

fsdb_udfs(1M)

fsdb_ufs(1M)

fsirand(1M)

fssnap(1M)

fssnap_ufs(1M)

fsstat(1M)

fstyp(1M)

ftpaddhost(1M)

ftpconfig(1M)

ftpd(1M)

ftprestart(1M)

ftpshut(1M)

fuser(1M)

fwflash(1M)

fwtmp(1M)

getdev(1M)

getdevpolicy(1M)

getdgrp(1M)

getent(1M)

gettable(1M)

getty(1M)

getvol(1M)

GFXconfig(1M)

gkadmin(1M)

groupadd(1M)

groupdel(1M)

groupmod(1M)

growfs(1M)

grpck(1M)

gsscred(1M)

gssd(1M)

hald(1M)

hal-device(1M)

hal-fdi-validate(1M)

hal-find(1M)

hal-find-by-capability(1M)

hal-find-by-property(1M)

hal-get-property(1M)

hal-set-property(1M)

halt(1M)

hextoalabel(1M)

host(1M)

hostconfig(1M)

hotplug(1M)

hotplugd(1M)

htable(1M)

ickey(1M)

id(1M)

idmap(1M)

idmapd(1M)

idsconfig(1M)

ifconfig(1M)

if_mpadm(1M)

ifparse(1M)

iiadm(1M)

iicpbmp(1M)

iicpshd(1M)

ikeadm(1M)

ikecert(1M)

ilbadm(1M)

ilbd(1M)

imqadmin(1M)

imqbrokerd(1M)

imqcmd(1M)

imqdbmgr(1M)

imqkeytool(1M)

imqobjmgr(1M)

imqusermgr(1M)

in.chargend(1M)

in.comsat(1M)

in.daytimed(1M)

in.dhcpd(1M)

in.discardd(1M)

in.echod(1M)

inetadm(1M)

inetconv(1M)

inetd(1M)

in.fingerd(1M)

infocmp(1M)

in.ftpd(1M)

in.iked(1M)

init(1M)

init.sma(1M)

init.wbem(1M)

inityp2l(1M)

in.lpd(1M)

in.mpathd(1M)

in.named(1M)

in.ndpd(1M)

in.rarpd(1M)

in.rdisc(1M)

in.rexecd(1M)

in.ripngd(1M)

in.rlogind(1M)

in.routed(1M)

in.rshd(1M)

in.rwhod(1M)

install(1M)

installboot(1M)

installer(1M)

installf(1M)

installgrub(1M)

install_scripts(1M)

install-solaris(1M)

in.stdiscover(1M)

in.stlisten(1M)

in.talkd(1M)

in.telnetd(1M)

in.tftpd(1M)

in.timed(1M)

intrd(1M)

intrstat(1M)

in.uucpd(1M)

iostat(1M)

ipaddrsel(1M)

ipadm(1M)

ipf(1M)

ipfs(1M)

ipfstat(1M)

ipmgmtd(1M)

ipmon(1M)

ipmpstat(1M)

ipnat(1M)

ippool(1M)

ipqosconf(1M)

ipsecalgs(1M)

ipsecconf(1M)

ipseckey(1M)

iscsiadm(1M)

isns(1M)

isnsadm(1M)

itadm(1M)

itu(1M)

k5srvutil(1M)

kadb(1M)

kadmin(1M)

kadmind(1M)

kadmin.local(1M)

kcfd(1M)

kclient(1M)

kdb5_ldap_util(1M)

kdb5_util(1M)

kdcmgr(1M)

kernel(1M)

keyserv(1M)

killall(1M)

kmscfg(1M)

kprop(1M)

kpropd(1M)

kproplog(1M)

krb5kdc(1M)

ksslcfg(1M)

kstat(1M)

ktkt_warnd(1M)

labeld(1M)

labelit(1M)

labelit_hsfs(1M)

labelit_udfs(1M)

labelit_ufs(1M)

lastlogin(1M)

latencytop(1M)

ldapaddent(1M)

ldap_cachemgr(1M)

ldapclient(1M)

ldmad(1M)

link(1M)

listdgrp(1M)

listen(1M)

llc2_loop(1M)

lms(1M)

localeadm(1M)

localectr(1M)

locator(1M)

lockd(1M)

lockfs(1M)

lockstat(1M)

lofiadm(1M)

logadm(1M)

logins(1M)

lpadmin(1M)

lpfilter(1M)

lpforms(1M)

lpget(1M)

lpmove(1M)

lpsched(1M)

lpset(1M)

lpshut(1M)

lpsystem(1M)

lpusers(1M)

lu(1M)

luactivate(1M)

lucancel(1M)

lucompare(1M)

lucreate(1M)

lucurr(1M)

ludelete(1M)

ludesc(1M)

lufslist(1M)

lumake(1M)

lumount(1M)

lurename(1M)

lustatus(1M)

luumount(1M)

luupgrade(1M)

luxadm(1M)

m64config(1M)

mail.local(1M)

System Administration Commands - Part 2

System Administration Commands - Part 3

lucreate

- create a new boot environment

Synopsis

/usr/sbin/lucreate [-A BE_description] [-c BE_name] 
     [-C ( boot_device | - )] -n BE_name 
     [-f exclude_list_file] [-I] [-l error_log] 
     [-o outfile] [-s ( - | source_BE_name )] 
     [ [-M slice_list_file [-M]...] 
     [-m mount_point:device [,volume]:fs_options[:zonename] [-m...]]] |
     [-p zfs_root_pool]
     [-x exclude [-x]...] [-X] [-y include [-y]...] 
     [-Y include_list_file] [-z filter_list]

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:

If lucreate is invoked without the -m, -M, or -p options (described below), it brings up an FMLI-based interface that provides curses-based screens for Live Upgrade administration. Note that the FMLI-based interface does not support all of the Live Upgrade features supported by the command-line version of lucreate. Also, Sun is not committed to ongoing development of the FMLI-based interface.

With the -p option, lucreate supports the creation of BEs on ZFS file systems. The source BE can be a UFS root file system on a disk slice or a ZFS file system in an existing ZFS storage pool. lucreate provides a convenient means of migrating a BE from a UFS root file system to a ZFS root file system. You cannot create a BE on a UFS file system from a source BE on a ZFS file system.

The creation of a BE includes selecting the disk or device slices for all the mount points of the BE. Slices can be physical disks or logical devices, such as Solaris Volume Manager volumes. 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 can 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.


Note - Before booting a new BE, you must run luactivate to specify that BE as active. luactivate performs a number of tasks that ensure correct operation of the BE. In some cases, a BE is not bootable until after you have run the command. See luactivate(1M) for a list of the operations performed by that command.


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 (or critical) file systems; other file systems are referred to as shareable. A non-shareable file system listed in the source BE's vfstab is 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.

When migrating from a UFS-based BE to a ZFS-based BE, you cannot migrate shared UFS file systems to ZFS. Also, when the source and destination BEs are both ZFS-based, you cannot copy shared file systems. Such file systems can only be shared.

The lucreate command copies all non-global zones from the current BE to the BE being created. For non-global zones residing in a non-shared file system, the new BE gets a copy of the zone in its non-shared file system. For non-global zones residing in a shared file system, lucreate makes a copy of the zone for the new BE in that shared file system and uses a different zonepath (see zoneadm(1M)) for the zone. The zonepath used is of the form zonepath-newBE. This prevents BEs from sharing the same non-global zone in the shared file system. When the new BE gets booted, the zone in the shared file system belonging to the new BE has its zonepath renamed to zonepath and the zone in the shared file system belonging to the original BE has its zonepath renamed to zonepath-origBE.

If a zone exists in a non-shared file system, the zone is automatically copied when the UFS root file system is migrated to a ZFS root file system. If a zone exists in a shared UFS file system, to migrate to a ZFS root file system, you must first upgrade the zone, as in previous Solaris releases. A zone in a non-shared file system within a ZFS BE is cloned when upgrading to a ZFS BE within the same ZFS pool.

The lucreate command supports a limited subset of Solaris Volume Manager functions. In particular, using lucreate with the -m option, you can:

lucreate does not allow you to attach multiple disk slices or multiple storage devices to a concatenation. Similarly, it does not allow you to detach multiple slices or devices from a concatenation.

If you use Solaris Volume Manager volumes for boot environments, it is recommended that you use lucreate rather than Solaris Volume Manager commands to manipulate these volumes. The Solaris Volume Manager software has no knowledge of boot environments, whereas the lucreate command contains checks that prevent you from inadvertently destroying a boot environment by, for example, overwriting or deleting a Solaris Volume Manager volume.

If you have already used Solaris Volume Manager software to create complex Solaris Volume Manager volumes (for example, RAID-5 volumes), Live Upgrade will support the use of these. However, to create and manipulate these complex objects, you must use Solaris Volume Manager software. As described above, the use of Solaris Volume Manager software, rather than the lucreate command, entails the risk of destroying a boot environment. If you do use Solaris Volume Manager software, use lufslist(1M) to determine which devices are in use for boot environments.

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.

When creating a new BE on a UFS file system, lucreate enables you to exclude and include certain files from the source BE. You perform this inclusion or exclusion with the -f, -x, -y, -Y, and -z options, described below. See the subsection on combining these options, following OPTIONS, below.

By default, all swap partitions on a UFS-based source BE are shared with a UFS-based target BE. For UFS-based target BEs, you can use the -m option (see below) to specify an additional or new set of swap partitions on the source BE for sharing with the target. When a UFS-based source BE is copied to a ZFS target BE, lucreate creates in the new BE a swap area and a dump device on separate ZFS volumes. When both the source and target BEs are ZFS-based and are in the same pool, both BEs use the same swap volume. If source and target are in different pools, a new swap volume is created in the pool of the target BE.

The lucreate command allows you to assign a description to a BE. A description is an optional attribute of a BE that can be of any format or length. It might be, for example, a text string or binary data. After you create a BE, you can change a BE description with the ludesc(1M) utility.

The lucreate command requires root privileges or that you assume the Primary Administrator role.

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; it cannot contain whitespace characters.

Omission of -m, -M, and -p options (described below) in an lucreate command line invokes the FMLI-based interface, which allows you to select disk or device slices for a UFS-based BE.

-A BE_description

Assigns the BE_description to a BE. BE_description can be a text string or other characters that can be entered on a Unix command line. See ludesc(1M) for additional information on BE descriptions.

-c BE_name

Assigns the name BE_name to the current BE. This option is not required and can be used only when the first BE is created. For the first time you run lucreate, for a UFS-based BE, if you omit -c, lucreate supplies a default name according to the following rules:

  1. If the physical boot device can be determined, the base name of that device is used to name the new boot environment. For example, if the physical boot device is /dev/dsk/c0t0d0s0, lucreate names the new boot environment c0t0d0s0.

  2. If the physical boot device cannot be determined, the operating system name (from uname -s) and operating system release level (from uname -r) are combined to produce the name of the new boot environment. For example, if uname -s returns SunOS and uname -r returns 5.9, then lucreate assigns the name SunOS5.9 to the new boot environment.

  3. If lucreate can determine neither boot device nor operating system name, it assigns the name current to the new boot environment.

For a ZFS-based BE, the default BE name is the base name of the root file system.

If you use the -c option after the first boot environment is created, the option is ignored if the name specified is the same as the current boot environment name. If the name is different, lucreate displays an error message and exits.

-C (boot_device | )

Provided for occasions when lucreate cannot figure out which physical storage device is your boot device. This might occur, for example, when you have a mirrored root device on the source BE on an x86 machine. The -C specifies the physical boot device from which the source BE is booted. Without this option, lucreate attempts to determine the physical device from which a BE boots. If the device on which the root file system is located is not a physical disk (for example, if root is on a Solaris Volume Manager volume) and lucreate is able to make a reasonable guess as to the physical device, you receive the query:

Is the physical device devname the boot device for 
the logical device devname?

If you respond y, the command proceeds.

If you specify -C boot_device, lucreate skips the search for a physical device and uses the device you specify. The (hyphen) with the -C option tells lucreate to proceed with whatever it determines is the boot device. If the command cannot find the device, you are prompted to enter it.

If you omit -C or specify -C boot_device and lucreate cannot find a boot device, you receive an error message.

Use of the -C form is a safe choice, because lucreate either finds the correct boot device or gives you the opportunity to specify that device in response to a subsequent query.

-f exclude_list_file

Use the contents of exclude_list_file to exclude specific files (including directories) from the newly created BE. exclude_list_file contains a list of files and directories, one per line. If a line item is a file, only that file is excluded; if a directory, that directory and all files beneath that directory, including subdirectories, are excluded.

This option is not supported when the source BE is on a ZFS file system.

-I

Ignore integrity check. Prior to creating a new BE, lucreate performs an integrity check, to prevent you from excluding important system files from the BE. Use this option to override this integrity check. The trade-off in use of this option is faster BE creation (with -I) versus the risk of a BE that does not function as you expect.

-l error_log

Error messages and other status messages are sent to error_log, in addition to where they are sent in your current environment.

-m mount_point:device[,volume]:fs_option[:zonename]
[-m mount_point:device:fs_option[:zonename]] ...

Specifies the vfstab(4) information for a new UFS-based BE. The file systems specified as arguments to -m can be on the same disk or can be spread across multiple disks.

The -m option is not supported for BEs based on ZFS file systems. This option also does not support EFI-labeled disks.

mount_point can be any valid mount point or (hyphen), indicating a swap partition. The device field can be one of the following:

  • The name of a disk slice, of the form /dev/dsk/cnumtnumdnumsnum.

  • The name of a Solaris Volume Manager volume, of the form /dev/md/dsk/dnum.

  • The name of a Solaris Volume Manager disk set, of the form /dev/md/setname/dsk/dnum.

  • The name of a Veritas volume, of the form /dev/vx/dsk/dgname/volname.

  • The keyword merged, indicating that the file system at the specified mount point is to be merged with its parent.

  • The keyword shared, indicating that all of the swap partitions in the source BE are to be shared with the new BE.

The -m option enables you to attach a physical disk device to a Solaris Volume Manager single–slice concatenation or attach a Solaris Volume Manager volume to a mirror. Both operations are accomplished with the attach keyword, described below. With this option, you have the choice of specifying a concatentation or mirror or allowing lucreate to select one for you. To specify a concatenation or mirror, append a comma and the name of the Solaris Volume Manager logical device to the device name to which the logical device is being attached. If you omit this specification, lucreate selects a concatenation or mirror from a list of free devices. See EXAMPLES.

The fs_option field can be one or more of the keywords listed below. The first two keywords specify types of file systems. The remaining keywords specify actions to be taken on a file system. When you specify multiple keywords, separate these with a comma.

ufs

Create the file system as a UFS volume.

vxfs

Create the file system as a Veritas device.

preserve

Preserve the file system contents of the specified physical storage device. Use of this keyword presumes that the device's file system and its contents are appropriate for the specified mount point. For a given mount point, you can use preserve with only one device. This keyword enables you to bypass the default steps of creating a new file system on the specified storage device, then copying the file system contents from the source BE to the specified device. When you use preserve, lucreate checks that the storage device's contents is suitable for a specified file system. This check is limited and cannot guarantee suitability.

mirror

Create a mirror on the specified storage device. The specified storage device must be a correctly named (for example, /dev/md/dsk/d10) logical device that can serve as a mirror. In subsequent -m options, you must specify attach (see below) to attach at least one physical device to the new mirror.

attach

Attach a physical storage device, contained by a volume, to the mirror or single-slice concatenation associated with a specified mount point. When using attach, if you want to attach a disk to a specific mirror or concatenation, you append a comma and the name of that logical device to the device name. If you omit the comma and the concatentation name, lucreate selects a free mirror or single-slice concatenation as the container volume for the storage device. See EXAMPLES.

lucreate allows you to create only concatenations that contain a single physical drive and allows you to attach up to four such concatenations to a mirror.

detach

Detach a physical storage device from the mirror or concatenation associated with a specified mount point.

The optional zonename field specifies the name of an installed non-global zone. It is used to specify a separate file system that belongs to the particular zone, named zonename, that exists in the new BE being created.

At minimum, you must specify one disk or device slice, for root. You can do this with -m, -M (described below), or in the FMLI-based interface. You must specify an -m argument for each file system you want to create on a new BE. For example, if you have three file systems on a source BE (say, /, /usr, and /var) and want these three entities as separate file systems on a new BE, you must specify three -m arguments. If you were to specify only one, in our example, /, /usr, and /var would be merged on the new BE into a single file system, under /.

When using the -m option to specify swap partition(s), you can designate device(s) currently used for swap on any BE and any unused devices. Regarding swap assignments, you have the following choices:

  • Omit any specification of swap devices, in which case all swap devices associated with the source BE will be used by the new BE.

  • Specify one or more swap devices, in which case the new BE will use only the specified swap devices and not automatically share the swap devices associated with the source BE.

  • Specify one or more swap devices and use the syntax -m –:shared:swap, in which case the new BE will use the specified swap devices and will share swap devices with the source BE.

See EXAMPLES, below.

-M slice_list

List of -m options, collected in the file slice_list. Specify these arguments in the format specified for -m. Comment lines, beginning with a hash mark (#), are ignored. The -M option is useful where you have a long list of file systems for a BE. Note that you can combine -m and -M options. For example, you can store swap partitions in slice_list and specify / and /usr slices with -m.

The -M option is not supported for BEs based on ZFS file systems.

The -m and -M options support the listing of multiple slices for a given mount point. In processing these slices, lucreate skips any unavailable slices and selects the first available slice. See EXAMPLES.

-n BE_name

The name of the BE to be created. BE_name must be unique on a given system.

-o outfile

All command output is sent to outfile, in addition to where it is sent in your current environment.

-p zfs_root_pool

Specifies the ZFS pool in which a new BE will reside.

This option can be omitted if the source and target BEs are within the same pool.

The -p option does not support the splitting and merging of file systems in a target BE that is supported by the -m option.

-s ( | BE_name)

Source for the creation of the new BE. This option enables you to use a BE other than the current BE as the source for creation of a new BE.

If you specify a hyphen (-) as an argument to -s, lucreate creates the new BE, but does not populate it. This variation of the -s option is intended for the subsequent installation of a flash archive on the unpopulated BE using luupgrade(1M). See flar(1M).

-x exclude

Exclude the file or directory exclude from the newly created BE. If exclude is a directory, lucreate excludes that directory and all files beneath that directory, including subdirectories.

This option is not supported when the source BE is on a ZFS file system.

-X

Enable XML output. Characteristics of XML are defined in DTD, in /usr/share/lib/xml/dtd/lu_cli.dtd.<num>, where <num> is the version number of the DTD file.

-y include

Include the file or directory include in the newly created BE. If include is a directory, lucreate includes that directory and all files beneath that directory, including subdirectories.

This option is not supported when the source BE is on a ZFS file system.

-Y include_list_file

Use the contents of include_list_file to include specific files (including directories) from the newly created BE. include_list_file contains a list of files and directories, one per line. If a line item is a file, only that file is included; if a directory, that directory and all files beneath that directory, including subdirectories, are included.

This option is not supported when the source BE is on a ZFS file system.

-z filter_list_file

filter_list_file contains a list of items, files and directories, one per line. Each item is preceded by either a +, indicating the item is to be included in the new BE, or -, indicating the item is to be excluded from the new BE.

This option is not supported when the source BE is on a ZFS file system.

Combining File Inclusion and Exclusion Options

When a source BE is on a UFS file system, the lucreate command allows you to include or exclude specific files and directories when creating a new BE. You can include files and directories with:

You can exclude files and directories with:

If the parent directory of an excluded item is included with include options (for example, -y include), then only the specific file or directory specified by exclude is excluded. Conversely, if the parent directory of an included file is specified for exclusion, then only the file include is included. For example, if you specify:

-x /a -y /a/b

all of /a except for /a/b is excluded. If you specify:

-y /a -x /a/b

all of /a except for /a/b is included.

Examples

The 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 Time

The following command sequence creates a new boot environment on a machine on which a BE has never been created. All non-shareable (critical) file systems are mounted under /.

# lucreate -c first_disk -m /:/dev/dsk/c0t4d0s0:ufs -n second_disk
many lines of output
lucreate: Creation of Boot Environment <second_disk> successful.

The following command, like the preceding, creates a new boot environment on a machine on which a BE has never been created. However, the following command differs in two respects: the -c option is omitted and the /usr file system is mounted on its own disk slice, separate from /.

# lucreate -m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s1:ufs \
-n second_disk
lucreate: Please wait while your system configuration is determined.
many lines of output
lucreate: Creation of Boot Environment c0t4d0s0 successful.

In the absence of the -c option, lucreate assigns the name c0t4d0s0, the base name of the root device, to the new boot environment.

The same command is entered, with the addition of -c:

# lucreate -c first_disk -m /:/dev/dsk/c0t4d0s0:ufs \
-m /usr:/dev/dsk/c0t4d0s1:ufs -n second_disk
many lines of output
lucreate: Creation of Boot Environment <second_disk> successful.

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.

# luupgrade -u -n second_disk \
-s /net/installmachine/export/solarisX/OS_image
many lines of output
luupgrade: Upgrade of Boot Environment <second_disk> successful.

# luactivate 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 BE

The following command uses the -s option to specify a source BE other than the current BE.

# lucreate -s third_disk -m /:/dev/dsk/c0t4d0s0:ufs \
-m /usr:/dev/dsk/c0t4d0s1:ufs -n second_disk 
many lines of output
lucreate: Creation of Boot Environment <second_disk> successful.

Example 3 Migrating a BE from a UFS Root File System to a ZFS Root File System

The following command creates a BE of a ZFS root file system from a UFS root file system. The current BE, c1t0d0s0, containing a UFS root file system, is identified by the -c option. The new BE, zfsBE, is identified by the -n option. A ZFS storage pool must exist before the lucreate operation and must be created with slices rather than whole disks to be upgradeable and bootable.

# zpool create rpool mirror c1t0d0s0 c2t0d0s0
# lucreate -c c1t0d0s0 -n zfsBE -p rpool

Note that if the current BE also resides on the ZFS pool rpool, the -p option could be omitted. For example:

# lucreate -n zfsBE

Example 4 Creating a BE from a Flash Archive

Performing this task involves use of lucreate with the -s option and luupgrade.

# lucreate -s - -m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s1:ufs \
-n second_disk 
brief messages
lucreate: Creation of Boot Environment <second_disk> successful.

With the -s option, the lucreate command completes it work within seconds. At this point, you can use luupgrade to install the flash archive:

# luupgrade -f -n second_disk \
-s /net/installmachine/export/solarisX/OS_image \
-J "archive_location http://example.com/myflash.flar"

See luupgrade(1M) for a description of that command.

Example 5 Sharing and Adding Swap Partitions

In the simplest case, if you do not specify any swap partitions in an lucreate command, all swap partitions in the source BE are shared with the new BE. For example, assume that the current BE uses /dev/dsk/c0t4d0s7 as its swap partition. You enter the command:

# lucreate -n second_disk -m /:/dev/dsk/c0t4d0s0:ufs
many lines of output
lucreate: Creation of Boot Environment <second_disk> successful.

Upon conclusion of the preceding command, the partition /dev/dsk/c0t4d0s7 will be used by the BE second_disk when that BE is activated and booted.

If you want a new BE to use a different swap partition from that used by the source BE, enter one or more -m options to specify a new partition or new partitions. Assume, once again, that the current BE uses /dev/dsk/c0t4d0s7 as its swap partition. You enter the command:

# lucreate -m /:/dev/dsk/c0t0d0s0:ufs -m -:/dev/dsk/c0t4d0s1:swap \
 -m -:/dev/dsk/c0t4d0s2:swap -n second_disk 
many lines of output
lucreate: Creation of Boot Environment <second_disk> successful.

Upon activation and boot, the new BE second_disk will use /dev/dsk/c0t4d0s1 and /dev/dsk/c0t4d0s2 and will not use /dev/dsk/c0t4d0s7, the swap partition used by the source BE.

Assume you want the new BE second_disk to share the source BE's swap partition and have an additional swap partition. You enter:

# lucreate -m /:/dev/dsk/c0t0d0s0:ufs -m -:/dev/dsk/c0t4d0s1:swap \
 -m -:shared:swap -n second_disk 
many lines of output
lucreate: Creation of Boot Environment <second_disk> successful.

Upon activation and boot, the new BE second_disk will use for swapping /dev/dsk/c0t4d0s7, shared with the source BE, and, in addition, /dev/dsk/c0t4d0s1.

Example 6 Using Swap Partitions on Multiple Disks

The command below creates a BE on a second disk and specifies swap partitions on both the first and second disks.

# lucreate -m /:/dev/dsk/c0t4d0s0:ufs -m -:/dev/dsk/c0t4d0s1:swap \
 -m -:/dev/dsk/c0t0d0s1:swap -n second_disk 
many lines of output
lucreate: Creation of Boot Environment <second_disk> successful.

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 7 Using a Combination of -m and -M Options

In 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:

-:/dev/dsk/c0t3d0s2:swap
-:/dev/dsk/c0t3d0s2:swap
-:/dev/dsk/c0t4d0s2:swap
-:/dev/dsk/c0t5d0s2:swap
-:/dev/dsk/c1t3d0s2:swap
-:/dev/dsk/c1t4d0s2:swap
-:/dev/dsk/c1t5d0s2:swap

This file is specified in the following command:

# lucreate -m /:/dev/dsk/c02t4d0s0:ufs -m /usr:/dev/dsk/c02t4d0s1:ufs \
-M /etc/lu/swapslices -n second_disk 
many lines of output
lucreate: Creation of Boot Environment <second_disk> successful.

The BE second_disk will swap onto the partitions specified in /etc/lu/swapslices.

Example 8 Copying Versus Sharing

The 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:

# lucreate -m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s1:ufs \
-m /home:/dev/dsk/c0t4d0s4:ufs -n second_disk

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.

# lucreate -m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s1:ufs \
-n second_disk

Example 9 Using Solaris Volume Manager Volumes

The command shown below does the following:

  1. Creates the mirror d10 and establishes this mirror as the receptacle for the root file system.

  2. Attaches c0t0d0s0 and c0t1d0s0 to single-slice concatenations d1 and d2, respectively. Note that the specification of these volumes is optional.

  3. Attaches the concatenations associated with c0t0d0s0 and c0t1d0s0 to mirror d10.

  4. Copies the current BE's root file system to mirror d10, overwriting any d10 contents.

# lucreate -m /:/dev/md/dsk/d10:ufs,mirror \
-m /:/dev/md/dsk/d1:attach \
-m /:/dev/dsk/c0t1d0s0,d2:attach -n newBE

The following command differs from the preceding only in that concatenations for the physical storage devices are not specified. In this example, lucreate chooses concatenation names from a list of free names and attaches these volumes to the mirror specified in the first -m option.

# lucreate -m /:/dev/md/dsk/d10:ufs,mirror \
-m /:/dev/dsk/c0t0d0s0:attach \
-m /:/dev/dsk/c0t1d0s0:attach -n newBE

The following command differs from the preceding commands in that one of the physical disks is detached from a mirror before being attached to the mirror you create. Also, the contents of one of the physical disks is preserved. The command does the following:

  1. Creates the mirror d10 and establishes this mirror as the receptacle for the root file system.

  2. Detaches c0t0d0s0 from the mirror to which it is currently attached.

  3. Attaches c0t0d0s0 and c0t1d0s0 to concatenations d1 and d2, respectively. Note that the specification of the these concatenations is optional.

  4. Preserves the contents of c0t0d0s0, which presumes that c0t0d0s0 contains a valid copy of the current BE's root file system.

  5. Attaches the concatenations associated with c0t0d0s0 and c0t1d0s0 (d1 and d2) to mirror d10.

# lucreate -m /:/dev/md/dsk/d10:ufs,mirror \
-m /:/dev/dsk/c0t0d0s0,d1:detach,attach,preserve \
-m /:/dev/dsk/c0t1d0s0,d2:attach -n newBE

The following command is a follow-on to the first command in this set of examples. This command detaches a concatenation (containing c0t0d0s0) from one mirror (d10, in the first command) and attaches it to another (d20), preserving its contents.

# lucreate -m /:/dev/md/dsk/d20:ufs,mirror \
-m /:/dev/dsk/c0t0d0s0:detach,attach,preserve -n nextBE

The following command creates two mirrors, placing the / file system of the new BE on one mirror and the /opt file system on the other.

# lucreate -m /:/dev/md/dsk/d10:ufs,mirror \
-m /:/dev/dsk/c0t0d0s0,d1:attach \
-m /:/dev/dsk/c1t0d0s0,d2:attach \
-m /opt:/dev/md/dsk/d11:ufs,mirror \
-m /opt:/dev/dsk/c2t0d0s1,d3:attach \
-m /opt:/dev/dsk/c3t1d0s1,d4:attach -n anotherBE

Example 10 Invoking FMLI-based Interface

This example is included for historical purposes as the lu interface is now obsolete.

The command below, by omitting -m or -M options, invokes lu, the FMLI-based interface for Live Upgrade operations.

# lucreate -n second_disk

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:

# lucreate -n second_disk -s third_disk

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 11 Merging File Systems

The 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:

/:/dev/dsk/c0t4d0s0:ufs
/usr:/dev/dsk/c0t4d0s1:ufs
/usr/opt:/dev/dsk/c0t4d0s3:ufs

The following command creates a BE second_disk and performs the merge operation, merging /usr/opt with its parent, /usr.

# lucreate -m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s1:ufs \
-m /usr/opt:merged:ufs -n second_disk

Example 12 Splitting a File System

Assume 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.

# lucreate -m /:/dev/dsk/c0t4d0s0:ufs -m /usr:/dev/dsk/c0t4d0s1:ufs \
/var:/dev/dsk/c0t4d0s3:ufs -n second_disk

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 13 Specifying Alternative Slices

The following command uses multiple -m options as alternative disk slices for the new BE second_disk.

# lucreate -m /:/dev/dsk/c0t4d0s0:ufs -m /:/dev/dsk/c0t4d0s1:ufs \
-m /:/dev/dsk/c0t4d0s5:ufs -n second_disk 
many lines of output
lucreate: Creation of Boot Environment <second_disk> successful.

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.

Example 14 Specifying Separate File Systems for Non-Global Zones

The following command specifies a separate file system belonging to the zone, zone1, within the new BE, second_disk.

# lucreate -n second_disk -m /:/dev/dsk/c0d0s3:ufs \
-m /export/home:/dev/dsk/c0d0s5:ufs:zone1

The zone named zone1, inside the new BE, has a separate disk slice allocated for its /export/home file system.

Exit Status

The following exit values are returned:

0

Successful completion.

>0

An error occurred.

Files

/etc/lutab

list of BEs on the system

/usr/share/lib/xml/dtd/lu_cli.dtd.<num>

Live Upgrade DTD (see -X option)

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
SUNWlu

See Also

luactivate(1M), lucancel(1M), lucompare(1M), lucurr(1M), ludelete(1M), ludesc(1M), lufslist(1M), lumake(1M), lumount(1M), lurename(1M), lustatus(1M), luupgrade(1M), zfs(1M), zpool(1M), zoneadm(1M), lutab(4), attributes(5), live_upgrade(5), zones(5)

Notes

As is true for any Solaris operating system upgrade (and not a feature of Live Upgrade), when 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. If lucreate encounters a hard link across file systems, the command issues a warning message and creates a symbolic link 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 /. The resulting BE would be unbootable. When creating file systems for a boot environment, the rules are identical to the rules for creating file systems for the Solaris operating environment.

Mindful of the principle described in the preceding paragraph, consider the following:


Note - As stated in the description of the -m option, if you use Solaris Volume Manager volumes for boot environments, use lucreate rather than Solaris Volume Manager commands to manipulate these volumes. The Solaris Volume Manager software has no knowledge of boot environments; the lucreate command contains checks that prevent you from inadvertently destroying a boot environment by, for example, overwriting or deleting a Solaris Volume Manager volume.


For versions of the Solaris operating system prior to Solaris 10, Live Upgrade supports the release it is distributed on and up to three marketing releases back. For example, if you obtained Live Upgrade with Solaris 9 (including a Solaris 9 upgrade), that version of Live Upgrade supports Solaris versions 2.6, Solaris 7, and Solaris 8, in addition to Solaris 9. No version of Live Upgrade supports a Solaris version prior to Solaris 2.6.

Starting with version 10 of the Solaris operating system, Live Upgrade supports the release it is distributed on and up to two marketing releases back. For example, if you obtained Live Upgrade with Solaris 10 (including a Solaris 10 upgrade), that version of Live Upgrade supports Solaris 8 and Solaris 9, in addition to Solaris 10. For instructions on adding Live Upgrade packages for the release you want to install, see Solaris 10 5/08 Installation Guide: Solaris Live Upgrade and Upgrade Planning.

Correct operation of Solaris Live Upgrade requires that a limited set of patch revisions be installed for a given OS version. Before installing or running Live Upgrade, you are required to install the limited set of patch revisions. Make sure you have the most recently updated patch list by consulting http://sunsolve.sun.com. Search for the infodoc 72099 on the SunSolve web site.