Score:0

Shrink one of the disks in a multi device BTRFS filesystem

ug flag

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.

berinaniesh avatar
ug flag
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.
djdomi avatar
za flag
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)
berinaniesh avatar
ug flag
@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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.