BTRFS-PROPERTY(8)
π BTRFS-PROPERTY β get/set/list properties for given filesystem object π
okay bestie, pull up a chair, because btrfs property is genuinely one of those little commands that makes you feel like you have your life together. it's from the btrfs-progs girlies, and it does exactly what it says on the tin: gets, sets, and lists properties on a filesystem object. no cap.
β¨ SYNOPSIS β¨
btrfs property <subcommand> <args>
πΈ DESCRIPTION πΈ
so btrfs property is your go-to for getting / setting / listing a property on a given filesystem object. and when we say "object", we mean it could be:
- an inode (that's a file or a directory, mwah)
- a subvolume
- or the entire filesystem, the whole thing, main character energy
the whole point is that btrfs property gives you one unified, user-friendly way to tune all your different btrfs properties β instead of doing the traditional thing with chattr(1) or lsattr(1). it's giving glow-up. it's giving modern. we simply do not use the old method anymore.
π Object types π
a property might apply to several object types at once, so sometimes you literally have to spell out which one you mean. that said, for the most common case β files and directories β you don't have to bother. she just knows. π
the subcommands take a parameter -t, and you can use the first letter as a shortcut (f/s/d/i) for the type:
filesystemsubvolumedeviceinode(file or directory β the everyday legends)
π§ Inode properties π§
compressionβ the compression algorithm that's set for an inode. heads up though: it is not possible to set the compression level this way. possible values are:lzozlibzstdnoornoneβ disables compression (equivalent tochattr +m)""(empty string) β sets the default value
π Note: this has changed in version 5.18 of btrfs-progs and requires kernel 5.14 or newer to work. so check your kernel before you come for me, bestie.
π¦ Subvolume properties π¦
roβ the read-only flag of the subvolume:trueorfalse. bestie, please also go read the section SUBVOLUME FLAGS inbtrfs-subvolume(8)for the possible implications regarding incremental send. this one has lore. do not skip it.
π Filesystem properties π
labelβ the label of the filesystem. for an unmounted filesystem, provide a path to a block device as the object. for a mounted filesystem, specify a mount point. easy.
π SUBCOMMAND π
get [-t <type>] <object> [<name>]β reads the value of a property name from a btrfs object of the given type. if you leave the name empty, it reads all of them. all of them. greedy (affectionate).list [-t <type>] <object>β lists the available properties for the given object, together with their descriptions. it's giving menu. it's giving "here's everything you could order".set [-f] [-t <type>] <object> <name> <value>β sets the value of a property name on a given btrfs object.
Options
-fβ force the change. because changing some properties may involve safety checks or additional changes that depend on the property's semantics. so like, she's checking your work before you commit. don't force it unless you mean it.
β EXAMPLES β
setting compression on a file, step by step, bestie:
$ touch file1
$ btrfs prop get file1
[ empty output ]
$ btrfs prop set file1 compression zstd
$ btrfs prop get file1
compression=zstd
look at that. empty output, then boom β compression=zstd. we love a transformation arc. β¨
making a writeable subvolume read-only:
$ btrfs subvol create subvol1
[ fill subvol1 with data ]
$ btrfs prop get subvol1
ro=false
$ btrfs prop set subvol1 ro true
ro=true
the way she went from ro=false to ro=true⦠iconic. periodt.
π EXIT STATUS π
btrfs property returns a zero exit status if it succeeds. if it fails, you get a non-zero back. that's the whole rule. no drama.
π AVAILABILITY π
btrfs is part of btrfs-progs. please refer to the documentation at <https://btrfs.readthedocs.io>.
π SEE ALSO π
and that's the page, bestie!! π«Ά this was btrfs-progs version 7.3, dated Oct 24, 2026 β go forth and set your properties, you gorgeous little power user. ππΈβ¨
π¦ where this page comes from
- arch rolling: btrfs-progs 7.3-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms