Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

RFE: add function 'bd_btrfs_replace_device' to btrfs plugin

Aperta
#573 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c, linux

Direzione di ricerca

The request is to add a bd_btrfs_replace_device function to the btrfs plugin, wrapping btrfs replace start as an alternative to the add-then-remove sequence. Read the existing btrfs plugin device-management functions first, using the linked UDisks BTRFS documentation as the reference for the expected behaviour. Done means a new function, its test coverage, and a note on the size caveat that the replacement device must be at least as large as the source.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement help wanted

http://storaged.org/doc/udisks2-api/latest/gdbus-org.freedesktop.UDisks2.Filesystem.BTRFS.html

Instead of AddDevice followed by RemoveDevice, it's preferred to use btrfs replace. Both btrfs device add/remove imply file system resize, and also a relatively expensive balance. Whereas replace is a variation on scrub, and is a sort of virtual and temporary raid1 between the device being replaced and the new device. Both devices are used for reads and writes, so there's better safety as well as performance.

There are two current caveats: the replacement block device must be equal to or larger than the device being replaced; and once replacement is complete, there is no automatic resize (grow) to take advantage of space for a larger device.

It's actually more expedient to do a minimal resize (shrink) of a device being replaced, in order to make it possible to use replace instead of add followed by remove.

man btrfs replace
       start [-Bfr] <srcdev>|<devid> <targetdev> <path>

_Originally posted by @cmurf in https://github.com/storaged-project/udisks/issues/803

Lingua principale
C
Stelle
137
Fork
64
Merge medio
22h 21m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di storaged-project/libblockdev

Tutte le issue di storaged-project/libblockdev

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.