0

My root partition is running out of space and I have no other SATA slots. I have a BTRFS raid0 and I would like to shrink one of the partitions I used for the BTRFS-raid0 and add it to the root partition (make it raid0). How can I do that?

The layout is as follows:

  • /dev/sda
    • sda1 - 500M - EFI - /boot
    • sda2 - 10G - Root - /
    • sda3 - 455.3G - btrfs-raid0-disk0 - /data
  • /dev/sdb - 465.8G - btrfs-raid0-disk1 - /data
  • /dev/sdc - 931.5G - btrfs-raid0-disk2 - /data
  • /dev/sdd
    • sdd1 - 465.8G - btrfs-raid0-disk3 - /data

Now, I want to shrink /dev/sdd1 from 465.8G to 410G, create /dev/sdd2, combine /dev/sda2 and /dev/sdd2 using btrfs raid0 and use it as root.

In Short: How can I shrink one of the partitions in a btrfs multi device (raid0) filesystem.

  • Please don't mind my wonky / unsafe configuration. I use the server and the raid to store mostly AOSP source code and the server hardware is close to junk. I don't mind losing any of them. At the same time, I would like to shrink the raid0 without data loss. – berinaniesh Nov 01 '22 at 02:59
  • 1
    either you don't care and use all space and have a data loss strategy or you care and don't do such activities. please decide. However I am not want to write like a moral apostles. the nearest solution might be found [here](https://askubuntu.com/questions/75120/how-can-i-resize-and-shrink-a-btrfs-partition) – djdomi Nov 01 '22 at 08:29
  • @djdomi. The whole raid is about 2.5 TB. It is filled up to 2 TB. I don't care if my hard disk fails and I have to re download the data. But, I don't want to delete the data myself shrink the disk. And the link you attached shows answer to shrinking a btrfs file system and doesn't say anything about multi device volumes. I added the previous comment just so that people would stop advising me about the problems of raid 0. – berinaniesh Nov 01 '22 at 10:50

0 Answers0