Re: Rebalancing Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you! That looks like it would work.

On Sat, Jul 11, 2020 at 11:58 AM Andrei Borzenkov <arvidjaar@xxxxxxxxx> wrote:
>
> 11.07.2020 17:42, Stirling Westrup пишет:
> > I have a BTRFS built with two devices md0 and md1 on a server. I wish
> > to move as much data as will fit from md0 to md1, but I cannot figure
> > out a balance command that will do that.
> >
> > My use case is a file server with a fixed number of hard drive slots
> > and two raids. md0 is a raid using most of the slots with small
> > drives, and md1 is a raid using the remaining slots with large drives.
> > I'm trying to shrink md0, so I can remove some small drives and put in
> > new large drives to add to md1.
> >
> > I have read the notes on the balance command several times but I can't
> > figure out how to get it to do what I want, if it's even possible.
> >
>
> You should be able to shrink md0 which will relocate data beyond new
> size to another device(s). See example in btrfs-filesystem:
>
>
>        $ btrfs filesystem resize -1G /path
>
>        $ btrfs filesystem resize 1:-1G /path
>
>        Shrink size of the filesystem’s device id 1 by 1GiB. The first
> syntax expects a
>        device with id 1 to exist, otherwise fails. The second is
> equivalent and more
>        explicit. For a single-device filesystem it’s typically not
> necessary to specify the
>        devid though.
>
>
> This assumes you are using single or dup profiles, as other profiles
> require at least two devices anyway and you may not be able to shrink
> md0 too far.



-- 
Stirling Westrup (he/him)
Programmer, Entrepreneur.
http://www.linkedin.com/in/swestrup
(+1) 514-626-0928




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux