xref: /freebsd/sys/contrib/openzfs/man/man8/zfs-projectspace.8 (revision e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5)
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 https://opensource.org/licenses/CDDL-1.0.
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.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
22.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
23.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
24.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
25.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
26.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
27.\" Copyright (c) 2014 Integros [integros.com]
28.\" Copyright 2019 Richard Laager. All rights reserved.
29.\" Copyright 2018 Nexenta Systems, Inc.
30.\" Copyright 2019 Joyent, Inc.
31.\"
32.Dd June 30, 2019
33.Dt ZFS-USERSPACE 8
34.Os
35.
36.Sh NAME
37.Nm zfs-userspace
38.Nd display space and quotas of ZFS dataset
39.Sh SYNOPSIS
40.Nm zfs
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 Ns | Ns Ar path
48.Nm zfs
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 Ns | Ns Ar path
56.Nm zfs
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 Ns | Ns Ar path
63.
64.Sh DESCRIPTION
65.Bl -tag -width ""
66.It Xo
67.Nm zfs
68.Cm userspace
69.Op Fl Hinp
70.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc
71.Oo Fl s Ar field Oc Ns …
72.Oo Fl S Ar field Oc Ns …
73.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc
74.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
75.Xc
76Displays space consumed by, and quotas on, each user in the specified
77filesystem,
78snapshot, or path.
79If a path is given, the filesystem that contains that path will be used.
80This corresponds to the
81.Sy userused@ Ns Em user ,
82.Sy userobjused@ Ns Em user ,
83.Sy userquota@ Ns Em user ,
84and
85.Sy userobjquota@ Ns Em user
86properties.
87.Bl -tag -width "-S field"
88.It Fl H
89Do not print headers, use tab-delimited output.
90.It Fl S Ar field
91Sort by this field in reverse order.
92See
93.Fl s .
94.It Fl i
95Translate SID to POSIX ID.
96The POSIX ID may be ephemeral if no mapping exists.
97Normal POSIX interfaces
98.Pq like Xr stat 2 , Nm ls Fl l
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 Sy smbuser .
145The default can be changed to include group types.
146.El
147.It Xo
148.Nm zfs
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 Sy smbgroup .
163.It Xo
164.Nm zfs
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 Ns | Ns Ar path
171.Xc
172Displays space consumed by, and quotas on, each project in the specified
173filesystem or snapshot.
174This subcommand is identical to
175.Cm userspace ,
176except that the project identifier is a numeral, not a name.
177So need neither the option
178.Fl i
179for SID to POSIX ID nor
180.Fl n
181for numeric ID, nor
182.Fl t
183for types.
184.El
185.
186.Sh SEE ALSO
187.Xr zfsprops 7 ,
188.Xr zfs-set 8
189