xref: /freebsd/sys/contrib/openzfs/man/man8/zpool-export.8 (revision 7877fdebeeb35fad1cbbafce22598b1bdf97c786)
1eda14cbcSMatt Macy.\"
2eda14cbcSMatt Macy.\" CDDL HEADER START
3eda14cbcSMatt Macy.\"
4eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the
5eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License").
6eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License.
7eda14cbcSMatt Macy.\"
8eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing.
10eda14cbcSMatt Macy.\" See the License for the specific language governing permissions
11eda14cbcSMatt Macy.\" and limitations under the License.
12eda14cbcSMatt Macy.\"
13eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each
14eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the
16eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying
17eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner]
18eda14cbcSMatt Macy.\"
19eda14cbcSMatt Macy.\" CDDL HEADER END
20eda14cbcSMatt Macy.\"
21eda14cbcSMatt Macy.\"
22eda14cbcSMatt Macy.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
23eda14cbcSMatt Macy.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
24eda14cbcSMatt Macy.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
25eda14cbcSMatt Macy.\" Copyright (c) 2017 Datto Inc.
26eda14cbcSMatt Macy.\" Copyright (c) 2018 George Melikov. All Rights Reserved.
27eda14cbcSMatt Macy.\" Copyright 2017 Nexenta Systems, Inc.
28eda14cbcSMatt Macy.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
29eda14cbcSMatt Macy.\"
30eda14cbcSMatt Macy.Dd February 16, 2020
31eda14cbcSMatt Macy.Dt ZPOOL-EXPORT 8
32eda14cbcSMatt Macy.Os
33eda14cbcSMatt Macy.Sh NAME
34*7877fdebSMatt Macy.Nm zpool-export
35eda14cbcSMatt Macy.Nd Exports the given ZFS storage pools from the system
36eda14cbcSMatt Macy.Sh SYNOPSIS
37*7877fdebSMatt Macy.Nm zpool
38eda14cbcSMatt Macy.Cm export
39eda14cbcSMatt Macy.Op Fl a
40eda14cbcSMatt Macy.Op Fl f
41eda14cbcSMatt Macy.Ar pool Ns ...
42eda14cbcSMatt Macy.Sh DESCRIPTION
43eda14cbcSMatt Macy.Bl -tag -width Ds
44eda14cbcSMatt Macy.It Xo
45*7877fdebSMatt Macy.Nm zpool
46eda14cbcSMatt Macy.Cm export
47eda14cbcSMatt Macy.Op Fl a
48eda14cbcSMatt Macy.Op Fl f
49eda14cbcSMatt Macy.Ar pool Ns ...
50eda14cbcSMatt Macy.Xc
51eda14cbcSMatt MacyExports the given pools from the system.
52eda14cbcSMatt MacyAll devices are marked as exported, but are still considered in use by other
53eda14cbcSMatt Macysubsystems.
54eda14cbcSMatt MacyThe devices can be moved between systems
55eda14cbcSMatt Macy.Pq even those of different endianness
56eda14cbcSMatt Macyand imported as long as a sufficient number of devices are present.
57eda14cbcSMatt Macy.Pp
58eda14cbcSMatt MacyBefore exporting the pool, all datasets within the pool are unmounted.
59eda14cbcSMatt MacyA pool can not be exported if it has a shared spare that is currently being
60eda14cbcSMatt Macyused.
61eda14cbcSMatt Macy.Pp
62eda14cbcSMatt MacyFor pools to be portable, you must give the
63*7877fdebSMatt Macy.Nm zpool
64eda14cbcSMatt Macycommand whole disks, not just partitions, so that ZFS can label the disks with
65eda14cbcSMatt Macyportable EFI labels.
66eda14cbcSMatt MacyOtherwise, disk drivers on platforms of different endianness will not recognize
67eda14cbcSMatt Macythe disks.
68eda14cbcSMatt Macy.Bl -tag -width Ds
69eda14cbcSMatt Macy.It Fl a
70eda14cbcSMatt MacyExports all pools imported on the system.
71eda14cbcSMatt Macy.It Fl f
72eda14cbcSMatt MacyForcefully unmount all datasets, using the
73eda14cbcSMatt Macy.Nm unmount Fl f
74eda14cbcSMatt Macycommand.
75eda14cbcSMatt MacyThis option is not supported on Linux.
76eda14cbcSMatt Macy.Pp
77eda14cbcSMatt MacyThis command will forcefully export the pool even if it has a shared spare that
78eda14cbcSMatt Macyis currently being used.
79eda14cbcSMatt MacyThis may lead to potential data corruption.
80eda14cbcSMatt Macy.El
81eda14cbcSMatt Macy.El
82eda14cbcSMatt Macy.Sh SEE ALSO
83eda14cbcSMatt Macy.Xr zpool-import 8
84