1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| ## eg
mkfs.btrfs -L root /dev/nvme0n1p3
mkfs.btrfs -L disk /dev/sdc
## show
~> sudo btrfs filesystem show
Label: 'root' uuid: 47c7555a-5a1f-4b19-b251-21ee9c40b398
Total devices 1 FS bytes used 10.28GiB
devid 1 size 200.59GiB used 15.02GiB path /dev/nvme0n1p3
Label: 'disk' uuid: 6ccbdbf6-54b2-49be-ad73-7736146ea43a
Total devices 1 FS bytes used 193.96GiB
devid 2 size 931.51GiB used 196.06GiB path /dev/sda
## --help
~ ᐅ mkfs.btrfs --help
Usage: mkfs.btrfs [options] dev [ dev ... ]
Options:
allocation profiles:
-d|--data PROFILE data profile, raid0, raid1, raid1c3, raid1c4, raid5, raid6, raid10, dup or single
-m|--metadata PROFILE metadata profile, values like for data profile
-M|--mixed mix metadata and data together
features:
--csum TYPE
--checksum TYPE checksum algorithm to use, crc32c (default), xxhash, sha256, blake2
-n|--nodesize SIZE size of btree nodes
-s|--sectorsize SIZE data block size (may not be mountable by current kernel)
-O|--features LIST comma separated list of filesystem features (use '-O list-all' to list features)
-R|--runtime-features LIST comma separated list of runtime features (use '-R list-all' to list runtime features)
-L|--label LABEL set the filesystem label
-U|--uuid UUID specify the filesystem UUID (must be unique)
creation:
-b|--byte-count SIZE set filesystem size to SIZE (on the first device)
-r|--rootdir DIR copy files from DIR to the image root directory
--shrink (with --rootdir) shrink the filled filesystem to minimal size
-K|--nodiscard do not perform whole device TRIM
-f|--force force overwrite of existing filesystem
general:
-q|--quiet no messages except errors
-v|--verbose increase verbosity level, default is 1
-V|--version print the mkfs.btrfs version and exit
--help print this help and exit
deprecated:
-l|--leafsize SIZE deprecated, alias for nodesize
|