beadm(8) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

beadm(8)

System Administration Commands                                        beadm(8)



NAME
       beadm - manage ZFS boot environments

SYNOPSIS
       beadm create [-a] [-d description]
            [-e non-activeBeFmri | BeFmri@snapshot]
            [-o property=value] ... BeFmri


       beadm create BeFmri@snapshot


       beadm destroy [-fF] {BeFmri | BeFmriPattern}... | BeFmri@snapshot ...
       beadm destroy [-fF] -O


       beadm list [[[-a | -ds] [-Z]] | [-o attr[,attr]...]...] [-H]
           [{BeFmri| BeFmriPattern}...]


       beadm list -z zonename [-z zonename]...
            [[-a | -ds] | [-o attr[,attr]...]...] [-H]


       beadm mount [-b] BeFmri mountpoint


       beadm unmount [-f] BeFmri


       beadm rename BeFmri newBeFmri


       beadm set-policy {-n [-]policy [-n
       [-]policy2] ...} BeFmri [BeFmri2 .


       beadm activate BeFmri

DESCRIPTION
       The  beadm command is the user interface for managing ZFS Boot Environ‐
       ments (BEs). This utility is intended to be used by system  administra‐
       tors  who  want to manage multiple Oracle Solaris instances on a single
       system. Users identify BEs that are to be managed by using BeFmris. For
       more information on BeFmris, see the fmri(7) man page.


       Using beadm, you can do the following:

           o      Create a new BE, based on the active BE.


           o      Create a new BE, based on an inactive BE.


           o      Create a snapshot of an existing BE.


           o      Create a new BE, based on an existing snapshot.


           o      Activate an existing, inactive BE.


           o      Mount a BE.


           o      Unmount a BE.


           o      Destroy a BE.


           o      Destroy a snapshot of a BE.


           o      Rename an existing, inactive BE.


           o      Set policy attributes on a set of BEs.


           o      Display information about your snapshots, datasets, and non-
                  global zone BEs.


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-activeBeFmri | BeFmri@snap‐
       shot]  [-o property=value] ... BeFmri

           Creates  a  new  boot environment named BeFmri. 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 pro‐
           vided, 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.  Also, non-bootable BEs and snapshots of non-
           bootable BEs cannot be specified by using 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-activeBeFmri

               Create  a  new  BE from an existing inactive BE that resides in
               the same zpool as the new BE. Copying BE across zpools  is  not
               allowed.  In a zone BE, only bootable BEs can be used with this
               option.


           -e beFmri@snapshot

               Create a new BE from an  existing  snapshot  of  the  BE  named
               beFmri.  In  a  zone  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(8) for more
               information on the -o option.



       beadm create BeFmri@snapshot

           Creates a snapshot of the existing BE named BeFmri. Inside  a  zone
           BE, only bootable BEs can be snapshotted.


       beadm destroy [-fF] {BeFmri | BeFmriPattern} ... | BeFmri@snapshot ...

           Destroys  one  or  more  existing boot environments or snapshots of
           existing boot environments that match the provided BeFmri or  BeFm‐
           riPattern.

           The BeFmriPattern allows users to include the ? and * characters as
           glob(3C)-style wildcards in the BE name or zbe-name  field  of  the
           BeFmri  to  match  one  or more BEs. The ? and * characters are not
           allowed in the zpool field and the zonename field of the BeFmri.

           Destroying a boot environment will also destroy  all  snapshots  of
           that boot environment. Use this command with caution.

           When  executing  from  the  global zone and the specified BeFmri or
           BeFmriPattern refers to a non-global zone BE, only non-global  zone
           BEs that are not marked as active on reboot can be destroyed.

           When  executing  inside of a zone BE, only BEs that are bootable or
           BEs that are not bootable but are not marked as  active  on  reboot
           can be destroyed.


           -f

               Forcefully  unmounts  the  boot  environment if it is currently
               mounted.


           -F

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


           -O

               Destroy all orphaned boot environments. This option can only be
               used from inside the Solaris branded zone.




       beadm list [[[-a | -ds] [-Z]] | [-o attr[,attr]...]...] [-H]
       [{BeFmri| BeFmriPattern}...]

           Lists  information  about existing boot environments that match the
           specified BeFmri or BeFmriPattern. If a BeFmri or BeFmriPattern  is
           not  provided,  only  information  for all boot environments in the
           zpool of the currently running BE are listed.  To  display  BEs  in
           zpools not containing the currently running BE, specify the BeFmri‐
           Pattern be://<zpool_name>/*.

           The Flags field indicates whether the boot  environment  is  active
           now, represented by N; active on reboot, represented by R; or both,
           represented by NR. Unbootable global zone BEs are represented by an
           exclamation  point  (!). In such BEs the ZFS pool version that they
           support is lower than the pool version of the boot pool. Unbootable
           BEs  inside  of  a  zone BE are represented by an exclamation point
           (!). In such zones, the ! flag means that boot  environment's  boot
           artifacts are not resident on the boot pool and, therefore, that BE
           is NOT directly bootable. (To transfer a BE's boot artifacts to the
           boot  pool,  either  make the BE activate with the activate subcom‐
           mand, or change the BE's policy to noevict with the set-policy sub‐
           command).  Zone boot environments that have no corresponding global
           zone boot environment are represented by an O, indicating they  are
           orphaned.


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


           -Z

               Lists  all  zone  BEs  associated with the global zone BE. This
               option is valid only while running in the global zone.


           -o attr

               Displays the specified attributes, sorted according to the val‐
               ues  of the first attribute listed. The -o option can be speci‐
               fied multiple times, or multiple attributes can be specified as
               the argument to one -o option by separating the attribute names
               with commas.

               The -o option can be specified alone for displaying  attributes
               in a tabular format. It can also be specified together with the
               -H option for semicolon-delimited parsable output.

               If an attribute has multiple values and the -H  option  is  not
               specified, each value will be displayed in a separate row under
               its own column heading. If a multi-value attribute is specified
               together  with attributes that have a single value, data of the
               single-value attribute will only be displayed once  under  it's
               own column heading.

               If  an  attribute  has  multiple values, and both the -o and -H
               option are specified, multiple values are combined into a  sin‐
               gle string with colon as the delimiter.

               The  attributes  specified must be one of the attributes below.
               Attribute names are case-insensitive.


               created         BE's creation timestamp.


               datasets        Lists all subordinate filesystems belonging  to
                               the  boot  environment. This attribute can con‐
                               tain multiple values.


               flags           Displays the  same  information  as  the  Flags
                               field described above.


               fmri            FMRI of the BE.


               mountpoint      Mountpoint for the BE, if mounted. If the BE is
                               not mounted, this will be blank.


               name            Name of the BE.


               ngz_bes         FMRIs of all  non-global  zone  BEs  associated
                               with  the  global  zone  BE. This field is only
                               applicable for global  zone  BEs.  It  will  be
                               blank  for  non-global zone BEs. This attribute
                               can contain multiple values.


               parent_fmri     FMRI of a non-global zone BE's parent BE.  This
                               field  is  only  applicable for non-global zone
                               BEs. It will be blank for global zone BEs.


               parent_uuid     UUID of a non-global zone BE's parent BE.  This
                               field  is  only  applicable for non-global zone
                               BEs. It will be blank for global zone BEs.


               policy          BE's policy.


               pool_version    The maximum pool version supported by  this  BE
                               if  known.  If unknown, a '-' is displayed. The
                               pool_version property is cleared when a  BE  is
                               mounted  read-write  and  updated  when a BE is
                               unmounted so it is unknown when any non  active
                               BE is mounted read-write.


               root_dataset    ZFS filesystem name of the root dataset for the
                               BE.


               snapshots       Lists all ZFS snapshots belonging to  the  boot
                               environment.  This attribute can contain multi‐
                               ple values.


               space           Total size of the BE.


               uuid            UUID for the BE. This field will be  blank  for
                               non-global zone BEs.


               zpool           Name of the zpool the BE resides on.




           -H

               Request machine parsable output. The output format is a list of
               lines with semicolon-delimited fields. The space field is  dis‐
               played  in bytes and the created field is displayed in UTC for‐
               mat.

               If no option is specified, one line with the  following  fields
               is  displayed  for  each  boot environment. When running in the
               global zone, the uuid field is the uuid of the BE, if  applica‐
               ble. This field will be blank if it does not have a value. When
               running in a non-global zone BE, the uuid field represents  the
               associated parent BE's uuid.


                 be-name;uuid;flags;mountpoint;space;policy;created

               If  the  -a,  -d, or -s option is specified, one or more of the
               following  lines  are  displayed  for  each  boot  environment.
               fs_name is either a ZFS filesystem name or a ZFS snapshot name,
               depending on whether the -d or the -s option is specified.


                 be-name;fs_name;flags;mountpoint;space;policy;created

               If the -Z option is specified, one or more lines with the  fol‐
               lowing  fields  are  displayed for each non-global zone BE. be-
               name is name of the global zone BE  associated  with  the  non-
               global  zone  BE.  All  other fields are attributes of the non-
               global zone BE.


                 be-name;ngz-be-fmri;flags;mountpoint;space;created

               If the -o option is specified, values for specified  attributes
               are displayed as lines with semicolon-delimited fields.




       beadm list -z zonename [-z zonename]...      [[-a | -ds] | [-o
       attr[,attr]...]...] [-H]

           Lists information about all zone BEs in the given zones. This  com‐
           mand  is only valid when executing from the global zone. The speci‐
           fied zonename must be defined in the currently running global  boot
           environment.


           -a

               Lists  all  available information about each zone boot environ‐
               ment. This includes subordinate file systems and snapshots.


           -d

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


           -s

               Lists  information  about the snapshots of each zone boot envi‐
               ronment.


           -o attr

               Lists information about the specified attributes of  each  zone
               boot  environment,  sorted according to the values of the first
               attribute listed. The  -o  option  can  be  specified  multiple
               times,  or multiple attributes can be specified as the argument
               to one -o option by separating the attribute names with commas.
               See above for the list of valid attribute names.


           -H

               Does not list header information. Each field in the list infor‐
               mation is separated by a semicolon.

               If no option is specified, one line with following  fields  are
               displayed for each zone boot environment:


                 zbe_fmri;parent_fmri;flags;mountpoint;space;created

               If  the  -a,  -d, or -s option is specified, one or more of the
               following lines are displayed for each zone boot environment:


                 zbe_fmri;parent_fmri;fs_name;flags;mountpoint;space;created

               If the -o option is specified,  the  specified  attributes  are
               displayed as lines with semicolon-delimited fields.


           -z zonename

               Lists  all zone BEs in the given zone. To list zone BEs in more
               than one zone, specify multiple -z options.




       beadm                mount [-b] BeFmri                mountpoint

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

           If  the -b argument is included on the command-line and if there is
           an active boot pool dataset associated with the specified BE,  that
           boot pool dataset will be mounted under <mountpoint>/bootpool_data.
           This directory will be automatically created when  the  dataset  is
           mounted,  and  automatically  removed when the BE is unmounted with
           the beadm
                                unmount subcommand. Note that  unmounting  the
           BE  through another mechanism will NOT clean up this created direc‐
           tory.


       beadm unmount [-f] BeFmri

           Unmounts a boot environment named BeFmri.

           -f

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



       beadm rename BeFmri newBeFmri

           Renames  the  boot environment named BeFmri to newBeFmri. In a zone
           BE, only bootable BEs can be renamed.


       beadm set-policy {-n [-]policy [-n [-]policy2] ...} BeFmri [BeFmri2 .

           Sets (or unsets) the specified set of policies  for  the  specified
           list of boot environments. Multiple -n arguments are permitted. The
           policy string specified with -n may begin with  a  hyphen.  If  the
           policy begins with a hyphen, that policy is removed from the speci‐
           fied list of boot environments. The current set of supported  poli‐
           cies are:


           static     The associated boot environment in the root pool is man‐
                      aged manually and the companion bootable dataset in  the
                      boot  pool  (if an active boot pool exist) is managed by
                      the system).


           auto       The associated boot environment was created by the  sys‐
                      tem    automatic    update   service   svc:/system/auto-
                      update:default and is subject to  automatic  removal  by
                      the  svc:/system/auto-update:cleanup  instance  based on
                      the config/keep property.

                      To opt an auto-update boot evnironment out of  automatic
                      removal  and  allow it to be preserved and managed manu‐
                      ally set the policy to static.

                      The auto policy cannot be set with beadm, it is only set
                      when  the boot environment is created by the auto update
                      service.


           noevict    Same as the static policy  for  the  boot  environment's
                      root pool dataset, but the companion bootable dataset in
                      the boot pool (if an active boot pool exists) is created
                      (if  it  does  not  already exist) and is never removed,
                      even if the lack of available boot pool  space  prevents
                      another  boot  environment's  companion bootable dataset
                      from being transferred to the boot pool. NOTE  that  the
                      boot pool will not be allowed to exceed 85% of its maxi‐
                      mum capacity to ensure maximum system performance.




       beadm activate BeFmri

           Makes BE specified by BeFmri as the active BE on next reboot. In  a
           zone BE, only bootable BEs can be activated.


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


       From  the  global  zone, all beadm commands and options can be used for
       managing zone BEs. Zone BEs must be specified from the global zone with
       a BE FMRI specifying both the zonename and the zone BE name.


       beadm  functions  inside  of a non-global zone much the same as it does
       from the global zone, with a few exceptions.  There  is  a  distinction
       made  for any given zone BE (or snapshot of a BE) to determine if it is
       bootable or not bootable. A zone 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. A zone BE is considered orphaned if it is
       associated with a global zone boot environment that does not  exist  in
       this  system,  likely due to zone migration. Based on these conditions,
       beadm restricts some actions on unbootable BEs thusly:

           o      You cannot destroy a zone BE that  is  both  unbootable  and
                  marked as active on reboot, unless the unbootable zone BE is
                  also orphaned.


           o      You cannot activate an unbootable BE.


           o      You cannot snapshot an unbootable BE.


           o      You cannot use an unbootable BE or BE snapshot with  the  -e
                  option to beadm create.


           o      You cannot rename an unbootable BE.


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 exist‐
       ing snapshot of BE1.


         # beadm create -e BE1@now BE3



       Example 5 Creating a New zone BE



       The following command creates a new zone BE named  ZBE1  based  on  the
       currently running zone BE for zone1.


         # beadm create zbe://zone1/ZBE1



       Example 6 Creating a New BE with Compression Enabled



       The  following  command  creates  a new BE named BE5, based on the cur‐
       rently running BE. The command creates the new BE's datasets with  com‐
       pression turned on.


         # beadm create -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 cur‐
       rently 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 con‐
       firmation.


         # 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 Name      Flags Mountpoint Space   Policy      Created
         -----------  ----- ---------- ------- ----------- ----------------
         11.4.15.4.0  -     -          1.83G   auto,static 2019-10-02 02:37
         11.4.16.4.0  N     /          211.10M auto,static 2019-11-04 02:21
         11.4.17.4.0  R     -          8.08G   auto,static 2019-12-17 02:40
         app-upgrade  -     -          58.33M  static      2019-11-11 14:38




       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 Name        Flags Mountpoint Space   Policy Created
         -------------- ----- ---------- ------- ------ ----------------
         BE1            -     -          5.27M   static 2015-10-16 10:45


             In-BE Datasets     Mountpoint Space   Created
             ------------------ ---------- ------- ----------------
             rpool/ROOT/BE1     -          5.27M   2015-10-16 10:45
             rpool/ROOT/BE1/var -          392.50K 2015-10-16 10:45


             Snapshots Space Created
             --------- ----- -------


         BE Name        Flags Mountpoint Space   Policy Created
         -------------- ----- ---------- ------- ------ ----------------
         BE2            NR    /          4.37G   static 2015-10-19 07:04


             In-BE Datasets     Mountpoint Space Created
             ------------------ ---------- ----- ----------------
             rpool/ROOT/BE2     /          4.11G 2015-10-19 07:04
             rpool/ROOT/BE2/var /var       1.85G 2015-10-19 07:04


             Snapshots                              Space   Created
             -------------------------------------- ------- ----------------
             rpool/ROOT/BE2@2015-10-16-17:45:07     48.33M  2015-10-16 10:45
             rpool/ROOT/BE2@2015-10-16-16:45:00     47.58M  2015-10-16 09:45
             rpool/ROOT/BE2@2015-10-20-05:59:31     55.82M  2015-10-20 05:59
             rpool/ROOT/BE2@install                 47.80M  2015-10-16 08:37
             rpool/ROOT/BE2@2015-10-19-07:04:08     71.54M  2015-10-19 07:04
             rpool/ROOT/BE2/var@2015-10-16-17:45:07 360.38M 2015-10-16 10:45
             rpool/ROOT/BE2/var@2015-10-16-16:45:00 1.12M   2015-10-16 09:45
             rpool/ROOT/BE2/var@2015-10-20-05:59:31 963.00K 2015-10-20 05:59
             rpool/ROOT/BE2/var@2015-10-19-07:04:08 1.13M   2015-10-19 07:04
             rpool/ROOT/BE2/var@install             1.22M   2015-10-16 08:37


         BE Name        Flags Mountpoint Space   Policy Created
         -------------- ----- ---------- ------- ------ ----------------
         BE3            -     -          2.00K   static 2015-10-20 05:59


             In-BE Datasets     Mountpoint Space Created
             ------------------ ---------- ----- ----------------
             rpool/ROOT/BE3     -          2.00K 2015-10-20 05:59
             rpool/ROOT/BE3/var -          1.00K 2015-10-20 05:59


             Snapshots Space Created
             --------- ----- -------


         BE Name        Flags Mountpoint Space   Policy Created
         -------------- ----- ---------- ------- ------ ----------------
         solaris        -     -          64.61M  static 2015-10-16 08:34


             In-BE Datasets         Mountpoint Space  Created
             ---------------------- ---------- ------ ----------------
             rpool/ROOT/solaris     -          64.61M 2015-10-16 08:34
             rpool/ROOT/solaris/var -          3.27M  2015-10-16 08:34


             Snapshots Space Created
             --------- ----- -------




       Example 16 Listing Dataset and Snapshot Info for a BE



       The following command lists all information about BE2.



         # beadm list -a BE2
         BE Name Flags Mountpoint Space Policy Created
         ------- ----- ---------- ----- ------ ----------------
         BE2     NR    /          4.37G static 2015-10-19 07:04

             Details:
             --------
             Zpool.......... rpool
             UUID........... 34ee56de-24fb-4765-a935-afb71dab2850
             FMRI........... be://rpool/BE2
             Root Dataset... rpool/ROOT/BE2


             In-BE Datasets     Mountpoint Space Created
             ------------------ ---------- ----- ----------------
             rpool/ROOT/BE2     /          4.11G 2015-10-19 07:04
             rpool/ROOT/BE2/var /var       1.85G 2015-10-19 07:04


             Snapshots                              Space   Created
             -------------------------------------- ------- ----------------
             rpool/ROOT/BE2@2015-10-16-17:45:07     48.33M  2015-10-16 10:45
             rpool/ROOT/BE2@2015-10-16-16:45:00     47.58M  2015-10-16 09:45
             rpool/ROOT/BE2@2015-10-20-05:59:31     55.82M  2015-10-20 05:59
             rpool/ROOT/BE2@install                 47.80M  2015-10-16 08:37
             rpool/ROOT/BE2@2015-10-19-07:04:08     71.54M  2015-10-19 07:04
             rpool/ROOT/BE2/var@2015-10-16-17:45:07 360.38M 2015-10-16 10:45
             rpool/ROOT/BE2/var@2015-10-16-16:45:00 1.12M   2015-10-16 09:45
             rpool/ROOT/BE2/var@2015-10-20-05:59:31 963.00K 2015-10-20 05:59
             rpool/ROOT/BE2/var@2015-10-19-07:04:08 1.13M   2015-10-19 07:04
             rpool/ROOT/BE2/var@install             1.22M   2015-10-16 08:37




       Example 17 Listing in Machine-Parseable Format



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



         # beadm list -H
         BE1;73425d63-27d3-47b4-88ef-ee019ca325c2;-;-;5528064;static;1445017508
         BE2;34ee56de-24fb-4765-a935-afb71dab2850;NR;/;4693830144;static;1445263448
         BE3;356b3e5c-dae2-4d84-914c-f7eed84fa0c4;-;-;2048;static;1445345971
         solaris;83d3ee87-62da-4eec-bfa0-b964ff27c01d;-;-;67743744;static;1445009664




       Example 18 Listing in zone BEs Associated with a Specified Global  Zone
       BE



       The  following  command  lists  all zone BEs belonging to the BE2. This
       command is run from the global zone.



         # beadm list -Z BE2
         BE Name Flags Mountpoint Space Policy Created
         ------- ----- ---------- ----- ------ ----------------
         BE2     NR    /          4.37G static 2015-10-19 07:04


             Non-global Zone BE Names  Flags Mountpoint               Space
             ------------------------- ----- ------------------------ -------
             zbe://zone1/solaris       N     /system/zones/zone1/root 1.04M
             zbe://zone1/zbe2          -     -                        2.00K
             zbe://zone1/zbe1          R     -                        17.10M
             zbe://zone2/solaris       NR    /system/zones/zone2/root 803.80M
             zbe://zone4/solaris       NR    /system/zones/zone4/root 803.87M
             zbe://zone3/solaris       NR    /system/zones/zone3/root 803.84M




       Example 19 Listing in zone BEs in a zone



       The following command lists all zone BEs in zone1. This command is  run
       from the global zone.



         # beadm list -z zone1
         Non-global Zone BE Names  Parent BE      Flags Mountpoint               Space
         ------------------------- -------------  ----- ------------------------ -------
         zbe://zone1/BE10          -            RO    -                        705.10M
         zbe://zone1/BE3           be://rpool/BE3 R     -                        803.73M
         zbe://zone1/solaris       be://rpool/BE2 N     /system/zones/zone1/root 1.04M
         zbe://zone1/zbe1          be://rpool/BE2 R     -                        17.10M
         zbe://zone1/zbe2          be://rpool/BE2 -     -                        2.00K




       Example 20 Displaying Non-bootable BEs in zone BE



       This  command is executed in zbe:/zone1/solaris. It lists both bootable
       and non-bootable BEs. Non-bootable BEs are designated with an  exclama‐
       tion  point  (!) in the active column. Orphaned BEs include an O in the
       active column.



         # beadm list
         BE Name Flags Mountpoint Space   Policy Created
         ------- ----- ---------- ------- ------ ----------------
         BE10    !RO   -          705.10M static 2015-10-21 05:00
         BE3     !R    -          803.73M static 2015-10-20 05:59
         solaris N     /          1.04M   static 2015-10-19 14:47
         zbe1    R     -          17.10M  static 2015-10-20 07:25
         zbe2    -     -          2.00K   static 2015-10-20 07:25




       Example 21 Setting policy flags for a set of boot environments



       The following command sets the noevict attribute  for  BEs  named  BE1,
       BE2,  and  BE3  (and transfers boot artifacts from BE1, BE2, and BE3 to
       the boot pool):



         # beadm set-policy -n noevict BE1 BE2 BE3
         # beadm list
         BE  Flags Mountpoint Space  Policy          Created
         --  ----- ---------- -----  ------          -------
         BE1 -     -          6.13M  noevict,static  2014-10-20 09:14
         BE2 NR    /          52.86M noevict,static  2014-10-21 04:33
         BE3 -     -          559.0K noevict,static  2014-10-22 01:59
         BE4 !-    -          313.1M static          2014-10-22 04:19




       The following command clears the noevict attribute (by setting the list
       of attributes to a value that does not include it):



         # beadm set-policy -n -noevict BE2
         # beadm list
         BE  Flags Mountpoint Space  Policy         Created
         --  ----- ---------- -----  ------         -------
         BE1 -     -          6.13M  noevict,static 2014-10-20 09:14
         BE2 NR    /          52.86M static         2014-10-21 04:33
         BE3 -     -          559.0K noevict,static 2014-10-22 01:59
         BE4 !-    -          313.1M static         2014-10-22 04:19



       Example 22 Listing Specified Attributes of all BEs



       The  following  command  lists  the  BE  name,  creation date, and root
       dataset attributes of all BEs.



         # beadm list -o name,created,root_dataset
         BE Name        Created          Root Dataset
         -------------- ---------------- --------------
         BE1            2015-10-16 10:45 rpool/ROOT/BE1
         BE2            2015-10-19 07:04 rpool/ROOT/BE2
         BE3            2015-10-20 05:59 rpool/ROOT/BE3
         solaris        2015-10-16 08:34 rpool/ROOT/solaris




       Example 23 Listing Specified Attributes for a few BEs



       The following command lists the BE name, subordinate  filesystems,  and
       creation date for all BEs that match the BeFmriPattern.



         # beadm list -o name,datasets,created be://rpool/BE*
         BE Name        Datasets           Created
         -------------- ----------------     --------------
         BE1            rpool/ROOT/BE1     2015-10-16 10:45
                      rpool/ROOT/BE1/var
                      rpool/ROOT/BE1/my_fs
         BE2            rpool/ROOT/BE2       2015-10-19 07:04
                     rpool/ROOT/BE2/var
         BE3            rpool/ROOT/BE3       2015-10-20 05:59
                     rpool/ROOT/BE3/var




       Example 24 Listing Specified Attributes



       The  following command lists the BE name, flags, mountpoint, policy and
       creation date for all BEs. These are attributes included in the default
       beadm  list  output. The Space attribute usually included is not speci‐
       fied here. Explicitly not including the Space attribute might be useful
       on  system with a large number of zones, because computing the size for
       each BE on such systems takes longer, which results in the  beadm  list
       command being slower.



         # beadm list -o name,flags,mountpoint,policy,created
         BE Name          Flags Mountpoint Policy Created
         ---------------- ----- ---------- ------ ----------------
         BE1              -     -          static 2016-09-06 10:15
         BE2              -     -          static 2016-09-06 11:38
         BE3              -     -          static 2016-09-14 15:24
         solaris          -     -          static 2010-09-01 12:32



