xref: /freebsd/sys/contrib/openzfs/man/man8/zfs-mount.8 (revision ce4dcb97ca433b2a2f03fbae957dae0ff16f6f51)
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
9271171e0SMartin Matuska.\" or https://opensource.org/licenses/CDDL-1.0.
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.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
22eda14cbcSMatt Macy.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
23eda14cbcSMatt Macy.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
24eda14cbcSMatt Macy.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
25eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
26eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
27eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com]
28eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved.
29eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc.
30eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc.
31eda14cbcSMatt Macy.\"
32eda14cbcSMatt Macy.Dd February 16, 2019
33eda14cbcSMatt Macy.Dt ZFS-MOUNT 8
34eda14cbcSMatt Macy.Os
3516038816SMartin Matuska.
36eda14cbcSMatt Macy.Sh NAME
377877fdebSMatt Macy.Nm zfs-mount
3816038816SMartin Matuska.Nd manage mount state of ZFS filesystems
39eda14cbcSMatt Macy.Sh SYNOPSIS
407877fdebSMatt Macy.Nm zfs
41eda14cbcSMatt Macy.Cm mount
42*ce4dcb97SMartin Matuska.Op Fl j
437877fdebSMatt Macy.Nm zfs
44eda14cbcSMatt Macy.Cm mount
45eda14cbcSMatt Macy.Op Fl Oflv
46eda14cbcSMatt Macy.Op Fl o Ar options
471719886fSMartin Matuska.Fl a Ns | Ns Fl R Ar filesystem Ns | Ns Ar filesystem
487877fdebSMatt Macy.Nm zfs
49eda14cbcSMatt Macy.Cm unmount
50eda14cbcSMatt Macy.Op Fl fu
5116038816SMartin Matuska.Fl a Ns | Ns Ar filesystem Ns | Ns Ar mountpoint
5216038816SMartin Matuska.
53eda14cbcSMatt Macy.Sh DESCRIPTION
54eda14cbcSMatt Macy.Bl -tag -width ""
55eda14cbcSMatt Macy.It Xo
567877fdebSMatt Macy.Nm zfs
57eda14cbcSMatt Macy.Cm mount
58*ce4dcb97SMartin Matuska.Op Fl j
59eda14cbcSMatt Macy.Xc
60eda14cbcSMatt MacyDisplays all ZFS file systems currently mounted.
61*ce4dcb97SMartin Matuska.Bl -tag -width "-j"
62*ce4dcb97SMartin Matuska.It Fl j
63*ce4dcb97SMartin MatuskaDisplays all mounted file systems in JSON format.
64*ce4dcb97SMartin Matuska.El
65eda14cbcSMatt Macy.It Xo
667877fdebSMatt Macy.Nm zfs
67eda14cbcSMatt Macy.Cm mount
68eda14cbcSMatt Macy.Op Fl Oflv
69eda14cbcSMatt Macy.Op Fl o Ar options
701719886fSMartin Matuska.Fl a Ns | Ns Fl R Ar filesystem Ns | Ns Ar filesystem
71eda14cbcSMatt Macy.Xc
72eda14cbcSMatt MacyMount ZFS filesystem on a path described by its
73eda14cbcSMatt Macy.Sy mountpoint
7416038816SMartin Matuskaproperty, if the path exists and is empty.
7516038816SMartin MatuskaIf
76eda14cbcSMatt Macy.Sy mountpoint
77eda14cbcSMatt Macyis set to
78eda14cbcSMatt Macy.Em legacy ,
79eda14cbcSMatt Macythe filesystem should be instead mounted using
80eda14cbcSMatt Macy.Xr mount 8 .
81eda14cbcSMatt Macy.Bl -tag -width "-O"
82eda14cbcSMatt Macy.It Fl O
8316038816SMartin MatuskaPerform an overlay mount.
8416038816SMartin MatuskaAllows mounting in non-empty
85eda14cbcSMatt Macy.Sy mountpoint .
86eda14cbcSMatt MacySee
87eda14cbcSMatt Macy.Xr mount 8
88eda14cbcSMatt Macyfor more information.
89eda14cbcSMatt Macy.It Fl a
90eda14cbcSMatt MacyMount all available ZFS file systems.
91eda14cbcSMatt MacyInvoked automatically as part of the boot process if configured.
921719886fSMartin Matuska.It Fl R
931719886fSMartin MatuskaMount the specified filesystems along with all their children.
94eda14cbcSMatt Macy.It Ar filesystem
95eda14cbcSMatt MacyMount the specified filesystem.
96eda14cbcSMatt Macy.It Fl o Ar options
97eda14cbcSMatt MacyAn optional, comma-separated list of mount options to use temporarily for the
98eda14cbcSMatt Macyduration of the mount.
99eda14cbcSMatt MacySee the
100eda14cbcSMatt Macy.Em Temporary Mount Point Properties
101eda14cbcSMatt Macysection of
1023ff01b23SMartin Matuska.Xr zfsprops 7
103eda14cbcSMatt Macyfor details.
104eda14cbcSMatt Macy.It Fl l
10516038816SMartin MatuskaLoad keys for encrypted filesystems as they are being mounted.
10616038816SMartin MatuskaThis is equivalent to executing
107eda14cbcSMatt Macy.Nm zfs Cm load-key
10816038816SMartin Matuskaon each encryption root before mounting it.
10916038816SMartin MatuskaNote that if a filesystem has
11016038816SMartin Matuska.Sy keylocation Ns = Ns Sy prompt ,
111eda14cbcSMatt Macythis will cause the terminal to interactively block after asking for the key.
112eda14cbcSMatt Macy.It Fl v
113eda14cbcSMatt MacyReport mount progress.
114eda14cbcSMatt Macy.It Fl f
115bb2d13b6SMartin MatuskaAttempt to force mounting of all filesystems, even those that couldn't normally
116bb2d13b6SMartin Matuskabe mounted (e.g. redacted datasets).
117eda14cbcSMatt Macy.El
118eda14cbcSMatt Macy.It Xo
1197877fdebSMatt Macy.Nm zfs
120eda14cbcSMatt Macy.Cm unmount
121eda14cbcSMatt Macy.Op Fl fu
12216038816SMartin Matuska.Fl a Ns | Ns Ar filesystem Ns | Ns Ar mountpoint
123eda14cbcSMatt Macy.Xc
124eda14cbcSMatt MacyUnmounts currently mounted ZFS file systems.
125eda14cbcSMatt Macy.Bl -tag -width "-a"
126eda14cbcSMatt Macy.It Fl a
127eda14cbcSMatt MacyUnmount all available ZFS file systems.
128eda14cbcSMatt MacyInvoked automatically as part of the shutdown process.
129eda14cbcSMatt Macy.It Fl f
130eda14cbcSMatt MacyForcefully unmount the file system, even if it is currently in use.
131eda14cbcSMatt MacyThis option is not supported on Linux.
132eda14cbcSMatt Macy.It Fl u
133eda14cbcSMatt MacyUnload keys for any encryption roots unmounted by this command.
134eda14cbcSMatt Macy.It Ar filesystem Ns | Ns Ar mountpoint
135eda14cbcSMatt MacyUnmount the specified filesystem.
136eda14cbcSMatt MacyThe command can also be given a path to a ZFS file system mount point on the
137eda14cbcSMatt Macysystem.
138eda14cbcSMatt Macy.El
139eda14cbcSMatt Macy.El
140