xref: /freebsd/sys/contrib/openzfs/man/man8/zfs-userspace.8 (revision eda14cbc264d6969b02f2b1994cef11148e914f1)
1*eda14cbcSMatt Macy.\"
2*eda14cbcSMatt Macy.\" CDDL HEADER START
3*eda14cbcSMatt Macy.\"
4*eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the
5*eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License").
6*eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License.
7*eda14cbcSMatt Macy.\"
8*eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*eda14cbcSMatt Macy.\" or http://www.opensolaris.org/os/licensing.
10*eda14cbcSMatt Macy.\" See the License for the specific language governing permissions
11*eda14cbcSMatt Macy.\" and limitations under the License.
12*eda14cbcSMatt Macy.\"
13*eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each
14*eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the
16*eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying
17*eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner]
18*eda14cbcSMatt Macy.\"
19*eda14cbcSMatt Macy.\" CDDL HEADER END
20*eda14cbcSMatt Macy.\"
21*eda14cbcSMatt Macy.\"
22*eda14cbcSMatt Macy.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23*eda14cbcSMatt Macy.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24*eda14cbcSMatt Macy.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
25*eda14cbcSMatt Macy.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26*eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27*eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
28*eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com]
29*eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved.
30*eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc.
31*eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc.
32*eda14cbcSMatt Macy.\"
33*eda14cbcSMatt Macy.Dd June 30, 2019
34*eda14cbcSMatt Macy.Dt ZFS-USERSPACE 8
35*eda14cbcSMatt Macy.Os
36*eda14cbcSMatt Macy.Sh NAME
37*eda14cbcSMatt Macy.Nm zfs Ns Pf - Cm userspace
38*eda14cbcSMatt Macy.Nd Displays space consumed by, and quotas on, each user or group in the specified filesystem or snapshot.
39*eda14cbcSMatt Macy.Sh SYNOPSIS
40*eda14cbcSMatt Macy.Nm
41*eda14cbcSMatt Macy.Cm userspace
42*eda14cbcSMatt Macy.Op Fl Hinp
43*eda14cbcSMatt Macy.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
44*eda14cbcSMatt Macy.Oo Fl s Ar field Oc Ns ...
45*eda14cbcSMatt Macy.Oo Fl S Ar field Oc Ns ...
46*eda14cbcSMatt Macy.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
47*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar snapshot
48*eda14cbcSMatt Macy.Nm
49*eda14cbcSMatt Macy.Cm groupspace
50*eda14cbcSMatt Macy.Op Fl Hinp
51*eda14cbcSMatt Macy.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
52*eda14cbcSMatt Macy.Oo Fl s Ar field Oc Ns ...
53*eda14cbcSMatt Macy.Oo Fl S Ar field Oc Ns ...
54*eda14cbcSMatt Macy.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
55*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar snapshot
56*eda14cbcSMatt Macy.Nm
57*eda14cbcSMatt Macy.Cm projectspace
58*eda14cbcSMatt Macy.Op Fl Hp
59*eda14cbcSMatt Macy.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
60*eda14cbcSMatt Macy.Oo Fl s Ar field Oc Ns ...
61*eda14cbcSMatt Macy.Oo Fl S Ar field Oc Ns ...
62*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar snapshot
63*eda14cbcSMatt Macy.Sh DESCRIPTION
64*eda14cbcSMatt Macy.Bl -tag -width ""
65*eda14cbcSMatt Macy.It Xo
66*eda14cbcSMatt Macy.Nm
67*eda14cbcSMatt Macy.Cm userspace
68*eda14cbcSMatt Macy.Op Fl Hinp
69*eda14cbcSMatt Macy.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
70*eda14cbcSMatt Macy.Oo Fl s Ar field Oc Ns ...
71*eda14cbcSMatt Macy.Oo Fl S Ar field Oc Ns ...
72*eda14cbcSMatt Macy.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
73*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar snapshot
74*eda14cbcSMatt Macy.Xc
75*eda14cbcSMatt MacyDisplays space consumed by, and quotas on, each user in the specified filesystem
76*eda14cbcSMatt Macyor snapshot.
77*eda14cbcSMatt MacyThis corresponds to the
78*eda14cbcSMatt Macy.Sy userused@ Ns Em user ,
79*eda14cbcSMatt Macy.Sy userobjused@ Ns Em user ,
80*eda14cbcSMatt Macy.Sy userquota@ Ns Em user,
81*eda14cbcSMatt Macyand
82*eda14cbcSMatt Macy.Sy userobjquota@ Ns Em user
83*eda14cbcSMatt Macyproperties.
84*eda14cbcSMatt Macy.Bl -tag -width "-H"
85*eda14cbcSMatt Macy.It Fl H
86*eda14cbcSMatt MacyDo not print headers, use tab-delimited output.
87*eda14cbcSMatt Macy.It Fl S Ar field
88*eda14cbcSMatt MacySort by this field in reverse order.
89*eda14cbcSMatt MacySee
90*eda14cbcSMatt Macy.Fl s .
91*eda14cbcSMatt Macy.It Fl i
92*eda14cbcSMatt MacyTranslate SID to POSIX ID.
93*eda14cbcSMatt MacyThe POSIX ID may be ephemeral if no mapping exists.
94*eda14cbcSMatt MacyNormal POSIX interfaces
95*eda14cbcSMatt Macy.Po for example,
96*eda14cbcSMatt Macy.Xr stat 2 ,
97*eda14cbcSMatt Macy.Nm ls Fl l
98*eda14cbcSMatt Macy.Pc
99*eda14cbcSMatt Macyperform this translation, so the
100*eda14cbcSMatt Macy.Fl i
101*eda14cbcSMatt Macyoption allows the output from
102*eda14cbcSMatt Macy.Nm zfs Cm userspace
103*eda14cbcSMatt Macyto be compared directly with those utilities.
104*eda14cbcSMatt MacyHowever,
105*eda14cbcSMatt Macy.Fl i
106*eda14cbcSMatt Macymay lead to confusion if some files were created by an SMB user before a
107*eda14cbcSMatt MacySMB-to-POSIX name mapping was established.
108*eda14cbcSMatt MacyIn such a case, some files will be owned by the SMB entity and some by the POSIX
109*eda14cbcSMatt Macyentity.
110*eda14cbcSMatt MacyHowever, the
111*eda14cbcSMatt Macy.Fl i
112*eda14cbcSMatt Macyoption will report that the POSIX entity has the total usage and quota for both.
113*eda14cbcSMatt Macy.It Fl n
114*eda14cbcSMatt MacyPrint numeric ID instead of user/group name.
115*eda14cbcSMatt Macy.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
116*eda14cbcSMatt MacyDisplay only the specified fields from the following set:
117*eda14cbcSMatt Macy.Sy type ,
118*eda14cbcSMatt Macy.Sy name ,
119*eda14cbcSMatt Macy.Sy used ,
120*eda14cbcSMatt Macy.Sy quota .
121*eda14cbcSMatt MacyThe default is to display all fields.
122*eda14cbcSMatt Macy.It Fl p
123*eda14cbcSMatt MacyUse exact
124*eda14cbcSMatt Macy.Pq parsable
125*eda14cbcSMatt Macynumeric output.
126*eda14cbcSMatt Macy.It Fl s Ar field
127*eda14cbcSMatt MacySort output by this field.
128*eda14cbcSMatt MacyThe
129*eda14cbcSMatt Macy.Fl s
130*eda14cbcSMatt Macyand
131*eda14cbcSMatt Macy.Fl S
132*eda14cbcSMatt Macyflags may be specified multiple times to sort first by one field, then by
133*eda14cbcSMatt Macyanother.
134*eda14cbcSMatt MacyThe default is
135*eda14cbcSMatt Macy.Fl s Sy type Fl s Sy name .
136*eda14cbcSMatt Macy.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
137*eda14cbcSMatt MacyPrint only the specified types from the following set:
138*eda14cbcSMatt Macy.Sy all ,
139*eda14cbcSMatt Macy.Sy posixuser ,
140*eda14cbcSMatt Macy.Sy smbuser ,
141*eda14cbcSMatt Macy.Sy posixgroup ,
142*eda14cbcSMatt Macy.Sy smbgroup .
143*eda14cbcSMatt MacyThe default is
144*eda14cbcSMatt Macy.Fl t Sy posixuser Ns \&, Ns Sy smbuser .
145*eda14cbcSMatt MacyThe default can be changed to include group types.
146*eda14cbcSMatt Macy.El
147*eda14cbcSMatt Macy.It Xo
148*eda14cbcSMatt Macy.Nm
149*eda14cbcSMatt Macy.Cm groupspace
150*eda14cbcSMatt Macy.Op Fl Hinp
151*eda14cbcSMatt Macy.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
152*eda14cbcSMatt Macy.Oo Fl s Ar field Oc Ns ...
153*eda14cbcSMatt Macy.Oo Fl S Ar field Oc Ns ...
154*eda14cbcSMatt Macy.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
155*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar snapshot
156*eda14cbcSMatt Macy.Xc
157*eda14cbcSMatt MacyDisplays space consumed by, and quotas on, each group in the specified
158*eda14cbcSMatt Macyfilesystem or snapshot.
159*eda14cbcSMatt MacyThis subcommand is identical to
160*eda14cbcSMatt Macy.Cm userspace ,
161*eda14cbcSMatt Macyexcept that the default types to display are
162*eda14cbcSMatt Macy.Fl t Sy posixgroup Ns \&, Ns Sy smbgroup .
163*eda14cbcSMatt Macy.It Xo
164*eda14cbcSMatt Macy.Nm
165*eda14cbcSMatt Macy.Cm projectspace
166*eda14cbcSMatt Macy.Op Fl Hp
167*eda14cbcSMatt Macy.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
168*eda14cbcSMatt Macy.Oo Fl s Ar field Oc Ns ...
169*eda14cbcSMatt Macy.Oo Fl S Ar field Oc Ns ...
170*eda14cbcSMatt Macy.Ar filesystem Ns | Ns Ar snapshot
171*eda14cbcSMatt Macy.Xc
172*eda14cbcSMatt MacyDisplays space consumed by, and quotas on, each project in the specified
173*eda14cbcSMatt Macyfilesystem or snapshot. This subcommand is identical to
174*eda14cbcSMatt Macy.Cm userspace ,
175*eda14cbcSMatt Macyexcept that the project identifier is numeral, not name. So need neither
176*eda14cbcSMatt Macythe option
177*eda14cbcSMatt Macy.Sy -i
178*eda14cbcSMatt Macyfor SID to POSIX ID nor
179*eda14cbcSMatt Macy.Sy -n
180*eda14cbcSMatt Macyfor numeric ID, nor
181*eda14cbcSMatt Macy.Sy -t
182*eda14cbcSMatt Macyfor types.
183*eda14cbcSMatt Macy.El
184*eda14cbcSMatt Macy.Sh SEE ALSO
185*eda14cbcSMatt Macy.Xr zfs-set 8 ,
186*eda14cbcSMatt Macy.Xr zfsprops 8
187