Basic usage of Btrfs on Arch Linux

Introduction

I mainly refer to ArchWiki and btrfs Wiki. did.

Installation

Please install btrfs-progs.

Creating a file system

Label designation

Use the mkfs.btrfs command to create the file system. The only required argument is the partition, but you can set the label by using the -L option.

# mkfs.btrfs -L mylabel /dev/partition

Using RAID

The -m option specifies the meta RAID mode and the -d option specifies the data RAID mode.

# mkfs.btrfs -m raid1 -d raid1 /dev/sda /dev/sdb

Edit / etc / fstab to set mount options and mount with mount -a.

/etc/fstab


UUID={uuid}	/data		btrfs		noatime,compress-force=lzo,space_cache	0	0
Option Description
noatime Does not record the last access date and time. The purpose is to improve performance.
compress-force Use the transparent compression function unless the file size increases.
space_cache Enable free space cache.

Here are some ways to verify that RAID is actually working:

# btrfs filesystem df /data
Data, RAID1: total=1.00GiB, used=512.00KiB
System, RAID1: total=8.00MiB, used=16.00KiB
Metadata, RAID1: total=1.00GiB, used=112.00KiB
GlobalReserve, single: total=3.25MiB, used=0.00B

# btrfs filesystem show /data
Label: {label} uuid: {uuid}
Total devices 2 FS bytes used 640.00KiB
devid    1 size 1.82TiB used 2.01GiB path /dev/sda
devid    2 size 1.82TiB used 2.01GiB path /dev/sdb

Recommended Posts

Basic usage of Btrfs on Arch Linux
jblas on Arch Linux
Basic usage of flask-classy
Basic usage of Jinja2
Basic usage of SQLAlchemy
Install Minecraft on Arch Linux
Super basic usage of pytest
Downgrade Mcomix on Arch Linux
Basic usage of PySimple GUI
(Beginner) Basic usage of Datastore on Google App Engine
Basic usage of Pandas Summary
Basic usage of Python f-string
Setting up OpenSSH on Arch Linux
Basic knowledge of Linux and basic commands
Install Arch Linux on DeskMini A300
Completion of docker command on Linux
View disk usage on personal Linux
Rip Music CDs on Arch Linux
[Linux] Review of frequently used basic commands 2
Build an NFS server on Arch Linux
Build a Samba server on Arch Linux
[Linux] Review of frequently used basic commands
Until you install Arch Linux on VMware
[Linux] Review of commands for deploying on AWS
Linux command <Basic 2>
[2020July] Check the UDID of the iPad on Linux
Cross-compile windows version from nim on arch | linux
[Basic] linux command
Basic LINUX commands
Deliver OBS footage to Zoom on Arch Linux
Linux command <Basic 1>
Arch Linux Recommendation
Build an Arch Linux environment on Raspberry Pi
[Introduction to Python] Basic usage of lambda expressions
Take your own peak memory usage on Linux & Python
How to use C216 Audio Controller on Arch Linux
Make your cursor a photo of your choice on Linux
Make a note of the list of basic Pandas usage
Native playback of DSD sound source on Linux desktop
Install Docker on Arch Linux and run it remotely
[Introduction to Python] Basic usage of the library matplotlib
Announcing the availability of Java 11 LTS on Amazon Linux 2
Daemonizing processes on Linux
Linux (WSL) on Windows
NAT router on Linux
Linux basic command memorandum
Usage of Python locals ()
Meaning of Linux permissions
Basic operation of Pandas
python basic on windows ②
Basic knowledge about Linux
Develop .NET on Linux
Wake on lan on Linux
[Linux] Basic command summary
Monitor traffic on Linux
Basic knowledge of Python
Update vscode on linux
Try NeosVR on Linux
Check capacity on Linux
Arch Linux installation notes
LiveUSB creation on Linux