Outils pour utilisateurs

Outils du site


Panneau latéral

linux:btrfs (lu 26121 fois)

**Ceci est une ancienne révision du document !**

btrfs

Description

Commandes

Sous volume et snapshot

Pour créer un sous volume

btrfs subvolume create NOM_DU_SOUS-VOLUME

Pour faire un snapshot du sous volume

btrfs subvolume snapshot NOM_DU_SOUS-VOLUME NOM_SNAPSHOT

Pour afficher la liste des sous volume

btrfs subvolume list /chemin/du/montage

Pour affiche des infos sur un sous volumes ou un snaphot

btrfs subvolume show /chemin/du/sous-volume

Un snapshot est aussi un sous volume, on peut très bien supprimer son parent sans poser de problème

Maintenance

Faire un checkdisk sans modif

btrfsck /dev/sda1

Faire un checkdisk avec option de réparation

btrfs check --repair /dev/sda1

Vérifier le checksum des blocksd

btrfs scrub start /dev/sda1

Vous pouvez voir l’avancement avec la commande suivante

btrfs scrub status /dev/sda1

Pour arrêter le scrub

btrfs scrub cancel /dev/sda1

En cas de gros pépin

Hugo Mills on the btrfs mailing list wrote:Let's assume that you don't have a physical device failure (whichis a different set of tools -- mount -odegraded, btrfs dev delmissing). First thing to do is to take a btrfs-image -c9 -t4 of thefilesystem, and keep a copy of the output to show josef. smile Then start with -orecovery and -oro,recovery for pretty muchanything. If those fail, then look in dmesg for errors relating to the logtree -- if that's corrupt and can't be read (or causes a crash), usebtrfs-zero-log. If there's problems with the chunk tree -- the only one I've seenrecently was reporting something like "can't map address" -- thenchunk-recover may be of use.
After that, btrfsck is probably the next thing to try. If options -

s1, -s2, -s3 have any success, then btrfs-select-super will help byreplacing the superblock with one that works. If that's not going tobe useful, fall back to btrfsck --repair. Finally, btrfsck --repair --init-extent-tree may be necessary ifthere's a damaged extent tree. Finally, if you've got corruption inthe checksums, there's --init-csum-tree. Hugo.

linux/btrfs.1497216226.txt.gz · Dernière modification : de edmc73