JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1M: System Administration Commands     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

System Administration Commands - Part 1

6to4relay(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)

aimanifest(1M)

arp(1M)

asradm(1M)

asr-notify(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)

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)

chargefee(1M)

chat(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)

configCCR(1M)

consadm(1m)

console-reset(1M)

coreadm(1M)

cpustat(1M)

croinfo(1M)

cron(1M)

cryptoadm(1M)

datadm(1M)

dcopy(1M)

dcs(1M)

dd(1M)

ddu(1M)

ddu-text(1M)

devchassisd(1M)

devfsadm(1M)

devfsadmd(1M)

device_allocate(1M)

device_remap(1M)

devinfo(1M)

devlinks(1M)

devnm(1M)

devprop(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)

diskinfo(1M)

disks(1M)

diskscan(1M)

dispadmin(1M)

distro_const(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)

emCCR(1M)

emocmrsp(1M)

etrn(1M)

fbconfig(1M)

fbconf_xorg(1M)

fcadm(1M)

fcinfo(1M)

fdetach(1M)

fdisk(1M)

ff(1M)

ff_ufs(1M)

fingerd(1M)

fiocompress(1M)

flowadm(1M)

flowstat(1M)

fmadm(1M)

fmd(1M)

fmdump(1M)

fmstat(1M)

fmthard(1M)

format(1M)

fruadm(1M)

fsck(1M)

fsck_pcfs(1M)

fsck_udfs(1M)

fsck_ufs(1M)

fsdb(1M)

fsdb_udfs(1M)

fsdb_ufs(1M)

fsflush(1M)

fsirand(1M)

fssnap(1M)

fssnap_ufs(1M)

fsstat(1M)

fstyp(1M)

fuser(1M)

fwflash(1M)

fwtmp(1M)

getdevpolicy(1M)

getent(1M)

gettable(1M)

getty(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)

ilomconfig(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.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)

installadm(1M)

installboot(1M)

installf(1M)

installgrub(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)

js2ai(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)

kmem_task(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)

llc2_loop(1M)

lldpadm(1M)

lldpd(1M)

lms(1M)

locator(1M)

lockd(1M)

lockfs(1M)

lockstat(1M)

lofiadm(1M)

logadm(1M)

logins(1M)

lshal(1M)

System Administration Commands - Part 2

System Administration Commands - Part 3

beadm

- manage ZFS boot environments

Synopsis

beadm create [-a] [-d description]
     [-e non-activeBeName | beName@snapshot]
     [-o property=value] ... [-p zpool] beName
beadm create beName@snapshot
beadm destroy [-fF] beName | beName@snapshot
beadm list [-a | -ds] [-H] [beName]
beadm mount beName mountpoint
beadm unmount [-f] beName
beadm rename beName newBeName
beadm activate beName

Description

The beadm command is the user interface for managing ZFS Boot Environments (BEs). This utility is intended to be used by system administrators who want to manage multiple Oracle Solaris instances on a single system.

Using beadm, you can do the following:

Sub-commands

The beadm command has the subcommands and options listed below. Usage of many of these subcommands and options is illustrated in EXAMPLES, below.

beadm (no arguments)

Displays command usage.

beadm create [-a] [-d description] [-e non-activeBeName | beName@snapshot] [-o property=value] ... [-p zpool] beName

Creates a new boot environment named beName. If the -e option is not provided, the new boot environment will be created as a clone of the currently running boot environment. If the -d option is provided, then the description is also used as the title for the BE's entry in the GRUB menu for x86 systems or in the boot menu for SPARC systems. If the -d option is not provided, beName will be used as the title. Nested BEs do not support the use of the -p option. Also, non-bootable, nested BEs and snapshots of non-bootable, nested BEs cannot be used with the -e option.

-a

Activate the newly created BE upon creation. The default is to not activate the newly created BE.

-d description

Create a new BE with a description associated with it.

-e non-activeBeName

Create a new BE from an existing inactive BE. In a nested BE, only bootable BEs can be used with this option.

-e beName@snapshot

Create a new BE from an existing snapshot of the BE named beName. In a nested BE, only snapshots of bootable BEs can be used with this option.

-o property=value

Create the datasets for a new BE with specific ZFS properties. Multiple -o options can be specified. See zfs(1M) for more information on the -o option.

-p zpool

Create the new BE in the specified zpool. If this is not provided, the default behavior is to create the new BE in the same pool as the origin BE. This option is not supported inside of a nested BE.

beadm create beName@snapshot

Creates a snapshot of the existing BE named beName. Inside a nested BE, only bootable BEs can be snapshotted. When inside of a nested BE, only BEs that are bootable or BEs that are not bootable but are not marked as active on reboot can be destroyed.

