{
    "content": [
        {
            "type": "text",
            "text": "# btrfs-subvolume (man)\n\n## NAME\n\nbtrfs-subvolume - manage btrfs subvolumes\n\n## SYNOPSIS\n\nbtrfs subvolume <subcommand> [<args>]\n\n## DESCRIPTION\n\nbtrfs subvolume is used to create/delete/list/show btrfs subvolumes and snapshots.\n\n## TLDR\n\n> Manage btrfs subvolumes and snapshots.\n\n- Create a new empty subvolume:\n  `sudo btrfs {{su|subvolume}} {{c|create}} {{path/to/new_subvolume}}`\n- List all subvolumes and snapshots in the specified filesystem:\n  `sudo btrfs {{su|subvolume}} {{l|list}} {{path/to/btrfs_filesystem}}`\n- Delete a subvolume:\n  `sudo btrfs {{su|subvolume}} {{d|delete}} {{path/to/subvolume}}`\n- Create a [r]ead-only snapshot of an existing subvolume:\n  `sudo btrfs {{su|subvolume}} {{sn|snapshot}} -r {{path/to/source_subvolume}} {{path/to/target}}`\n- Create a read-write snapshot of an existing subvolume:\n  `sudo btrfs {{su|subvolume}} {{sn|snapshot}} {{path/to/source_subvolume}} {{path/to/target}}`\n- Show detailed information about a subvolume:\n  `sudo btrfs {{su|subvolume}} {{sh|show}} {{path/to/subvolume}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (2 subsections)\n- **SUBVOLUME FLAGS** (1 subsections)\n- **NESTED SUBVOLUMES** (1 subsections)\n- **MOUNT OPTIONS**\n- **INODE NUMBERS** (1 subsections)\n- **PERFORMANCE**\n- **SUBVOLUME AND SNAPSHOT** (1 subsections)\n- **SUBCOMMAND** (9 subsections)\n- **EXAMPLES** (1 subsections)\n- **EXIT STATUS**\n- **AVAILABILITY**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "btrfs-subvolume",
        "section": "",
        "mode": "man",
        "summary": "btrfs-subvolume - manage btrfs subvolumes",
        "synopsis": "btrfs subvolume <subcommand> [<args>]",
        "tldr_summary": "Manage btrfs subvolumes and snapshots.",
        "tldr_examples": [
            {
                "description": "Create a new empty subvolume",
                "command": "sudo btrfs {{su|subvolume}} {{c|create}} {{path/to/new_subvolume}}"
            },
            {
                "description": "List all subvolumes and snapshots in the specified filesystem",
                "command": "sudo btrfs {{su|subvolume}} {{l|list}} {{path/to/btrfs_filesystem}}"
            },
            {
                "description": "Delete a subvolume",
                "command": "sudo btrfs {{su|subvolume}} {{d|delete}} {{path/to/subvolume}}"
            },
            {
                "description": "Create a [r]ead-only snapshot of an existing subvolume",
                "command": "sudo btrfs {{su|subvolume}} {{sn|snapshot}} -r {{path/to/source_subvolume}} {{path/to/target}}"
            },
            {
                "description": "Create a read-write snapshot of an existing subvolume",
                "command": "sudo btrfs {{su|subvolume}} {{sn|snapshot}} {{path/to/source_subvolume}} {{path/to/target}}"
            },
            {
                "description": "Show detailed information about a subvolume",
                "command": "sudo btrfs {{su|subvolume}} {{sh|show}} {{path/to/subvolume}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [
            "If  we want to delete a subvolume called foo from a btrfs volume mounted at /mnt/bar we could",
            "run the following:",
            "btrfs subvolume delete /mnt/bar/foo"
        ],
        "see_also": [
            {
                "name": "btrfs-qgroup",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-qgroup/8/json"
            },
            {
                "name": "btrfs-quota",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-quota/8/json"
            },
            {
                "name": "btrfs-send",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/btrfs-send/8/json"
            },
            {
                "name": "mkfs.btrfs",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkfs.btrfs/8/json"
            },
            {
                "name": "mount",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mount/8/json"
            },
            {
                "name": "BTRFS-SUBVOLUME",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/BTRFS-SUBVOLUME/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": [
                    {
                        "name": "NOTE:",
                        "lines": 30
                    },
                    {
                        "name": "NOTE:",
                        "lines": 9
                    }
                ]
            },
            {
                "name": "SUBVOLUME FLAGS",
                "lines": 16,
                "subsections": [
                    {
                        "name": "NOTE:",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "NESTED SUBVOLUMES",
                "lines": 10,
                "subsections": [
                    {
                        "name": "Case study: system root layouts",
                        "lines": 18
                    }
                ]
            },
            {
                "name": "MOUNT OPTIONS",
                "lines": 23,
                "subsections": []
            },
            {
                "name": "INODE NUMBERS",
                "lines": 5,
                "subsections": [
                    {
                        "name": "NOTE:",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "PERFORMANCE",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "SUBVOLUME AND SNAPSHOT",
                "lines": 4,
                "subsections": [
                    {
                        "name": "NOTE:",
                        "lines": 25
                    }
                ]
            },
            {
                "name": "SUBCOMMAND",
                "lines": 1,
                "subsections": [
                    {
                        "name": "create [options] [<dest>/]<name> [[<dest2>/]<name2> ...]",
                        "lines": 20
                    },
                    {
                        "name": "delete [options] [<subvolume> [<subvolume>...]], delete -i|--subvolid <subvolid> <path>",
                        "lines": 44
                    },
                    {
                        "name": "find-new <subvolume> <last_gen>",
                        "lines": 2
                    },
                    {
                        "name": "get-default <path>",
                        "lines": 4
                    },
                    {
                        "name": "list [options] [-G [+|-]<value>] [-C [+|-]<value>] [--sort=rootid,gen,ogen,path] <path>",
                        "lines": 70
                    },
                    {
                        "name": "set-default [<subvolume>|<id> <path>]",
                        "lines": 10
                    },
                    {
                        "name": "show [options] <path>",
                        "lines": 25
                    },
                    {
                        "name": "snapshot [-r] [-i <qgroupid>] <source> <dest>|[<dest>/]<name>",
                        "lines": 13
                    },
                    {
                        "name": "sync <path> [subvolid...]",
                        "lines": 10
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Deleting a subvolume",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AVAILABILITY",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "btrfs-subvolume - manage btrfs subvolumes\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "btrfs subvolume <subcommand> [<args>]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "btrfs subvolume is used to create/delete/list/show btrfs subvolumes and snapshots.\n\nA  BTRFS  subvolume is a part of filesystem with its own independent file/directory hierarchy\nand inode number namespace. Subvolumes can share file extents. A snapshot is also  subvolume,\nbut with a given initial content of the original subvolume. A subvolume has always inode num‐\nber 256.\n",
                "subsections": [
                    {
                        "name": "NOTE:",
                        "content": "A  subvolume  in  BTRFS  is  not like an LVM logical volume, which is block-level snapshot\nwhile BTRFS subvolumes are file extent-based.\n\nA subvolume looks like a normal directory, with some additional operations  described  below.\nSubvolumes  can be renamed or moved, nesting subvolumes is not restricted but has some impli‐\ncations regarding snapshotting. The numeric id (called subvolid or rootid) of  the  subvolume\nis persistent and cannot be changed.\n\nA subvolume in BTRFS can be accessed in two ways:\n\n• like any other directory that is accessible to the user\n\n• like a separately mounted filesystem (options subvol or subvolid)\n\nIn  the  latter case the parent directory is not visible and accessible. This is similar to a\nbind mount, and in fact the subvolume mount does exactly that.\n\nA freshly created filesystem is also a subvolume, called top-level, internally has an  id  5.\nThis subvolume cannot be removed or replaced by another subvolume. This is also the subvolume\nthat  will  be  mounted  by default, unless the default subvolume has been changed (see btrfs\nsubvolume set-default).\n\nA snapshot is a subvolume like any other, with given initial content. By  default,  snapshots\nare created read-write. File modifications in a snapshot do not affect the files in the orig‐\ninal subvolume.\n\nSubvolumes  can  be  given capacity limits, through the qgroups/quota facility, but otherwise\nshare the single storage pool of the whole btrfs filesystem. They may even share data between\nthemselves (through deduplication or snapshotting).\n"
                    },
                    {
                        "name": "NOTE:",
                        "content": "A snapshot is not a backup: snapshots work by use of  BTRFS'  copy-on-write  behaviour.  A\nsnapshot  and  the original it was taken from initially share all of the same data blocks.\nIf that data is damaged in some way (cosmic rays, bad disk sector, accident with dd to the\ndisk), then the snapshot and the original will both be damaged. Snapshots  are  useful  to\nhave local online \"copies\" of the filesystem that can be referred back to, or to implement\na  form  of  deduplication,  or  to fix the state of a filesystem for making a full backup\nwithout anything changing underneath it. They do not in  themselves  make  your  data  any\nsafer.\n"
                    }
                ]
            },
            "SUBVOLUME FLAGS": {
                "content": "The  subvolume  flag  currently implemented is the ro property (read-only status). Read-write\nsubvolumes have that set to false, snapshots as true.  In addition to that, a plain  snapshot\nwill also have last change generation and creation generation equal.\n\nRead-only snapshots are building blocks of incremental send (see btrfs-send(8)) and the whole\nuse  case relies on unmodified snapshots where the relative changes are generated from. Thus,\nchanging the subvolume flags from read-only to read-write will break the assumptions and  may\nlead to unexpected changes in the resulting incremental stream.\n\nA  snapshot  that  was  created by send/receive will be read-only, with different last change\ngeneration, read-only and with set  receiveduuid  which  identifies  the  subvolume  on  the\nfilesystem  that  produced  the  stream.  The use case relies on matching data on both sides.\nChanging the subvolume to read-write after it has been received requires  to  reset  the  re‐\nceiveduuid. As this is a notable change and could potentially break the incremental send use\ncase, performing it by btrfs property set requires force if that is really desired by user.\n",
                "subsections": [
                    {
                        "name": "NOTE:",
                        "content": "The  safety  checks  have  been  implemented in 5.14.2, any subvolumes previously received\n(with a valid receiveduuid) and read-write status may exist and could still lead to prob‐\nlems with send/receive. You can use btrfs subvolume show to identify  them.  Flipping  the\nflags  to  read-only  and back to read-write will reset the receiveduuid manually.  There\nmay exist a convenience tool in the future.\n"
                    }
                ]
            },
            "NESTED SUBVOLUMES": {
                "content": "There are no restrictions for subvolume creation, so it's up to  the  user  how  to  organize\nthem,  whether  to  have a flat layout (all subvolumes are direct descendants of the toplevel\none), or nested.\n\nWhat should be mentioned early is that a snapshotting is not recursive, so a subvolume  or  a\nsnapshot  is effectively a barrier and no files in the nested appear in the snapshot. Instead\nthere's a stub subvolume (also sometimes empty subvolume with the same name as original  sub‐\nvolume,  with inode number 2).  This can be used intentionally but could be confusing in case\nof nested layouts.\n",
                "subsections": [
                    {
                        "name": "Case study: system root layouts",
                        "content": "There are two ways how the system root directory and subvolume layout could be organized. The\ninteresting use case for root is to allow rollbacks to previous version, as one atomic  step.\nIf  the  entire  filesystem hierarchy starting in / is in one subvolume, taking snapshot will\nencompass all files. This is easy for the snapshotting part but has undesirable  consequences\nfor  rollback.  For example, log files would get rolled back too, or any data that are stored\non the root filesystem but are not meant to be rolled back either (database files, VM images,\n...).\n\nHere we could utilize the snapshotting barrier mentioned above, each  directory  that  stores\ndata to be preserved across rollbacks is it's own subvolume. This could be e.g. /var. Further\nmore-fine  grained partitioning could be done, e.g.  adding separate subvolumes for /var/log,\n/var/cache etc.\n\nThat there are separate subvolumes requires separate actions to take the snapshots  (here  it\ngets  disconnected  from the system root snapshots). This needs to be taken care of by system\ntools, installers together with selection of which directories are highly recommended  to  be\nseparate subvolumes.\n"
                    }
                ]
            },
            "MOUNT OPTIONS": {
                "content": "Mount options are of two kinds, generic (that are handled by VFS layer) and specific, handled\nby  the  filesystem.  The  following  list shows which are applicable to individual subvolume\nmounts, while there are more options that always affect the whole filesystem:\n\n• generic: noatime/relatime/..., nodev, nosuid, ro, rw, dirsync\n\n• fs-specific: compress, autodefrag, nodatacow, nodatasum\n\nAn example of whole filesystem options is e.g.  spacecache,  rescue,  device,  skipbalance,\netc.  The  exceptional  options are subvol and subvolid that are actually used for mounting a\ngiven subvolume and can be specified only once for the mount.\n\nSubvolumes belong to a single filesystem and as implemented now all share the  same  specific\nmount options, changes done by remount have immediate effect. This may change in the future.\n\nMounting  a  read-write snapshot as read-only is possible and will not change the ro property\nand flag of the subvolume.\n\nThe name of the mounted subvolume is stored in file /proc/self/mountinfo in the 4th column:\n\n27 21 0:19 /subv1 /mnt rw,relatime - btrfs /dev/sda rw,spacecache\n^^^^^^\n",
                "subsections": []
            },
            "INODE NUMBERS": {
                "content": "A proper subvolume has always inode number 256. If a subvolume is nested and then a  snapshot\nis  taken,  then  the cloned directory entry representing the subvolume becomes empty and the\ninode has number 2. All other files and directories in the  target  snapshot  preserve  their\noriginal inode numbers.\n",
                "subsections": [
                    {
                        "name": "NOTE:",
                        "content": "Inode  number  is  not a filesystem-wide unique identifier, some applications assume that.\nPlease use pair subvolumeid:inodenumber for that purpose.  The subvolume id can be read by\nbtrfs inspect-internal rootid or by the ioctl BTRFSIOCINOLOOKUP.\n"
                    }
                ]
            },
            "PERFORMANCE": {
                "content": "Subvolume creation needs to flush dirty data that belong to the subvolume, this step may take\nsome time, otherwise once there's nothing else to do, the snapshot  is  instant  and  in  the\nmetadata it only creates a new tree root copy.\n\nSnapshot  deletion  has two phases: first its directory is deleted and the subvolume is added\nto a list, then the list is processed one by one and the data related to  the  subvolume  get\ndeleted.  This  is  usually called cleaning and can take some time depending on the amount of\nshared blocks (can be a lot of metadata updates), and the number of currently queued  deleted\nsubvolumes.\n",
                "subsections": []
            },
            "SUBVOLUME AND SNAPSHOT": {
                "content": "A  subvolume  is a part of filesystem with its own independent file/directory hierarchy. Sub‐\nvolumes can share file extents. A snapshot is also subvolume, but with a given  initial  con‐\ntent of the original subvolume.\n",
                "subsections": [
                    {
                        "name": "NOTE:",
                        "content": "A  subvolume  in  btrfs  is  not like an LVM logical volume, which is block-level snapshot\nwhile btrfs subvolumes are file extent-based.\n\nA subvolume looks like a normal directory, with some additional operations  described  below.\nSubvolumes  can be renamed or moved, nesting subvolumes is not restricted but has some impli‐\ncations regarding snapshotting.\n\nA subvolume in btrfs can be accessed in two ways:\n\n• like any other directory that is accessible to the user\n\n• like a separately mounted filesystem (options subvol or subvolid)\n\nIn the latter case the parent directory is not visible and accessible. This is similar  to  a\nbind mount, and in fact the subvolume mount does exactly that.\n\nA  freshly  created filesystem is also a subvolume, called top-level, internally has an id 5.\nThis subvolume cannot be removed or replaced by another subvolume. This is also the subvolume\nthat will be mounted by default, unless the default subvolume has been changed  (see  subcom‐\nmand set-default).\n\nA  snapshot  is a subvolume like any other, with given initial content. By default, snapshots\nare created read-write. File modifications in a snapshot do not affect the files in the orig‐\ninal subvolume.\n"
                    }
                ]
            },
            "SUBCOMMAND": {
                "content": "",
                "subsections": [
                    {
                        "name": "create [options] [<dest>/]<name> [[<dest2>/]<name2> ...]",
                        "content": "Create subvolume(s) at the destination(s).\n\nIf dest part of the path is not given, subvolume name will be created in  the  current\ndirectory.\n\nIf multiple desinations are given, then given options are applied to all subvolumes.\n\nIf  failure happens for any of the destinations, the command would still retry the re‐\nmaining destinations, but would return 1 to indicate  the  failure  (similar  to  what\nmkdir would do.\n\nOptions\n\n-i <qgroupid>\nAdd  the newly created subvolume to a qgroup. This option can be given multiple\ntimes.\n\n-p|--parents\nCreate any missing parent directories for each argument (like mkdir -p).\n"
                    },
                    {
                        "name": "delete [options] [<subvolume> [<subvolume>...]], delete -i|--subvolid <subvolid> <path>",
                        "content": "Delete the subvolume(s) from the filesystem.\n\nIf subvolume is not a subvolume, btrfs returns an error but  continues  if  there  are\nmore arguments to process.\n\nIf --subvolid is used, path must point to a btrfs filesystem. See btrfs subvolume list\nor btrfs inspect-internal rootid how to get the subvolume id.\n\nThe corresponding directory is removed instantly but the data blocks are removed later\nin  the  background.  The command returns immediately. See btrfs subvolume sync how to\nwait until the subvolume gets completely removed.\n\nThe deletion does not involve full transaction commit by default  due  to  performance\nreasons.   As a consequence, the subvolume may appear again after a crash.  Use one of\nthe --commit options to wait until the operation is safely stored on the device.\n\nDeleting subvolume needs sufficient permissions, by default the owner cannot delete it\nunless it's enabled by a mount option usersubvolrmallowed, or deletion  is  run  as\nroot.   The  default subvolume (see btrfs subvolume set-default) cannot be deleted and\nreturns error (EPERM) and this is logged to the system log. A  subvolume  that's  cur‐\nrently  involved  in send (see btrfs-send(8)) also cannot be deleted until the send is\nfinished. This is also logged in the system log.\n\nOptions\n\n-c|--commit-after\nwait for transaction commit at the end of the operation.\n\n-C|--commit-each\nwait for transaction commit after deleting each subvolume.\n\n-i|--subvolid <subvolid>\nsubvolume id to be removed instead of the  <path>  that  should  point  to  the\nfilesystem with the subvolume\n\n--delete-qgroup\nalso delete the qgroup 0/subvolid if it exists\n\n--no-delete-qgroup\ndo not delete the 0/subvolid qgroup (default)\n\n-v|--verbose\n(deprecated) alias for global -v option\n"
                    },
                    {
                        "name": "find-new <subvolume> <last_gen>",
                        "content": "List the recently modified files in a subvolume, after lastgen generation.\n"
                    },
                    {
                        "name": "get-default <path>",
                        "content": "Get the default subvolume of the filesystem path.\n\nThe output format is similar to subvolume list command.\n"
                    },
                    {
                        "name": "list [options] [-G [+|-]<value>] [-C [+|-]<value>] [--sort=rootid,gen,ogen,path] <path>",
                        "content": "List the subvolumes present in the filesystem path.\n\nFor every subvolume the following information is shown by default:\n\nID ID gen generation top level parentID path path\n\nwhere  ID  is subvolume's (root)id, generation is an internal counter which is updated\nevery transaction, parentID is the same as the parent subvolume's id, and path is the\nrelative path of the subvolume to the top level subvolume.  The subvolume's ID may  be\nused by the subvolume set-default command, or at mount time via the subvolid= option.\n\nOptions\n\nPath filtering:\n\n-o     Print only subvolumes below specified <path>. Note that this is not a recursive\ncommand, and won't show nested subvolumes under <path>.\n\n-a     print all the subvolumes in the filesystem and distinguish between absolute and\nrelative path with respect to the given path.\n\nField selection:\n\n-p     print  the  parent ID (parent here means the subvolume which contains this sub‐\nvolume).\n\n-c     print the ogeneration of the subvolume, aliases: ogen or origin generation.\n\n-g     print the generation of the subvolume (default).\n\n-u     print the UUID of the subvolume.\n\n-q     print the parent UUID of the subvolume (parent here means  subvolume  of  which\nthis subvolume is a snapshot).\n\n-R     print  the  UUID  of the sent subvolume, where the subvolume is the result of a\nreceive operation.\n\nType filtering:\n\n-s     only snapshot subvolumes in the filesystem will be listed.\n\n-r     only readonly subvolumes in the filesystem will be listed.\n\n-d     list deleted subvolumes that are not yet cleaned.\n\nOther:\n\n-t     print the result as a table.\n\nSorting:\n\nBy default the subvolumes will be sorted by subvolume ID ascending.\n\n-G [+|-]<value>\nlist subvolumes in the filesystem that its generation is >=, <= or = value. '+'\nmeans >= value, '-' means <= value, If there is neither '+' nor '-', it means =\nvalue.\n\n-C [+|-]<value>\nlist subvolumes in the filesystem that its ogeneration is >=, <=  or  =  value.\nThe usage is the same to -G option.\n\n--sort=rootid,gen,ogen,path\nlist  subvolumes  in  order by specified items.  you can add + or - in front of\neach items, + means ascending, - means descending. The default is ascending.\n\nfor  --sort  you  can  combine  some   items   together   by   ,,   just   like\n--sort=+ogen,-gen,path,rootid.\n"
                    },
                    {
                        "name": "set-default [<subvolume>|<id> <path>]",
                        "content": "Set the default subvolume for the (mounted) filesystem.\n\nSet  the  default  subvolume  for the (mounted) filesystem at path. This will hide the\ntop-level subvolume (i.e. the one mounted with subvol=/ or subvolid=5).  Takes  action\non next mount.\n\nThere  are two ways how to specify the subvolume, by id or by the subvolume path.  The\nid can be obtained from btrfs subvolume list btrfs subvolume show or btrfs inspect-in‐\nternal rootid.\n"
                    },
                    {
                        "name": "show [options] <path>",
                        "content": "Show more information about a subvolume (UUIDs,  generations,  times,  flags,  related\nsnapshots).\n\n/mnt/btrfs/subvolume\nName:                   subvolume\nUUID:                   5e076a14-4e42-254d-ac8e-55bebea982d1\nParent UUID:            -\nReceived UUID:          -\nCreation time:          2018-01-01 12:34:56 +0000\nSubvolume ID:           79\nGeneration:             2844\nGen at creation:        2844\nParent ID:              5\nTop level ID:           5\nFlags:                  -\nSnapshot(s):\n\nOptions\n\n-r|--rootid <ID>\nshow details about subvolume with root ID, looked up in path\n\n-u|--uuid UUID\nshow details about subvolume with the given UUID, looked up in path\n"
                    },
                    {
                        "name": "snapshot [-r] [-i <qgroupid>] <source> <dest>|[<dest>/]<name>",
                        "content": "Create a snapshot of the subvolume source with the name name in the dest directory.\n\nIf  only dest is given, the subvolume will be named the basename of source.  If source\nis not a subvolume, btrfs returns an error.\n\nOptions\n\n-r     Make the new snapshot read only.\n\n-i <qgroupid>\nAdd the newly created subvolume to a qgroup. This option can be given  multiple\ntimes.\n"
                    },
                    {
                        "name": "sync <path> [subvolid...]",
                        "content": "Wait  until  given subvolume(s) are completely removed from the filesystem after dele‐\ntion. If no subvolume id is given, wait until all current deletion requests  are  com‐\npleted, but do not wait for subvolumes deleted in the meantime.\n\nIf the filesystem status changes to read-only then the waiting is interrupted.\n\nOptions\n\n-s <N> sleep N seconds between checks (default: 1)\n"
                    }
                ]
            },
            "EXAMPLES": {
                "content": "",
                "subsections": [
                    {
                        "name": "Deleting a subvolume",
                        "content": "If  we want to delete a subvolume called foo from a btrfs volume mounted at /mnt/bar we could\nrun the following:\n\nbtrfs subvolume delete /mnt/bar/foo\n"
                    }
                ]
            },
            "EXIT STATUS": {
                "content": "btrfs subvolume returns a zero exit status if it succeeds. A non-zero value  is  returned  in\ncase of failure.\n",
                "subsections": []
            },
            "AVAILABILITY": {
                "content": "btrfs    is    part    of    btrfs-progs.     Please    refer   to   the   documentation   at\nhttps://btrfs.readthedocs.io.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "btrfs-qgroup(8), btrfs-quota(8), btrfs-send(8), mkfs.btrfs(8), mount(8)\n\n\n6.6.3                                       Mar 31, 2024                          BTRFS-SUBVOLUME(8)",
                "subsections": []
            }
        }
    }
}