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