From 47abaaf6d078e4818a9b22d5328c24cd31d652fc Mon Sep 17 00:00:00 2001 From: Misono Tomohiro Date: Mon, 18 Jun 2018 17:40:49 +0900 Subject: [PATCH] btrfs-progs: doc: update manual page of btrfs subvolume Some information is obsolete and updated as follows: - add missing explanations of some options - remove outdated explanation of "subvolrootid" mount option - reorder/group options of "subvolume list" so it matches the help message - add explanation of different meanings of parent in "parent ID/UUID" - fix indentation/spelling - add missing comma Signed-off-by: Misono Tomohiro Signed-off-by: David Sterba --- Documentation/btrfs-subvolume.asciidoc | 77 ++++++++++++++++++-------- 1 file changed, 55 insertions(+), 22 deletions(-) diff --git a/Documentation/btrfs-subvolume.asciidoc b/Documentation/btrfs-subvolume.asciidoc index a8c4af4b..f3eb4e26 100644 --- a/Documentation/btrfs-subvolume.asciidoc +++ b/Documentation/btrfs-subvolume.asciidoc @@ -77,13 +77,16 @@ safely stored on the device. `Options` + -c|--commit-after:::: -wait for transaction commit at the end of the operation +wait for transaction commit at the end of the operation. + -C|--commit-each:::: -wait for transaction commit after deleting each subvolume +wait for transaction commit after deleting each subvolume. ++ +-v|--verbose:::: +verbose output of operations. *find-new* :: -List the recently modified files in a subvolume, after ID. +List the recently modified files in a subvolume, after generation. *get-default* :: Get the default subvolume of the filesystem . @@ -93,40 +96,54 @@ The output format is similar to *subvolume list* command. *list* [options] [-G [\+|-]] [-C [+|-]] [--sort=rootid,gen,ogen,path] :: List the subvolumes present in the filesystem . + -For every subvolume the following information is shown by default. + -ID top level path + -where path is the relative path of the subvolume to the top level subvolume. +For every subvolume the following information is shown by default: ++ +ID gen top level path ++ +where ID is subvolume's id, gen is an internal counter which is updated +every transaction, top level is the same as parent subvolume's id, and +path is the relative path of the subvolume to the top level subvolume. The subvolume's ID may be used by the subvolume set-default command, or at mount time via the subvolid= option. -If `-p` is given, then parent is added to the output between ID -and top level. The parent's ID may be used at mount time via the -`subvolrootid=` option. + `Options` + --p:::: -print parent ID. +Path filtering;; +-o:::: +print only subvolumes below specified . -a:::: print all the subvolumes in the filesystem and distinguish between absolute and relative path with respect to the given . + +Field selection;; +-p:::: +print the parent ID +('parent' here means the subvolume which contains this subvolume). -c:::: print the ogeneration of the subvolume, aliases: ogen or origin generation. -g:::: -print the generation of the subvolume. --o:::: -print only subvolumes below specified . +print the generation of the subvolume (default). -u:::: print the UUID of the subvolume. -q:::: -print the parent uuid of subvolumes (and snapshots). +print the parent UUID of the subvolume +('parent' here means subvolume of which this subvolume is a snapshot). -R:::: -print the UUID of the sent subvolume, where the subvolume is the result of a receive operation --t:::: -print the result as a table. +print the UUID of the sent subvolume, where the subvolume is the result of a receive operation. + +Type filtering;; -s:::: only snapshot subvolumes in the filesystem will be listed. -r:::: only readonly subvolumes in the filesystem will be listed. +-d:::: +list deleted subvolumes that are not yet cleaned. + +Other;; +-t:::: +print the result as a table. + +Sorting;; -G [+|-]:::: list subvolumes in the filesystem that its generation is >=, \<= or = value. \'\+' means >= value, \'-' means \<= value, If there is @@ -144,9 +161,9 @@ for --sort you can combine some items together by \',', just like *set-default* [| ]:: Set the default subvolume for the (mounted) filesystem. - ++ Set the default subvolume for the (mounted) filesystem at . This will hide -the top-level subvolume (ie. the one mounted with 'subvol=/' or 'subvolid=5'). +the top-level subvolume (i.e. the one mounted with 'subvol=/' or 'subvolid=5'). Takes action on next mount. + There are two ways how to specify the subvolume, by or by the @@ -154,10 +171,22 @@ path. The id can be obtained from *btrfs subvolume list*, *btrfs subvolume show* or *btrfs inspect-internal rootid*. -*show* :: +*show* [options] |:: Show information of a given subvolume in the . ++ +`Options` ++ +-r|--rootid:::: +rootid of the subvolume. +-u|--uuid::: +UUID of the subvolume. -*snapshot* [-r] |[/]:: ++ +If no option is specified, subvolume information of is shown, +otherwise the subvolume information of rootid or UUID in the filesystem +is shown. + +*snapshot* [-r|-i ] |[/]:: Create a snapshot of the subvolume with the name in the directory. + @@ -168,6 +197,10 @@ If is not a subvolume, btrfs returns an error. + -r:::: Make the new snapshot read only. ++ +-i :::: +Add the newly created subvolume to a qgroup. This option can be given multiple +times. *sync* [subvolid...]:: Wait until given subvolume(s) are completely removed from the filesystem after