beadm destroy [-fF] beName | beName@snapshot

Destroys the boot environment named beName or destroys an existing snapshot of the boot environment named beName@snapshot. Destroying a boot environment will also destroy all snapshots of that boot environment. Use this command with caution.

-f

Forcefully unmount the boot environment if it is currently mounted.

-F

Force the action without prompting to verify the destruction of the boot environment.

beadm list [-a | -ds] [-H] [beName]

Lists information about the existing boot environment named beName, or lists information for all boot environments if beName is not provided. The Active field indicates whether the boot environment is active now, represented by N; active on reboot, represented by R; or both, represented by NR. Unbootable BEs inside of a nested BE are represented by an exclamation point (!)

Each line in the machine-parsable output has the boot environment name as the first field. The Space field is displayed in bytes and the Created field is displayed in UTC format. The -H option used with no other options gives the boot environment's UUID in the second field. This field will be blank if the boot environment does not have a UUID. See the EXAMPLES section. Inside of a nested BE, the UUID field actually represents the parent id with which the nested BE is associated.

-a

Lists all available information about the boot environment. This includes subordinate file systems and snapshots.

-d

Lists information about all subordinate file systems belonging to the boot environment.

-s

Lists information about the snapshots of the boot environment.

-H

Do not list header information. Each field in the list information is separated by a semicolon.

beadm mount beName mountpoint

Mounts a boot environment named beName at mountpoint. mountpoint must be an already existing empty directory.

beadm unmount [-f] beName

Unmounts a boot environment named beName.

-f

Forcefully unmount the boot environment even if it is currently busy.

beadm rename beName newBeName

Renames the boot environment named beName to newBeName. In a nested BE, only bootable BEs can be renamed.

beadm activate beName

Makes beName the active BE on next reboot. In a nested BE, only bootable BEs can be activated.

Nested BE Support

beadm supports the concept of a nested BE, specifically, as it pertains to BEs for non-global zones. Currently, beadm can only manage nested BEs from inside of a non-global zone.

