remove support for 'trademark files'
[unleashed/tickless.git] / share / man / man1m / beadm.1m
blobb62e31331c4faaa366d293aff1e84998ab94fa00
1 '\" te
2 .\" Copyright 2013 Nexenta Systems, Inc. All rights reserved.
3 .\" Copyright 2016 Toomas Soome <tsoome@me.com>
4 .TH BEADM 1M "Feb 21, 2016"
5 .SH NAME
6 beadm \- utility for managing zfs boot environments
7 .SH SYNOPSIS
8 .LP
9 .nf
10 \fBbeadm\fR \fBcreate\fR [\fB-a\fR] [\fB-d\fR \fIdescription\fR]
11      [\fB-e\fR \fInon-activeBeName\fR | \fIbeName@snapshot\fR]
12      [\fB-o\fR \fIproperty=value\fR] ... [\fB-p\fR \fIzpool\fR]
13      [\fB-v\fR] \fIbeName\fR
14 .fi
16 .LP
17 .nf
18 \fBbeadm\fR \fBcreate\fR [\fB-v\fR] \fIbeName@snapshot\fR
19 .fi
21 .LP
22 .nf
23 \fBbeadm\fR \fBdestroy\fR [\fB-fFsv\fR] \fIbeName\fR | \fIbeName@snapshot\fR
24 .fi
26 .LP
27 .nf
28 \fBbeadm\fR \fBlist\fR [\fB-a\fR | \fB-ds\fR] [\fB-H\fR]
29     [\fB-k\fR|\fB-K\fR \fBdate\fR | \fBname\fR | \fBspace\fR] [\fB-v\fR] [\fIbeName\fR]
30 .fi
32 .LP
33 .nf
34 \fBbeadm\fR \fBmount\fR [\fB-s\fR \fBro\fR|\fBrw\fR] [\fB-v\fR] \fIbeName\fR \fImountpoint\fR
35 .fi
37 .LP
38 .nf
39 \fBbeadm\fR \fBunmount\fR [\fB-fv\fR] \fIbeName\fR | \fImountpoint\fR
40 .fi
42 .LP
43 .nf
44 \fBbeadm\fR \fBrename\fR [\fB-v\fR] \fIbeName\fR \fInewBeName\fR
45 .fi
47 .LP
48 .nf
49 \fBbeadm\fR \fBactivate\fR [\fB-v\fR] \fIbeName\fR
50 .fi
52 .LP
53 .nf
54 \fBbeadm\fR \fBrollback\fR [\fB-v\fR] \fIbeName\fR \fIsnapshot\fR
55 .fi
57 .LP
58 .nf
59 \fBbeadm\fR \fBrollback\fR [\fB-v\fR] \fIbeName@snapshot\fR
60 .fi
62 .SH DESCRIPTION
63 The \fBbeadm\fR command is the user interface for managing zfs Boot
64 Environments (BEs). This utility is intended to be used by System
65 Administrators who want to manage multiple Solaris Instances on a single
66 system.
67 .sp
68 The \fBbeadm\fR command supports the following operations:
69 .RS +4
70 .TP
71 .ie t \(bu
72 .el -
73 Create a new BE, based on the active BE.
74 .RE
75 .RS +4
76 .TP
77 .ie t \(bu
78 .el -
79 Create a new BE, based on an inactive BE.
80 .RE
81 .RS +4
82 .TP
83 .ie t \(bu
84 .el -
85 Create a snapshot of an existing BE.
86 .RE
87 .RS +4
88 .TP
89 .ie t \(bu
90 .el -
91 Create a new BE, based on an existing snapshot.
92 .RE
93 .RS +4
94 .TP
95 .ie t \(bu
96 .el -
97 Create a new BE, and copy it to a different zpool.
98 .RE
99 .RS +4
101 .ie t \(bu
102 .el -
103 Activate an existing, inactive BE.
105 .RS +4
107 .ie t \(bu
108 .el -
109 Mount a BE.
111 .RS +4
113 .ie t \(bu
114 .el -
115 Unmount a BE.
117 .RS +4
119 .ie t \(bu
120 .el -
121 Destroy a BE.
123 .RS +4
125 .ie t \(bu
126 .el -
127 Destroy a snapshot of a BE.
129 .RS +4
131 .ie t \(bu
132 .el -
133 Rename an existing, inactive BE.
135 .RS +4
137 .ie t \(bu
138 .el -
139 Roll back a BE to an existing snapshot of a BE.
141 .RS +4
143 .ie t \(bu
144 .el -
145 Display information about your snapshots and datasets.
148 .SH SUBCOMMANDS
149 The \fBbeadm\fR command has the subcommands and options listed
150 below. Also see
151 EXAMPLES below.
153 .ne 2
155 \fBbeadm\fR
157 .sp .6
158 .RS 4n
159 Displays command usage.
163 .ne 2
165 \fBbeadm\fR \fBcreate\fR [\fB-a\fR] [\fB-d\fR \fIdescription\fR]
166      [\fB-e\fR \fInon-activeBeName\fR | \fIbeName@snapshot\fR]
167      [\fB-o\fR \fIproperty=value\fR] ... [\fB-p\fR \fIzpool\fR]
168      [\fB-v\fR] \fIbeName\fR
171 .sp .6
172 .RS 4n
173 Creates a new boot environment named \fIbeName\fR.  If the \fB-e\fR option is
175 provided, the new boot environment will be created as a clone of the
176 currently
177 running boot environment. If the \fB-d\fR option is provided then the
178 description is
179 also used as the title for the BE's entry in the boot menu. If the \fB-d\fR
180 option is not provided, \fIbeName\fR will be used as the title.
182 .ne 2
184 \fB-a\fR
186 .sp .6
187 .RS 4n
188 Activate the newly created BE upon creation.  The default is to not activate
189 the newly created BE.
192 .ne 2
194 \fB-d\fR \fIdescription\fR
196 .sp .6
197 .RS 4n
198 Create a new BE with a description associated with it.
201 .ne 2
203 \fB-e\fR \fInon-activeBeName\fR
205 .sp .6
206 .RS 4n
207 Create a new BE from an existing inactive BE.
210 .ne 2
212 \fB-e\fR \fIbeName@snapshot\fR
214 .sp .6
215 .RS 4n
216 Create a new BE from an existing snapshot of the BE named beName.
219 .ne 2
221 \fB-o\fR \fIproperty=value\fR
223 .sp .6
224 .RS 4n
225 Create the datasets for new BE with specific ZFS properties.  Multiple
226 \fB-o\fR
227 options can be specified.  See \fBzfs\fR(1M) for more information on
229 \fB-o\fR option.
232 .ne 2
234 \fB-p\fR \fIzpool\fR
236 .sp .6
237 .RS 4n
238 Create the new BE in the specified zpool.  If this is not provided, the
239 default
240 behavior is to create the new BE in the same pool as as the origin BE.
241 This option is not supported in non-global zone.
244 .ne 2
246 \fB-v\fR
248 .sp .6
249 .RS 4n
250 Verbose mode. Displays verbose error messages from \fBbeadm\fR.
255 .ne 2
257 \fBbeadm\fR \fBcreate\fR [\fB-v\fR] \fIbeName@snapshot\fR
259 .sp .6
260 .RS 4n
261 Creates a snapshot of the existing BE named beName.
263 .ne 2
265 \fB-v\fR
267 .sp .6
268 .RS 4n
269 Verbose mode. Displays verbose error messages from \fBbeadm\fR.
274 .ne 2
276 \fBbeadm\fR \fBdestroy\fR [\fB-fFsv\fR] \fIbeName\fR | \fIbeName@snapshot\fR
278 .sp .6
279 .RS 4n
280 Destroys the boot environment named \fIbeName\fR or destroys an existing
281 snapshot of
282 the boot environment named \fIbeName@snapshot\fR.  Destroying a
283 boot environment
284 will also destroy all snapshots of that boot environment.  Use
285 this command
286 with caution.
288 .ne 2
290 \fB-f\fR
292 .sp .6
293 .RS 4n
294 Forcefully unmount the boot environment if it is currently mounted.
297 .ne 2
299 \fB-F\fR
301 .sp .6
302 .RS 4n
303 Force the action without prompting to verify the destruction of the boot
304 environment.
307 .ne 2
309 \fB-s\fR
311 .sp .6
312 .RS 4n
313 Destroy all snapshots of the boot
314 environment.
317 .ne 2
319 \fB-v\fR
321 .sp .6
322 .RS 4n
323 Verbose mode. Displays verbose error messages from \fBbeadm\fR.
328 .ne 2
330 \fBbeadm\fR \fBlist\fR [\fB-a\fR | \fB-ds\fR] [\fB-H\fR]
331     [\fB-k\fR|\fB-K\fR \fBdate\fR | \fBname\fR | \fBspace\fR] [\fB-v\fR] [\fIbeName\fR]
333 .sp .6
334 .RS 4n
335 Lists information about the existing boot environment named \fIbeName\fR, or
336 lists
337 information for all boot environments if \fIbeName\fR is not provided.
338 The 'Active'
339 field indicates whether the boot environment is active now,
340 represented
341 by 'N'; active on reboot, represented by 'R'; or both, represented
342 by 'NR'. In non-global zone the 'Active' field also indicates whether the
343 boot environment has a non-active parent BE, represented by 'x'; is active
344 on boot in a non-active parent BE, represented by 'b'. Activate, rollback
345 and snapshot operations for boot environments from non-active global parent
346 BE aren't supported, destroy is allowed if these boot environments aren't
347 active on boot.
349 Each line in the machine parsable output has the boot environment name as the
350 first field.  The 'Space' field is displayed in bytes and the 'Created' field
351 is displayed in UTC format.  The \fB-H\fR option used with no other options
352 gives
353 the boot environment's uuid in the second field.  This field will be
354 blank if
355 the boot environment does not have a uuid. See the EXAMPLES section.
356 In non-global zones, this field shows the uuid of the parent BE.
358 .ne 2
360 \fB-a\fR
362 .sp .6
363 .RS 4n
364 Lists all available information about the boot environment.  This includes
365 subordinate file systems and snapshots.
368 .ne 2
370 \fB-d\fR
372 .sp .6
373 .RS 4n
374 Lists information about all subordinate file systems belonging to the boot
375 environment.
378 .ne 2
380 \fB-s\fR
382 .sp .6
383 .RS 4n
384 Lists information about the snapshots of the boot environment.
387 .ne 2
389 \fB-H\fR
391 .sp .6
392 .RS 4n
393 Do not list header information.  Each field in the list information is
394 separated by a semicolon.
397 .ne 2
399 \fB-k\fR \fBdate\fR
401 .sp .6
402 .RS 4n
403 Sort BEs by date of creation in ascending order. This is default.
406 .ne 2
408 \fB-k\fR \fBname\fR
410 .sp .6
411 .RS 4n
412 Lexical sort of BEs by name in ascending order.
415 .ne 2
417 \fB-k\fR \fBspace\fR
419 .sp .6
420 .RS 4n
421 Sort BEs by space in ascending order.
424 .ne 2
426 \fB-K date\fR | \fBname\fR | \fBspace\fR
428 .sp .6
429 .RS 4n
430 Same as the \fB-k\fR option, but sorts in descending order.
433 .ne 2
435 \fB-v\fR
437 .sp .6
438 .RS 4n
439 Verbose mode. Displays verbose error messages from \fBbeadm\fR.
444 .ne 2
446 \fBbeadm\fR \fBmount\fR [\fB-s\fR \fBro\fR|\fBrw\fR] [\fB-v\fR] \fIbeName\fR \fImountpoint\fR
448 .sp .6
449 .RS 4n
450 Mounts a boot environment named beName at mountpoint.  mountpoint must be an
451 already existing empty directory.
453 .ne 2
455 \fB-s\fR \fBro\fR|\fBrw\fR
457 .sp .6
458 .RS 4n
459 Mount the shared filesystems of the BE in read-only or read-write mode.
462 .ne 2
464 \fB-v\fR
466 .sp .6
467 .RS 4n
468 Verbose mode. Displays verbose error messages from \fBbeadm\fR.
473 .ne 2
475 \fBbeadm\fR \fBunmount\fR [\fB-fv\fR] \fIbeName\fR | \fImountpoint\fR
477 .sp .6
478 .RS 4n
479 Unmounts the boot environment named beName. The command can also be given a path to a
480 beName mount point on the system.
482 .ne 2
484 \fB-f\fR
486 .sp .6
487 .RS 4n
488 Forcefully unmount the boot environment even if its currently busy.
491 .ne 2
493 \fB-v\fR
495 .sp .6
496 .RS 4n
497 Verbose mode. Displays verbose error messages from \fBbeadm\fR.
502 .ne 2
504 \fBbeadm\fR \fBrename\fR [\fB-v\fR] \fIbeName\fR \fInewBeName\fR
506 .sp .6
507 .RS 4n
508 Renames the boot environment named \fIbeName\fR to \fInewBeName\fR.
510 .ne 2
512 \fB-v\fR
514 .sp .6
515 .RS 4n
516 Verbose mode. Displays verbose error messages from \fBbeadm\fR.
521 .ne 2
523 \fBbeadm\fR \fBrollback\fR [\fB-v\fR] \fIbeName\fR \fIsnapshot\fR | \fIbeName@snapshot\fR
525 .sp .6
526 .RS 4n
527 Roll back the boot environment named \fIbeName\fR to existing snapshot
528 of the boot environment named \fIbeName@snapshot\fR.
530 .ne 2
532 \fB-v\fR
534 .sp .6
535 .RS 4n
536 Verbose mode. Displays verbose error messages from \fBbeadm\fR.
541 .ne 2
543 \fBbeadm\fR \fBactivate\fR [\fB-v\fR] \fIbeName\fR
545 .sp .6
546 .RS 4n
547 Makes beName the active BE on next reboot.
549 .ne 2
551 \fB-v\fR
553 .sp .6
554 .RS 4n
555 Verbose mode. Displays verbose error messages from \fBbeadm\fR.
559 .SH ALTERNATE BE LOCATION
561 The alternate BE location outside rpool/ROOT can be configured
562 by modifying the BENAME_STARTS_WITH parameter in /etc/default/be.
563 For example: BENAME_STARTS_WITH=rootfs
565 .SH EXAMPLES
567 \fBExample 1\fR: Create a new BE named BE1, by cloning the current live BE.
569 .in +2
571 \fB# beadm create BE1\fR
573 .in -2
577 \fBExample 2\fR: Create a new BE named BE2, by cloning the existing inactive
579 named BE1.
581 .in +2
583 \fB# beadm create -e BE1 BE2\fR
585 .in -2
589 \fBExample 3\fR: Create a snapshot named now of the existing BE named BE1.
591 .in +2
593 \fB# beadm create BE1@now\fR
595 .in -2
599 \fBExample 4\fR: Create a new BE named BE3, by cloning an existing snapshot of
600 BE1.
602 .in +2
604 \fB# beadm create -e BE1@now BE3\fR
606 .in -2
610 \fBExample 5\fR: Create a new BE named BE4 based on the currently running BE.
611 Create the new BE in rpool2.
613 .in +2
615 \fB# beadm create -p rpool2 BE4\fR
617 .in -2
621 \fBExample 6\fR: Create a new BE named BE5 based on the currently running BE.
622 Create the new BE in rpool2, and create its datasets with compression turned
625 .in +2
627 \fB# beadm create -p rpool2 -o compression=on BE5\fR
629 .in -2
633 \fBExample 7\fR: Create a new BE named BE6 based on the currently running BE
634 and provide a description for it.
636 .in +2
638 \fB# beadm create -d "BE6 used as test environment" BE6\fR
640 .in -2
644 \fBExample 8\fR: Activate an existing, inactive BE named BE3.
646 .in +2
648 \fB# beadm activate BE3\fR
650 .in -2
654 \fBExample 9\fR: Mount the BE named BE3 at /mnt.
656 .in +2
658 \fB# beadm mount BE3 /mnt\fR
660 .in -2
664 \fBExample 10\fR: Unmount the mounted BE named BE3.
666 .in +2
668 \fB# beadm unmount BE3\fR
670 .in -2
674 \fBExample 11\fR: Destroy the BE named BE3 without verification.
676 .in +2
678 \fB# beadm destroy -f BE3\fR
680 .in -2
684 \fBExample 12\fR: Destroy the snapshot named now of BE1.
686 .in +2
688 \fB# beadm destroy BE1@now\fR
690 .in -2
694 \fBExample 13\fR: Rename the existing, inactive BE named BE1 to BE3.
696 .in +2
698 \fB# beadm rename BE1 BE3\fR
700 .in -2
704 \fBExample 14\fR: Roll back the BE named BE1 to snapshot BE1@now.
706 .in +2
708 \fB# beadm rollback BE1 BE1@now\fR
710 .in -2
714 \fBExample 15\fR: List all existing boot environments.
717 .in +2
719 \fB# beadm list\fR
720 BE  Active Mountpoint Space  Policy Created
721 --  ------ ---------- -----  ------ -------
722 BE2 -      -          72.0K  static 2008-05-21 12:26
723 BE3 -      -          332.0K static 2008-08-26 10:28
724 BE4 -      -          15.78M static 2008-09-05 18:20
725 BE5 NR     /          7.25G  static 2008-09-09 16:53
727 .in -2
731 \fBExample 16\fR: List all existing boot environmets and list all dataset and
732 snapshot information about those bootenvironments.
735 .in +2
737 \fB# beadm list -d -s\fR
739 BE/Dataset/Snapshot     Active Mountpoint Space   Policy Created
740 -------------------     ------ ---------- -----   ------ -------
742    p/ROOT/BE2           -      -          36.0K   static 2008-05-21 12:26
743    p/ROOT/BE2/opt       -      -          18.0K   static 2008-05-21 16:26
744    p/ROOT/BE2/opt@now   -      -          0       static 2008-09-08 22:43
745    p/ROOT/BE2@now       -      -          0       static 2008-09-08 22:43
747    p/ROOT/BE3           -      -          192.0K  static 2008-08-26 10:28
748    p/ROOT/BE3/opt       -      -          86.0K   static 2008-08-26 10:28
749    p/ROOT/BE3/opt/local -      -          36.0K   static 2008-08-28 10:58
751    p/ROOT/BE4           -      -          15.78M  static 2008-09-05 18:20
753    p/ROOT/BE5           NR     /          6.10G   static 2008-09-09 16:53
754    p/ROOT/BE5/opt       -      /opt       24.55M  static 2008-09-09 16:53
755    p/ROOT/BE5/opt@bar   -      -          18.38M  static 2008-09-10 00:59
756    p/ROOT/BE5/opt@foo   -      -          18.38M  static 2008-06-10 16:37
757    p/ROOT/BE5@bar       -      -          139.44M static 2008-09-10 00:59
758    p/ROOT/BE5@foo       -      -          912.85M static 2008-06-10 16:37
760 .in -2
763 \fBExample 17\fR: List all dataset and snapshot information about BE5
766 .in +2
768 \fB# beadm list -a BE5\fR
770 BE/Dataset/Snapshot   Active Mountpoint Space   Policy Created
771 -------------------   ------ ---------- -----   ------ -------
773    p/ROOT/BE5         NR     /          6.10G   static 2008-09-09 16:53
774    p/ROOT/BE5/opt     -      /opt       24.55M  static 2008-09-09 16:53
775    p/ROOT/BE5/opt@bar -      -          18.38M  static 2008-09-10 00:59
776    p/ROOT/BE5/opt@foo -      -          18.38M  static 2008-06-10 16:37
777    p/ROOT/BE5@bar     -      -          139.44M static 2008-09-10 00:59
778    p/ROOT/BE5@foo     -      -          912.85M static 2008-06-10 16:37
780 .in -2
784 \fBExample 18\fR: List machine parsable information about all boot
785 environments.
788 .in +2
790 \fB# beadm list -H\fR
792 BE2;;;;55296;static;1211397974
793 BE3;;;;339968;static;1219771706
794 BE4;;;;16541696;static;1220664051
795 BE5;215b8387-4968-627c-d2d0-f4a011414bab;NR;/;7786206208;static;1221004384
797 .in -2
800 .SH EXIT STATUS
802 The following exit values are returned:
804 .ne 2
806 \fB0\fR
808 .sp .6
809 .RS 4n
810 Successful completion
814 .ne 2
816 \fB>0\fR
818 .sp .6
819 .RS 4n
820 Failure
824 .SH FILES
827 .ne 2
829 \fB/var/log/beadm/<beName>/create.log.<yyyymmdd_hhmmss>\fR
831 .sp .6
832 .RS 4n
833 Log used for capturing beadm create output
836 \fIyyyymmdd_hhmmss\fR - 20071130_140558
837 \fIyy\fR - year; 2007
838 \fImm\fR - month; 11
839 \fIdd\fR - day; 30
840 \fIhh\fR - hour; 14
841 \fImm\fR - minute; 05
842 \fIss\fR - second; 58
844 .in -2
850 .ne 2
852 \fB/etc/default/be\fR
854 .sp .6
855 .RS 4n
856 Contains default value for BENAME_STARTS_WITH parameter
860 .SH ATTRIBUTES
862 See \fBattributes\fR(5) for descriptions of the  following  attributes:
867 box;
868 c | c
869 l | l .
870 ATTRIBUTE TYPE  ATTRIBUTE VALUE
872 Interface Stability     Uncommitted
876 .SH SEE ALSO
878 .BR zfs (1M)