Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

RFE: add function 'bd_btrfs_replace_device' to btrfs plugin

Abierto
#573 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
c, linux

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
C
Estrellas
137
Forks
64
Merge medio
1 d 5 h
PR fusionados (30 d)
3

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de storaged-project/libblockdev

Todos los issues de storaged-project/libblockdev

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.