.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "BTRFS-PROPERTY" "8" "Jan 31, 2024" "6.6.3" "BTRFS" .SH NAME btrfs-property \- get/set/list properties for given filesystem object .SH SYNOPSIS .sp \fBbtrfs property\fP .SH DESCRIPTION .sp \fBbtrfs property\fP 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. .sp \fBbtrfs property\fP provides an unified and user\-friendly method to tune different btrfs properties instead of using the traditional method like \fBchattr(1)\fP or \fBlsattr(1)\fP\&. .SS Object types .sp A property might apply to several object types so in some cases it\(aqs necessary to specify that explicitly, however it\(aqs not needed in the most common case of files and directories. .sp The subcommands take parameter \fI\-t\fP, use first letter as a shortcut (\fIf/s/d/i\fP) of the type: .INDENT 0.0 .IP \(bu 2 filesystem .IP \(bu 2 subvolume .IP \(bu 2 device .IP \(bu 2 inode (file or directory) .UNINDENT .SS Inode properties .INDENT 0.0 .TP .B compression compression algorithm set for an inode (it\(aqs not possible to set the compression level this way), possible values: .INDENT 7.0 .IP \(bu 2 \fIlzo\fP .IP \(bu 2 \fIzlib\fP .IP \(bu 2 \fIzstd\fP .IP \(bu 2 \fIno\fP or \fInone\fP \- disable compression (equivalent to \fBchattr +m\fP) .IP \(bu 2 \fI\(dq\(dq\fP (empty string) \- set the default value .INDENT 2.0 .INDENT 3.5 .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 This has changed in version 5.18 of btrfs\-progs and requires kernel 5.14 or newer to work. .UNINDENT .UNINDENT .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SS Subvolume properties .INDENT 0.0 .TP .B ro read\-only flag of subvolume: true or false. Please also see section \fISUBVOLUME FLAGS\fP in \fI\%btrfs\-subvolume(8)\fP for possible implications regarding incremental send. .UNINDENT .SS Filesystem properties .INDENT 0.0 .TP .B label label of the filesystem. For an unmounted filesystem, provide a path to a block device as object. For a mounted filesystem, specify a mount point. .UNINDENT .SH SUBCOMMAND .INDENT 0.0 .TP .B get [\-t ] [] Read value of a property \fIname\fP of btrfs \fIobject\fP of given \fItype\fP, empty \fIname\fP will read all of them .TP .B list [\-t ] List available properties with their descriptions for the given object. .UNINDENT .INDENT 0.0 .TP .B set [\-f] [\-t ] Set \fIvalue\fP of property \fIname\fP on a given btrfs object. .sp \fBOptions\fP .INDENT 7.0 .TP .B \-f Force the change. Changing some properties may involve safety checks or additional changes that depend on the properties semantics. .UNINDENT .UNINDENT .SH EXAMPLES .sp Set compression on a file: .INDENT 0.0 .INDENT 3.5 .sp .EX $ touch file1 $ btrfs prop get file1 [ empty output ] $ btrfs prop set file1 compression zstd $ btrfs prop get file1 compression=zstd .EE .UNINDENT .UNINDENT .sp Make a writeable subvolume read\-only: .INDENT 0.0 .INDENT 3.5 .sp .EX $ btrfs subvol create subvol1 [ fill subvol1 with data ] $ btrfs prop get subvol1 ro=false $ btrfs prop set subvol1 ro true ro=true .EE .UNINDENT .UNINDENT .SH EXIT STATUS .sp \fBbtrfs property\fP returns a zero exit status if it succeeds. Non zero is returned in case of failure. .SH AVAILABILITY .sp \fBbtrfs\fP is part of btrfs\-progs. Please refer to the documentation at \fI\%https://btrfs.readthedocs.io\fP\&. .SH SEE ALSO .sp \fI\%mkfs.btrfs(8)\fP, \fBlsattr(1)\fP, \fBchattr(1)\fP .\" Generated by docutils manpage writer. .