[FileSystem] [ArchLinux] [Disk Encryption] [Btrfs] Btrfs

Source: Internet
Author: User

Fork from here http://www.cnblogs.com/hugetong/p/6914248.html

boot partition, MBR encryption: https://wiki.archlinux.org/index.php/Dm-crypt/Specialties#Securing_the_unencrypted_boot_partition

First, I chose to create btrfs on Luks. View the Btrfs section of the document above.

1. Btrfs does not support swap file and must use swap partition Https://wiki.archlinux.org/index.php/Btrfs#Swap_file

2. It is not recommended to use the Btrfs file system directly on bare disks. Https://wiki.archlinux.org/index.php/Btrfs#Partitionless_Btrfs_disk

3. Btrfs with compression improves performance. Https://wiki.archlinux.org/index.php/Btrfs#Compression

4. New Concept Subvolumes. Https://wiki.archlinux.org/index.php/Btrfs#Subvolumes

This is more detailed, speak more clearly, the above is not very clear on the said ... : Https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Subvolumes

Btrfs Document: Https://wiki.archlinux.org/index.php/Btrfs (with the pile above, obviously is a ...) )

Multiple disks can be composed of a pool,btrfs support raid0,1, 10, 5, 6. Https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices

5. Do not use Btrfs RAID5, RAID6 mode.

6. Common commands

Https://btrfs.wiki.kernel.org/index.php/Getting_started#Basic_Filesystem_Commands

7. Maximum capacity 70%??

Be aware this for that size, it would report the full when reaching is about 75%.

-----------------------------------------------------------

1. Initializing a Btrfs file system

1[Email protected] ~ # mkfs.btrfs-l Vd_root-f/dev/mapper/Vd_root:(Btrfs-progs v4.10.2See http://btrfs.wiki.kernel.org for more information.Label:vd_rootUUID:ba0b8b0b-8753-455b-90f6-422f61d59df1node Size:16384Sector Size:4096Filesystem Size: -. 00GiBBlock group Profiles:Data:single8. 00MiB Metadata:dup1. 00GiB System:dup8. 00MiBSSD Detected:noincompat features:extref, skinny-Metadatanumber of Devices:1devices:id SIZE PATH1     -.00gib/dev/mapper/Vd_root[email protected]~ #

2. Create a Subvolume

[Email protected] ~ # Btrfs Subvolume Create mnt/'mnt/real_root'

3. Create a snapshot (obviously from the command point of view, the snapshot is also a subvolume)

[Email protected] ~ # btrfs Subvolume snapshot mnt/real_root mnt/'mnt/real_root' inch ' Mnt/snapshot_of_real_root '

4. Set the default

set-default257  mnt                                      get-default  mnt      2575 Path Real_root

5. Deleting a snapshot or Subvolume

[Email protected] ~ # Btrfs Subvolume list/root/mnt ID257Gen ATop level5Path Real_rootid258Gen -Top level5Path Snapshot_of_real_rootid259Gen ATop level5Path snapshot/Snapshot_of_real_root_2[email protected]~ # Btrfs Subvolume Create mnt/testcreate Subvolume'mnt/test'[email protected]~ # Btrfs Subvolume list/root/mnt ID257Gen ATop level5Path Real_rootid258Gen -Top level5Path Snapshot_of_real_rootid259Gen ATop level5Path snapshot/Snapshot_of_real_root_2id260Gen -Top level5path Test[email protected]~ # btrfs Subvolume Delete mnt/Test Delete subvolume (no-commit):'/root/mnt/test'[email protected]~ # Btrfs Subvolume list/root/mnt ID257Gen ATop level5Path Real_rootid258Gen -Top level5Path Snapshot_of_real_rootid259Gen ATop level5Path snapshot/Snapshot_of_real_root_2[email protected]~ #

6. According to the description in the document, choose Flat method to create Subvolume

Https://btrfs.wiki.kernel.org/index.php/SysadminGuide#Flat

[Email protected] ~# Find MNT mntmnt/real_rootmnt/real_root/rootmnt/real_root/homemnt/Snapshot[email protected]~ # Btrfs SubvolumeGet-defaultMntid257Gen -Top level5path Real_root[email protected]~# btrfs Subvolume list mnt ID257Gen -Top level5Path Real_rootid261Gen inTop level257Path real_root/Rootid262Gen -Top level257Path real_root/Home[email protected]~ #

[FileSystem] [ArchLinux] [Disk Encryption] [Btrfs] Btrfs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.