0

Assume a multi-device btrfs with data profile single and metadata profile mirrored. The first disk is almost full. The second disk is large enough to hold all data of the whole filesystem.

The first disk needs replacement - is there a way to drain the data from the first disk, like e.g. some btrfs balance filter?

There is devid=1 to select data of the first disk only, but how to tell btrf balanceto shift all that data to the second disk?

Martin
  • 184
  • 10
  • This question would be better for a different Stack Exchange site. Having said that, I'm not sure if you are looking for `btrfs device remove ...` or perhaps `btrfs replace ...`. If you do replace, you may need to `btrfs filesystem resize ...`. – rickhg12hs Feb 03 '22 at 01:26
  • Yes, exactly what I was looking for, I had missed those in the docs – Martin Feb 04 '22 at 16:49

1 Answers1

0

To remove a device and have its contents transferred to the remaining devices, you can use btrfs device remove ....

To replace a device you can use btrfs replace .... Afterwards you may need to btrfs filesystem resize ....

rickhg12hs
  • 10,638
  • 6
  • 24
  • 42