EXIT STATUS
       0            Success.


       >0           Failure.


FILES
       <log_dir>/beadm/beadm.yyyymmdd_hhmmss.<pid>.log

           Log  used  for capturing beadm debugging output. A log file is cre‐
           ated in one of the following 3 locations for each  command  invoca‐
           tion.


               1.     /var/share/beadm:  This  is the preferred location if it
                      is available and the user has write permission  to  this
                      directory.


               2.     /system/volatile/beadm:  This  directory  is used if the
                      /var/share dataset is not mounted yet.


               3.     /tmp/beadm: This directory is used if the user does  not
                      have permission to write to the previous 2 directories.


           The  time designation portion of the file name is explained as fol‐
           lows:


               o      yyyymmdd_hhmmss — for example, 20071130_140558.


               o      yyyy — year, 2007


               o      mm — month, 11


               o      dd — day, 30


               o      hh — hour, 14


               o      mm — minute, 05


               o      ss — second, 58

           If the  command  is  successful,  the  log  file  is  automatically
           removed.  If  the command fails, the error message will include the
           full path to the log file. It is the responsibility of the user  to
           remove the log file.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/boot-environment-utilities _  Inter‐
       face StabilityCommitted


SEE ALSO
       zpool(8), zfs(8), fmri(7), attributes(7)



Oracle Solaris 11.4             18 August 2020                        beadm(8)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3