summaryrefslogtreecommitdiff
path: root/Documentation/btrfs-property.8
blob: b8df629eae0810e5ff3708af7f5f2f8b9365a02f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
'\" t
.\"     Title: btrfs-property
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 12/05/2018
.\"    Manual: Btrfs Manual
.\"    Source: Btrfs v4.19.1
.\"  Language: English
.\"
.TH "BTRFS\-PROPERTY" "8" "12/05/2018" "Btrfs v4\&.19\&.1" "Btrfs Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
btrfs-property \- get/set/list properties for given filesystem object
.SH "SYNOPSIS"
.sp
\fBbtrfs property\fR \fI<subcommand>\fR \fI<args>\fR
.SH "DESCRIPTION"
.sp
\fBbtrfs property\fR is used to get/set/list property for given filesystem object\&. The object can be an inode (file or directory), subvolume or the whole filesystem\&. See the description of \fBget\fR subcommand for more information about both btrfs object and property\&.
.sp
\fBbtrfs property\fR provides an unified and user\-friendly method to tune different btrfs properties instead of using the traditional method like \fBchattr\fR(1) or \fBlsattr\fR(1)\&.
.SH "SUBCOMMAND"
.PP
\fBget\fR [\-t \fI<type>\fR] \fI<object>\fR [\fI<name>\fR]
.RS 4
get property from a btrfs
\fI<object>\fR
of given
\fI<type>\fR
.sp
A btrfs object, which is set by
\fI<object>\fR, can be a btrfs filesystem itself, a btrfs subvolume, an inode (file or directory) inside btrfs, or a device on which a btrfs exists\&.
.sp
The option
\fI\-t\fR
can be used to explicitly specify what type of object you meant\&. This is only needed when a property could be set for more then one object type\&.
.sp
Possible types are
\fIs[ubvol]\fR,
\fIf[ilesystem]\fR,
\fIi[node]\fR
and
\fId[evice]\fR, where the first lettes is a shortcut\&.
.sp
Set the name of property by
\fIname\fR\&. If no
\fIname\fR
is specified, all properties for the given object are printed\&.
\fIname\fR
is one of the following:
.PP
ro
.RS 4
read\-only flag of subvolume: true or false
.RE
.PP
label
.RS 4
label of device
.RE
.PP
compression
.RS 4
compression algorithm set for an inode, possible values:
\fIlzo\fR,
\fIzlib\fR,
\fIzstd\fR\&. To disable compression use "" (empty string),
\fIno\fR
or
\fInone\fR\&.
.RE
.RE
.PP
\fBlist\fR [\-t \fI<type>\fR] \fI<object>\fR
.RS 4
Lists available properties with their descriptions for the given object\&.
.sp
See the description of
\fBget\fR
subcommand for the meaning of each option\&.
.RE
.PP
\fBset\fR [\-t \fI<type>\fR] \fI<object>\fR \fI<name>\fR \fI<value>\fR
.RS 4
Sets a property on a btrfs object\&.
.sp
See the description of
\fBget\fR
subcommand for the meaning of each option\&.
.RE
.SH "EXIT STATUS"
.sp
\fBbtrfs property\fR returns a zero exit status if it succeeds\&. Non zero is returned in case of failure\&.
.SH "AVAILABILITY"
.sp
\fBbtrfs\fR is part of btrfs\-progs\&. Please refer to the btrfs wiki \m[blue]\fBhttp://btrfs\&.wiki\&.kernel\&.org\fR\m[] for further details\&.
.SH "SEE ALSO"
.sp
\fBmkfs\&.btrfs\fR(8), \fBlsattr\fR(1), \fBchattr\fR(1)