BTRFS#
Vedi anche
RAID#
Comandi#
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#
create the array
mkfs.btrfs --csum xxhash -m raid1 -d raid1 /dev/sda1 /dev/sdb1
monta normalmente
mount /dev/sdb1 /data
To add new partitions, for example
/dev/sdc1
and/dev/sdd1
, runbtrfs device add /dev/sdc1 /dev/sdd1 /data
esegui l’azione di balancing
Rimuovere devices#
rimuovi due devices contemporaneamente
btrfs device delete /dev/sdc1 /dev/sdd1 /data
esegui l’azione di balancing
Sostituire un device#
replace
/dev/old
with/dev/new
. This operation should run in backgroundbtrfs replace start /dev/old /dev/new /data
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#
btrfs filesystem usage /data
btrfs filesystem df /data
Note