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