path: root/man
diff options
authorGoffredo Baroncelli <>2010-12-05 17:46:44 +0000
committerChris Mason <>2011-10-25 09:18:31 -0400
commite8f47cf068c3a4b5de7770ebb9eef37e28e09ef7 (patch)
treefbf620453d16c5dd3dbd048556accd48ebabace2 /man
parent002d021c5f2d838394e850e304546ffad283518a (diff)
Add the "btrfs filesystem label" command
Hi all, this patch adds the command "btrfs filesystem label" to change (or show) the label of a filesystem. This patch is a subset of the one written previously by Morey Roof. I included the user space part only. So it is possible only to change/show a label of a *single device* and *unounted* filesystem. The reason of excluding the kernel space part, is to simplify the patch in order to speed the check and then the merging of the patch itself. In fact I have to point out that in the past there was almost three attempts to propose this patch, without success neither complaints. Chris, let me know how you want to proceed. I know that you are very busy, and you prefer to work to stabilize btrfs instead adding new feature. But I think that changing a label is a *essential* feature for a filesystem managing tool. Think about a mount by LABEL. To show a label $ btrfs filesystem label <device> To set a label $ btrfs filesystem label <device> <newlabel> Please guys, give a look to the source. Comments are welcome. You can pull the source from the branch "label" of the repository Regards G.Baroncelli Signed-off-by: Chris Mason <>
Diffstat (limited to 'man')
1 files changed, 19 insertions, 0 deletions
diff --git a/man/ b/man/
index b9b89130..6f92f916 100644
--- a/man/
+++ b/man/
@@ -19,6 +19,8 @@ btrfs \- control a btrfs filesystem
\fBbtrfs\fP \fBfilesystem resize\fP\fI [+/\-]<size>[gkm]|max <filesystem>\fP
+\fBbtrfs\fP \fBfilesystem label\fP\fI <dev> [newlabel]\fP
\fBbtrfs\fP \fBfilesystem defrag\fP\fI [options] <file>|<dir> [<file>|<dir>...]\fP
\fBbtrfs\fP \fBsubvolume find-new\fP\fI <subvolume> <last_gen>\fP
@@ -164,6 +166,23 @@ can expand the partition before enlarging the filesystem and shrink the
partition after reducing the size of the filesystem.
+\fBbtrfs\fP \fBfilesystem label\fP\fI <dev> [newlabel]\fP
+Show or update the label of a filesystem. \fI<dev>\fR is used to identify the
+If a \fInewlabel\fR optional argument is passed, the label is changed. The
+following costraints exist for a label:
+- the maximum allowable lenght shall be less or equal than 256 chars
+- the label shall not contain the '/' or '\\' characters.
+NOTE: Currently there are the following limitations:
+- the filesystem has to be unmounted
+- the filesystem should not have more than one device.
\fBfilesystem show\fR [<uuid>|<label>]\fR
Show the btrfs filesystem with some additional info. If no UUID or label is
passed, \fBbtrfs\fR show info of all the btrfs filesystem.