dslreports logo
 
    All Forums Hot Topics Gallery
spc
uniqs
25

Maxo
Your tax dollars at work.
Premium Member
join:2002-11-04
Tallahassee, FL

Maxo to paradigmfl

Premium Member

to paradigmfl

Re: Best way to manage btrfs inodes

%u279C  ~  sudo btrfs fi balance / -dusage=5
: unknown token '/'
usage: btrfs [filesystem] balance <command> [options] <path>
   or: btrfs [filesystem] balance <path>
 
    btrfs [filesystem] balance start [options] <path>
        Balance chunks across the devices
    btrfs [filesystem] balance pause <path>
        Pause running balance
    btrfs [filesystem] balance cancel <path>
        Cancel running or paused balance
    btrfs [filesystem] balance resume <path>
        Resume interrupted balance
    btrfs [filesystem] balance status [-v] <path>
        Show status of running or paused balance
 
'btrfs filesystem balance' command is deprecated, please use
'btrfs balance start' command instead.
%u279C  ~  sudo btrfs fi balance start / -dusage=5
Done, had to relocate 2 out of 200 chunks
%u279C  ~  
 

paradigmfl
join:2005-07-16

paradigmfl

Member

Sorry. Try:

sudo btrfs balance start /
 

Maxo
Your tax dollars at work.
Premium Member
join:2002-11-04
Tallahassee, FL

Maxo

Premium Member

said by paradigmfl:

Sorry. Try:

sudo btrfs balance start /
 

This ran much longer.
 ~  sudo btrfs balance start /
[sudo] password for david: 
Done, had to relocate 198 out of 198 chunks
 

paradigmfl
join:2005-07-16

paradigmfl

Member

You should have some usable free space now then. :) It's tricky though because of the way btrfs works the free space estimates are just that, estimates. Generally I would try to keep it under 90% reported utilization (by the regular 'df' command) at all time and at about 95% utilization start really deleting things.

I'm using it on a 4 disk Raid1 array with about 1 TB and it's been pretty stable. I've taken it down briefly to about 30 GB free space with no problems.

Even though you are using 'single' you can also use 'scrub' to check data integrity (although you will not be able to fix most errors with it since you are not using raid1).

btrfs scrub start /
 

You can check status with:

btrfs scrub status /
 

I also have an entry in my crontab file to do a automatic weekly scrub on Sunday at 4am:

0 4 * * 0 /usr/bin/btrfs scrub start /
 

Maxo
Your tax dollars at work.
Premium Member
join:2002-11-04
Tallahassee, FL

Maxo

Premium Member

Cool, thanks for the response.

Unfortunately I did not check the free space usage last night. The command I posted in the original posting freed up enough space to make my PC usable again. I'll report back with what the reported free space is now.

paradigmfl
join:2005-07-16

paradigmfl

Member

said by Maxo:

Cool, thanks for the response.

Unfortunately I did not check the free space usage last night. The command I posted in the original posting freed up enough space to make my PC usable again. I'll report back with what the reported free space is now.

It should be about the same as before. The balance was for distributing the data and meta information among the disks. Sometimes this is necessary under freak conditions where some space is there but not usable due to how it is distributed. I missed that it was actually working for you before. Oh well at least you learned some new stuff in case you need it later.

Maxo
Your tax dollars at work.
Premium Member
join:2002-11-04
Tallahassee, FL

Maxo

Premium Member

said by paradigmfl:

Oh well at least you learned some new stuff in case you need it later.

A constant goal of mine. Thanks for the assistance.