mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-31 02:41:46 +00:00
23 lines
676 B
Plaintext
23 lines
676 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, linux]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# mkfs.btrfs
|
|
|
|
> Create a BTRFS filesystem.
|
|
> Defaults to `raid1`, which specifies 2 copies of a data block spread across 2 different devices.
|
|
> More information: <https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html>.
|
|
|
|
- Create a btrfs filesystem on a single device:
|
|
|
|
`sudo mkfs.btrfs --metadata single --data single {{/dev/sda}}`
|
|
|
|
- Create a btrfs filesystem on multiple devices with raid1:
|
|
|
|
`sudo mkfs.btrfs --metadata raid1 --data raid1 {{/dev/sda}} {{/dev/sdb}} {{/dev/sdN}}`
|
|
|
|
- Set a label for the filesystem:
|
|
|
|
`sudo mkfs.btrfs --label "{{label}}" {{/dev/sda}} [{{/dev/sdN}}]`
|