Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

RFE: add function 'bd_btrfs_replace_device' to btrfs plugin

オープン
#573 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
c, linux

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
C
スター
137
フォーク
64
平均マージ
22時間 21分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

storaged-project/libblockdev のほかの issue

storaged-project/libblockdev の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。