BTRFS

Vedi anche

  • Using Btrfs with Multiple Devices - btrfs Wiki 1

  • Btrfs - ArchWiki 2

RAID

Comandi

Run as user

Instruction number

root

*

Con questi esempi si da per scontato che un RAID 1 BTRFS (non BTRFS over mdadm RAID) è montato su /data.

Nota

After creating, adding or removing devices from an array always run the balance operation. You may want to use GNU screen to put the process in background, like this

apt-get install screen
screen btrfs balance start /data

Creazione

Run as user

Instruction number

root

*

  1. crea l’array

    mkfs.btrfs -m raid1 -d raid1 /dev/sda1 /dev/sdb1
    
  2. monta normalmente

    mount /dev/sdb1 /data
    
  3. To add new partitions, for example /dev/sdc1 and /dev/sdd1, run

    btrfs device add /dev/sdc1 /dev/sdd1 /data
    
  4. esegui l’azione di balancing

Rimuovere devices

Run as user

Instruction number

root

*

  1. rimuovi due devices contemporaneamente

    btrfs device delete /dev/sdc1 /dev/sdd1 /data
    
  2. esegui l’azione di balancing

Sostituire un device

Run as user

Instruction number

root

*

  1. replace /dev/old with /dev/new. This operation should run in background

    btrfs replace start /dev/old /dev/new /data
    
  2. controllo

    btrfs replace status /data
    

Convert metadata profile

You can clone partitions with dd from HDDs to SSDs. After that run:

screen btrfs balance start -v -mconvert=single /data

Controllo utilizzo

Run as user

Instruction number

root

*

btrfs filesystem usage /data
btrfs filesystem df /data

Note

1

https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices unknown license

2

https://wiki.archlinux.org/index.php/Btrfs GNU Free Documentation License 1.3 or later, Copyright (c) ArchWiki contributors