suppose I have 2 btrfs filesystems:

  1. one mounted on /mnt/big spanning across /dev/sda /dev/sdb /dev/sdc /dev/sdd
  2. the other mounted on /mnt/small on a single drive: /dev/sde

How would I shrink the btrfs filesystem lying on /dev/sde to /dev/sde1?

The reason I want to do this is that /mnt/big is raid1 while /mnt/small is not and I would like to extend /mnt/big.



If you feel a little like a python developer, see the https://github.com/g2p/blocks. It already does a similar stuff - shrinking a partition a few bytes off, to make a little place for bcache/lvm metadata.

If you don't - at least you can post a feature request. It should be relatively easy to add such feature to the already existing code.

Personally, I've used the blocks for bcache and it worked well for me.

| improve this answer | |

I don't think that is possible without using another drive.

If you have all of /dev/sde under btrfs management, how would you create the partition /dev/sde1 on the drive /dev/sde without destroying the existing file system?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.