Balance Failed after Adding Drives and Changing RAID Type

Hi all,

I’ve started using Rockstor for the first time and have ran into an issue and would like advice on how to proceed. I moved information off of my old windows server onto my Rockstor server by copying all of the information on it to a single drive 12tb pool. After the information transferred I shut off my old windows server with the hops of taking the 3 3tb drives and adding them to the 12tb pool and using raid 10. After changing the RAID type and adding the drives it started the re-balance. The re-balance went on for about two weeks and only got to 18%. Today it finally failed with the below error. Should I just try another re-balance? If you need more then the error code below please just let me know and I see what I can retrieve. I’m a newbie to btrfs and rockstor so I appreciate your patience with me!

Error:
Error running a command. cmd = btrfs balance start -mconvert=raid10 -dconvert=raid10 /mnt2/Data. rc = 1. stdout = [’’]. stderr = [“ERROR: error during balancing ‘/mnt2/Data’: Invalid argument”, ‘There may be more info in syslog - try dmesg | tail’, ‘’]

Does anyone have any thoughts?

@Andrew_Tocco Welcome to the Rockstor community.

What amount of data / file count are we talking about here? The following:

Would either suggest a very slow drive and or your data / file size/count really calls for quotas to be disabled which is only supported in the now far more modern stable channel updates (as of writing anyway).

Is the 12TB drive an SMR drive, if so then it is not suitable for general NAS use anyway and most particularly not btrfs.

There is also the element that this balance (actually all Rockstor initiated balances currently) are complete, that is they will end up moving all the data on the pool. But in this case, that of changing the raid level, that is best anyway as then we ensure that all data is then at the new raid level.

This may well work, but with the indicated performance you really need quotas turned off and that is only supported in stable channel updates (you will see it as an option in the pools overview table or in each pool’s details page. Once that’s off a balance will be much much faster. I.e. see our now resolved (in stable channel) report of this by @maxhq :

https://github.com/rockstor/rockstor-core/issues/1592

That issue also shows pics of how it appears in the newer interface code that surfaces this capability.

It’s a current weakness of btrfs but getting better and faster all the time. Larger arrays often just don’t work at a reasonable ‘pace’, especially during balance, when quotas are enabled.

Also how much memory (RAM) does this machine have?

There is a good chance you can get this resolved by just re-initiating the balance, which should pickup from where it left off, but the performance, especially during a balance, is much improved with quotas disabled and that’s a stable channel only thing currently. What version of Rockstor are you using?

Incidentally if the stable channel subscription just doesn’t fit / is not an option then first (after at least subscribing to the testing channel and applying all updates) to turn off quotas you will need to (as the root user):

btrfs quota disable /mnt2/Data

Which will then break non stable channel Rockstor until they are re-enabled (as of writing). So you are stuck in the command line until they are re-enabled.

And then from your quoted error report the command you need to run manually (as the root user) would be:

btrfs balance start -mconvert=raid10 -dconvert=raid10 /mnt2/Data

However this is all a bit risky if you are not familiar with the command line and in fact the addition of the other disks may also still be in progress, so it would also be helpful to paste the output of the following command:

btrfs fi show

and

btrfs fi usage /mnt2/Data

and if you end up going the command line route then:

btrfs balance status /mnt2/Data

should show you the progress of any ongoing balance, In fact you could start with this one just in case there is still one running. You will have to execute it repeatedly to get report of the status at the time of execution.

Hope that helps and do consider supporting Rockstor development via a stable channel update, if you haven’t already, as there have been many improvements since the last testing channel release and more notable since the iso.