Manpage/btrfs-property

From btrfs Wiki
(Difference between revisions)
Jump to: navigation, search
m (Protected "Manpage/btrfs-property": Counter-productive edit warring (‎[edit=sysop] (indefinite) ‎[move=sysop] (indefinite)))
(git 5.4)
 
Line 4: Line 4:
  
 
==NAME==
 
==NAME==
btrfs-property - get/set/list properties for given btrfs object.
+
btrfs-property - get/set/list properties for given filesystem object
  
 
==SYNOPSIS==
 
==SYNOPSIS==
Line 11: Line 11:
 
==DESCRIPTION==
 
==DESCRIPTION==
  
<p><b>btrfs property</b> is used to get/set/list property for given btrfs object.
+
<p><b>btrfs property</b> is used to get/set/list property for given filesystem object.
See the description of <b>get</b> subcommand for more information about
+
The object can be an inode (file or directory), subvolume or the whole
 +
filesystem.  See the description of <b>get</b> subcommand for more information about
 
both btrfs object and property.</p>
 
both btrfs object and property.</p>
 
<p><b>btrfs property</b> provides an unified and user-friendly method to tune different
 
<p><b>btrfs property</b> provides an unified and user-friendly method to tune different
Line 24: Line 25:
 
<dd>
 
<dd>
 
<p>
 
<p>
Gets a property from a btrfs object.
+
get property from a btrfs <em>&lt;object&gt;</em> of given <em>&lt;type&gt;</em>
 
</p>
 
</p>
 
<p>A btrfs object, which is set by <em>&lt;object&gt;</em>, can be a btrfs filesystem
 
<p>A btrfs object, which is set by <em>&lt;object&gt;</em>, can be a btrfs filesystem
itself, a btrfs subvolume, an inode(file or directory) inside btrfs,
+
itself, a btrfs subvolume, an inode (file or directory) inside btrfs,
 
or a device on which a btrfs exists.</p>
 
or a device on which a btrfs exists.</p>
 
<p>The option <em>-t</em> can be used to explicitly
 
<p>The option <em>-t</em> can be used to explicitly
 
specify what type of object you meant. This is only needed when a
 
specify what type of object you meant. This is only needed when a
 
property could be set for more then one object type.</p>
 
property could be set for more then one object type.</p>
<p>Possible types are <em>s[ubvol]</em>, <em>f[ilesystem]</em>, <em>i[node]</em> and <em>d[evice]</em>.</p>
+
<p>Possible types are <em>s[ubvol]</em>, <em>f[ilesystem]</em>, <em>i[node]</em> and <em>d[evice]</em>, where
 +
the first lettes is a shortcut.</p>
 
<p>Set the name of property by <em>name</em>. If no <em>name</em> is specified,
 
<p>Set the name of property by <em>name</em>. If no <em>name</em> is specified,
 
all properties for the given object are printed. <em>name</em> is one of
 
all properties for the given object are printed. <em>name</em> is one of
the followings.</p>
+
the following:</p>
 
<dl>
 
<dl>
 
<dt>
 
<dt>
Line 48: Line 50:
 
<dd>
 
<dd>
 
<p>
 
<p>
label of device
+
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.
 
</p>
 
</p>
  
Line 55: Line 58:
 
<dd>
 
<dd>
 
<p>
 
<p>
compression setting for an inode: lzo, zlib, zstd, or "" (empty string)
+
compression algorithm set for an inode, possible values: <em>lzo</em>, <em>zlib</em>, <em>zstd</em>.
 +
To disable compression use "" (empty string), <em>no</em> or <em>none</em>.
 
</p>
 
</p>
  

Latest revision as of 17:44, 16 January 2020

Contents

[edit] btrfs-property(8) manual page

Warning: this page is automatically generated from git, all edits will be lost. Current git version.


[edit] NAME

btrfs-property - get/set/list properties for given filesystem object

[edit] SYNOPSIS

btrfs property <subcommand> <args>

[edit] DESCRIPTION

btrfs property 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 get subcommand for more information about both btrfs object and property.

btrfs property provides an unified and user-friendly method to tune different btrfs properties instead of using the traditional method like chattr(1) or lsattr(1).

[edit] SUBCOMMAND

get [-t <type>] <object> [<name>]

get property from a btrfs <object> of given <type>

A btrfs object, which is set by <object>, can be a btrfs filesystem itself, a btrfs subvolume, an inode (file or directory) inside btrfs, or a device on which a btrfs exists.

The option -t 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.

Possible types are s[ubvol], f[ilesystem], i[node] and d[evice], where the first lettes is a shortcut.

Set the name of property by name. If no name is specified, all properties for the given object are printed. name is one of the following:

ro

read-only flag of subvolume: true or false

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.

compression

compression algorithm set for an inode, possible values: lzo, zlib, zstd. To disable compression use "" (empty string), no or none.

list [-t <type>] <object>

Lists available properties with their descriptions for the given object.

See the description of get subcommand for the meaning of each option.

set [-t <type>] <object> <name> <value>

Sets a property on a btrfs object.

See the description of get subcommand for the meaning of each option.

[edit] EXIT STATUS

btrfs property returns a zero exit status if it succeeds. Non zero is returned in case of failure.

[edit] AVAILABILITY

btrfs is part of btrfs-progs. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for further details.

[edit] SEE ALSO

mkfs.btrfs(8), lsattr(1), chattr(1)

Personal tools