xref: /freebsd/sys/contrib/openzfs/man/man8/zfs-userspace.8 (revision 3ff01b231dfa83d518854c63e7c9cd1debd1139e)
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.\" 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 June 30, 2019
33eda14cbcSMatt Macy.Dt ZFS-USERSPACE 8
34eda14cbcSMatt Macy.Os
3516038816SMartin Matuska.
36eda14cbcSMatt Macy.Sh NAME
377877fdebSMatt Macy.Nm zfs-userspace
3816038816SMartin Matuska.Nd display space and quotas of ZFS dataset
39eda14cbcSMatt Macy.Sh SYNOPSIS
407877fdebSMatt Macy.Nm zfs
41eda14cbcSMatt Macy.Cm userspace
42eda14cbcSMatt Macy.Op Fl Hinp
4316038816SMartin Matuska.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc
4416038816SMartin Matuska.Oo Fl s Ar field Oc Ns …
4516038816SMartin Matuska.Oo Fl S Ar field Oc Ns …
4616038816SMartin Matuska.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc
47c40487d4SMatt Macy.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
487877fdebSMatt Macy.Nm zfs
49eda14cbcSMatt Macy.Cm groupspace
50eda14cbcSMatt Macy.Op Fl Hinp
5116038816SMartin Matuska.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc
5216038816SMartin Matuska.Oo Fl s Ar field Oc Ns …
5316038816SMartin Matuska.Oo Fl S Ar field Oc Ns …
5416038816SMartin Matuska.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc
55c40487d4SMatt Macy.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
567877fdebSMatt Macy.Nm zfs
57eda14cbcSMatt Macy.Cm projectspace
58eda14cbcSMatt Macy.Op Fl Hp
5916038816SMartin Matuska.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc
6016038816SMartin Matuska.Oo Fl s Ar field Oc Ns …
6116038816SMartin Matuska.Oo Fl S Ar field Oc Ns …
62c40487d4SMatt Macy.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
6316038816SMartin Matuska.
64eda14cbcSMatt Macy.Sh DESCRIPTION
65eda14cbcSMatt Macy.Bl -tag -width ""
66eda14cbcSMatt Macy.It Xo
677877fdebSMatt Macy.Nm zfs
68eda14cbcSMatt Macy.Cm userspace
69eda14cbcSMatt Macy.Op Fl Hinp
7016038816SMartin Matuska.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc
7116038816SMartin Matuska.Oo Fl s Ar field Oc Ns …
7216038816SMartin Matuska.Oo Fl S Ar field Oc Ns …
7316038816SMartin Matuska.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc
74c40487d4SMatt Macy.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
75eda14cbcSMatt Macy.Xc
76c40487d4SMatt MacyDisplays space consumed by, and quotas on, each user in the specified filesystem,
77c40487d4SMatt Macysnapshot, or path.
78c40487d4SMatt MacyIf a path is given, the filesystem that contains that path will be used.
79eda14cbcSMatt MacyThis corresponds to the
80eda14cbcSMatt Macy.Sy userused@ Ns Em user ,
81eda14cbcSMatt Macy.Sy userobjused@ Ns Em user ,
82eda14cbcSMatt Macy.Sy userquota@ Ns Em user ,
83eda14cbcSMatt Macyand
84eda14cbcSMatt Macy.Sy userobjquota@ Ns Em user
85eda14cbcSMatt Macyproperties.
8616038816SMartin Matuska.Bl -tag -width "-S field"
87eda14cbcSMatt Macy.It Fl H
88eda14cbcSMatt MacyDo not print headers, use tab-delimited output.
89eda14cbcSMatt Macy.It Fl S Ar field
90eda14cbcSMatt MacySort by this field in reverse order.
91eda14cbcSMatt MacySee
92eda14cbcSMatt Macy.Fl s .
93eda14cbcSMatt Macy.It Fl i
94eda14cbcSMatt MacyTranslate SID to POSIX ID.
95eda14cbcSMatt MacyThe POSIX ID may be ephemeral if no mapping exists.
96eda14cbcSMatt MacyNormal POSIX interfaces
9716038816SMartin Matuska.Pq like Xr stat 2 , Nm ls Fl l
98eda14cbcSMatt Macyperform this translation, so the
99eda14cbcSMatt Macy.Fl i
100eda14cbcSMatt Macyoption allows the output from
101eda14cbcSMatt Macy.Nm zfs Cm userspace
102eda14cbcSMatt Macyto be compared directly with those utilities.
103eda14cbcSMatt MacyHowever,
104eda14cbcSMatt Macy.Fl i
105eda14cbcSMatt Macymay lead to confusion if some files were created by an SMB user before a
106eda14cbcSMatt MacySMB-to-POSIX name mapping was established.
107eda14cbcSMatt MacyIn such a case, some files will be owned by the SMB entity and some by the POSIX
108eda14cbcSMatt Macyentity.
109eda14cbcSMatt MacyHowever, the
110eda14cbcSMatt Macy.Fl i
111eda14cbcSMatt Macyoption will report that the POSIX entity has the total usage and quota for both.
112eda14cbcSMatt Macy.It Fl n
113eda14cbcSMatt MacyPrint numeric ID instead of user/group name.
11416038816SMartin Matuska.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns …
115eda14cbcSMatt MacyDisplay only the specified fields from the following set:
116eda14cbcSMatt Macy.Sy type ,
117eda14cbcSMatt Macy.Sy name ,
118eda14cbcSMatt Macy.Sy used ,
119eda14cbcSMatt Macy.Sy quota .
120eda14cbcSMatt MacyThe default is to display all fields.
121eda14cbcSMatt Macy.It Fl p
122eda14cbcSMatt MacyUse exact
123eda14cbcSMatt Macy.Pq parsable
124eda14cbcSMatt Macynumeric output.
125eda14cbcSMatt Macy.It Fl s Ar field
126eda14cbcSMatt MacySort output by this field.
127eda14cbcSMatt MacyThe
128eda14cbcSMatt Macy.Fl s
129eda14cbcSMatt Macyand
130eda14cbcSMatt Macy.Fl S
131eda14cbcSMatt Macyflags may be specified multiple times to sort first by one field, then by
132eda14cbcSMatt Macyanother.
133eda14cbcSMatt MacyThe default is
134eda14cbcSMatt Macy.Fl s Sy type Fl s Sy name .
13516038816SMartin Matuska.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns …
136eda14cbcSMatt MacyPrint only the specified types from the following set:
137eda14cbcSMatt Macy.Sy all ,
138eda14cbcSMatt Macy.Sy posixuser ,
139eda14cbcSMatt Macy.Sy smbuser ,
140eda14cbcSMatt Macy.Sy posixgroup ,
141eda14cbcSMatt Macy.Sy smbgroup .
142eda14cbcSMatt MacyThe default is
14316038816SMartin Matuska.Fl t Sy posixuser , Ns Sy smbuser .
144eda14cbcSMatt MacyThe default can be changed to include group types.
145eda14cbcSMatt Macy.El
146eda14cbcSMatt Macy.It Xo
1477877fdebSMatt Macy.Nm zfs
148eda14cbcSMatt Macy.Cm groupspace
149eda14cbcSMatt Macy.Op Fl Hinp
15016038816SMartin Matuska.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc
15116038816SMartin Matuska.Oo Fl s Ar field Oc Ns …
15216038816SMartin Matuska.Oo Fl S Ar field Oc Ns …
15316038816SMartin Matuska.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc
154eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar snapshot
155eda14cbcSMatt Macy.Xc
156eda14cbcSMatt MacyDisplays space consumed by, and quotas on, each group in the specified
157eda14cbcSMatt Macyfilesystem or snapshot.
158eda14cbcSMatt MacyThis subcommand is identical to
159eda14cbcSMatt Macy.Cm userspace ,
160eda14cbcSMatt Macyexcept that the default types to display are
16116038816SMartin Matuska.Fl t Sy posixgroup , Ns Sy smbgroup .
162eda14cbcSMatt Macy.It Xo
1637877fdebSMatt Macy.Nm zfs
164eda14cbcSMatt Macy.Cm projectspace
165eda14cbcSMatt Macy.Op Fl Hp
16616038816SMartin Matuska.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc
16716038816SMartin Matuska.Oo Fl s Ar field Oc Ns …
16816038816SMartin Matuska.Oo Fl S Ar field Oc Ns …
169c40487d4SMatt Macy.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
170eda14cbcSMatt Macy.Xc
171eda14cbcSMatt MacyDisplays space consumed by, and quotas on, each project in the specified
17216038816SMartin Matuskafilesystem or snapshot.
17316038816SMartin MatuskaThis subcommand is identical to
174eda14cbcSMatt Macy.Cm userspace ,
17516038816SMartin Matuskaexcept that the project identifier is a numeral, not a name.
17616038816SMartin MatuskaSo need neither the option
17716038816SMartin Matuska.Fl i
178eda14cbcSMatt Macyfor SID to POSIX ID nor
17916038816SMartin Matuska.Fl n
180eda14cbcSMatt Macyfor numeric ID, nor
18116038816SMartin Matuska.Fl t
182eda14cbcSMatt Macyfor types.
183eda14cbcSMatt Macy.El
18416038816SMartin Matuska.
185eda14cbcSMatt Macy.Sh SEE ALSO
186*3ff01b23SMartin Matuska.Xr zfsprops 7 ,
187*3ff01b23SMartin Matuska.Xr zfs-set 8
188