beadm functions inside of a non-global zone much the same as it does from the global zone, with a few exceptions. First, the -p (alternate pool) option to beadm create is not supported within a non-global zone. Second, there is a distinction made for any given nested BE (or snapshot of a BE) to determine if it is bootable or not bootable. A nested BE is bootable if it is associated (that is, shares the same parent id as the active global zone BE's UUID) with the currently active global zone BE. It is unbootable—and marked with an '!' in the active column in beadm list)—otherwise. Note that, while the non-global zone administrator could mark such a BE as active by means of beadm activate, rebooting the non-global zone would not result in the BE being loaded, because the BE is associated with a non-active global zone BE. Based on these conditions, beadm restricts some actions on unbootable BEs thusly:

Examples

Example 1 Creating a New BE Using Active BE

The following command creates a new BE, BE1, by cloning the current BE.

# beadm create BE1

Example 2 Creating a New BE Using Inactive BE

The following command creates a new BE, BE2, by cloning the existing inactive BE named BE1.

# beadm create -e BE1 BE2

Example 3 Creating a Snapshot of Existing BE

The following command creates a snapshot named now of the existing BE named BE1.

# beadm create BE1@now

Example 4 Cloning a Snapshot to Create a New BE

The following command creates a new BE named BE3, by cloning an existing snapshot of BE1.

# beadm create -e BE1@now BE3

Example 5 Creating a New BE in Specified zpool

The following command creates a new BE named BE4, based on the currently running BE. The command creates the new BE in the zpool rpool2.

# beadm create -p rpool2 BE4

Example 6 Creating a New BE in Specified zpool with Compression Enabled

The following command creates a new BE named BE5, based on the currently running BE. The command creates the new BE in the zpool rpool2 and creates its datasets with compression turned on.

# beadm create -p rpool2 -o compression=on BE5

Example 7 Creating a New BE and Providing a Description

The following command creates a new BE named BE6, based on the currently running BE, and provides a description for it.

# beadm create -d "BE6 used as test environment" BE6

Example 8 Activating a BE

The following command activates an existing, inactive BE named BE3.

# beadm activate BE3

Example 9 Mounting a BE

The following command mounts the BE named BE3 at /mnt.

# beadm mount BE3 /mnt

Example 10 Unmounting a BE

The following command unmounts the BE named BE3.

# beadm unmount BE3

Example 11 Destroying a BE

The following command destroys the BE named BE3 without asking for confirmation.

# beadm destroy -F BE3

Example 12 Destroying a Snapshot

The following command destroys the snapshot named now of BE1.

# beadm destroy BE1@now

Example 13 Renaming a BE

The following command renames the existing, inactive BE named BE1 to BE3.

# beadm rename BE1 BE3

Example 14 Listing All BEs

The following command lists all existing BEs.

# beadm list
BE  Active Mountpoint Space  Policy Created
--  ------ ---------- -----  ------ -------
BE2 -      -          72.0K  static 2008-05-21 12:26
BE3 -      -          332.0K static 2008-08-26 10:28
BE4 -      -          15.78M static 2008-09-05 18:20
BE5 NR     /          7.25G  static 2008-09-09 16:53

Example 15 Listing All BEs with Dataset and Snapshot Info

The following command lists all existing BEs and list all dataset and snapshot information about those boot environments.

# beadm list -d -s
BE/Dataset/Snapshot     Active Mountpoint Space   Policy Created
-------------------     ------ ---------- -----   ------ -------
BE2
   p/ROOT/BE2           -      -          36.0K   static 2008-05-21 12:26
   p/ROOT/BE2/opt       -      -          18.0K   static 2008-05-21 16:26
   p/ROOT/BE2/opt@now   -      -          0       static 2008-09-08 22:43
   p/ROOT/BE2@now       -      -          0       static 2008-09-08 22:43
BE3
   p/ROOT/BE3           -      -          192.0K  static 2008-08-26 10:28
   p/ROOT/BE3/opt       -      -          86.0K   static 2008-08-26 10:28
   p/ROOT/BE3/opt/local -      -          36.0K   static 2008-08-28 10:58
BE4
   p/ROOT/BE4           -      -          15.78M  static 2008-09-05 18:20
BE5
   p/ROOT/BE5           NR     /          6.10G   static 2008-09-09 16:53
   p/ROOT/BE5/opt       -      /opt       24.55M  static 2008-09-09 16:53
   p/ROOT/BE5/opt@bar   -      -          18.38M  static 2008-09-10 00:59
   p/ROOT/BE5/opt@foo   -      -          18.38M  static 2008-06-10 16:37
   p/ROOT/BE5@bar       -      -          139.44M static 2008-09-10 00:59
   p/ROOT/BE5@foo       -      -          912.85M static 2008-06-10 16:37

Example 16 Listing Dataset and Snapshot Info for a BE

The following command lists all dataset and snapshot information about BE5.

# beadm list -a BE5
BE/Dataset/Snapshot   Active Mountpoint Space   Policy Created
-------------------   ------ ---------- -----   ------ -------
BE5
   p/ROOT/BE5         NR     /          6.10G   static 2008-09-09 16:53
   p/ROOT/BE5/opt     -      /opt       24.55M  static 2008-09-09 16:53
   p/ROOT/BE5/opt@bar -      -          18.38M  static 2008-09-10 00:59
   p/ROOT/BE5/opt@foo -      -          18.38M  static 2008-06-10 16:37
   p/ROOT/BE5@bar     -      -          139.44M static 2008-09-10 00:59
   p/ROOT/BE5@foo     -      -          912.85M static 2008-06-10 16:37

Example 17 Listing in Machine-Parseable Format

The following command lists information about all BEs in machine-parseable format.

# beadm list -H
BE2;;;;55296;static;1211397974
BE3;;;;339968;static;1219771706
BE4;;;;16541696;static;1220664051
BE5;215b8387-4968-627c-d2d0-f4a011414bab;NR;/;7786206208;static;1221004384

Example 18 Displaying Non-bootable BEs

The following command lists all BEs. When run inside of a non-global zone, it displays both bootable and non-bootable BEs. Non-bootable BEs are designated with an exclamation point (!) in the active column.

# beadm list
BE    Active Mountpoint Space   Policy Created
--    ------ ---------- -----   ------ -------
zbe-0 -      -          29.22M  static 2011-03-04 09:14
zbe-1 NR     /          815.10M static 2011-03-04 09:28
zbe-2 -      -          35.0K   static 2011-03-04 09:28
zbe-3 -      -          35.0K   static 2011-03-04 09:28
zbe-4 -      -          35.0K   static 2011-03-04 09:28
zbe-5 !      -          35.0K   static 2011-03-04 11:47
zbe-6 !      -          54.0K   static 2011-03-07 14:37

Exit Status

0

Success.

>0

Failure.

Files

/var/log/beadm/beName/create.log.yyyymmdd_hhmmss

Log used for capturing beadm create output. The time designation portion of the file name is explained as follows.

  • yyyymmdd_hhmmss — for example, 20071130_140558.

  • yyyy — year, 2007

  • mm — month, 11

  • dd — day, 30

  • hh — hour, 14

  • mm — minute, 05

  • ss — second, 58

Attributes

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

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/boot-environment-utilities
Interface Stability
Committed

See Also

zfs(1M), attributes(5)