We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2016-05-04 11:23:00 +0200 |
Btrfs is a cool file system, but with all cool things there are also uncool trace-appearance, too. One of this is that the Btrfs seems to run full of space. This means it have a poor performance like a fraqmented FAT device. So we have to maintain our filesystem fequently.
Note: It´s better that your device is connected to the carger and not in use while doing this. Also do not boot your device while it is not finished
Doing by terminal
Enter Root mode
devel-su
Check the allocation (how many space is free / how unbalanced is your filesystem)
btrfs-balancer allocation
Note: everything over 90% is critical for the performance and the stability of the system
Balance the Btrfs Filesystem
btrfs-balancer balance
Now you can realocate the data chunks
btrfs balance start -dusage=55 /
If no space is left, try a lower number. But retry later with higher numbers up to 100%
Sometimes the Metadata also unbalanced, you can also realocate the metadata using this
btrfs balance start -musage=55 /
Note: The option -d stand for data and -m for metadata
Now we create a new loop device on the sd-card to outsorce space for balancing
First we have to check what name our sdcard have
ls /media/sdcard
Now we create a loop device on the sdcard and set it up to btrfs
dd if=/dev/zero of=/media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs bs=100M count=5
losetup -v -f /media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs
btrfs device add /dev/loop0 /
Now we can retry to balance the filesystem.
After balancing is finished, delete the Loop0 device. I´m not sure whats happens if you reboot / disconnect your sdcard while Loop0 is existing.
btrfs device delete /dev/loop0 /
Hope this will help other solving the btrfs problem
Thanks to: https://together.jolla.com/question/30822/root-and-home-disks-full-and-causing-various-problems/ @Juho, https://btrfs.wiki.kernel.org/index.php/Balance_Filters
2 | No.2 Revision |
Btrfs is a cool file system, but with all cool things there are also uncool trace-appearance, too. One of this is that the Btrfs seems to run full of space. This means it have a poor performance like a fraqmented FAT device. So we have to maintain our filesystem fequently.
Note: It´s better that your device is connected to the carger and not in use while doing this. Also do not boot your device while it is not finishedfinished. The device may be unresponsible for a long time, because it need a lot of performance, be patient and wait.
Doing by terminal
Enter Root mode
devel-su
Check the allocation (how many space is free / how unbalanced is your filesystem)
btrfs-balancer allocation
Note: everything over 90% is critical for the performance and the stability of the system
Balance the Btrfs Filesystem
btrfs-balancer balance
Now you can realocate the data chunks
btrfs balance start -dusage=55 /
If no space is left, try a lower number. But retry later with higher numbers up to 100%
Sometimes the Metadata also unbalanced, you can also realocate the metadata using this
btrfs balance start -musage=55 /
Note: The option -d stand for data and -m for metadata
Now we create a new loop device on the sd-card to outsorce space for balancing
First we have to check what name our sdcard have
ls /media/sdcard
Now we create a loop device on the sdcard and set it up to btrfs
dd if=/dev/zero of=/media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs bs=100M count=5
losetup -v -f /media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs
btrfs device add /dev/loop0 /
Now we can retry to balance the filesystem.
After balancing is finished, delete the Loop0 device. I´m not sure whats happens if you reboot / disconnect your sdcard while Loop0 is existing.
btrfs device delete /dev/loop0 /
Hope this will help other solving the btrfs problem
Thanks to: https://together.jolla.com/question/30822/root-and-home-disks-full-and-causing-various-problems/ @Juho, https://btrfs.wiki.kernel.org/index.php/Balance_Filters
3 | No.3 Revision |
Btrfs is a cool file system, but with all cool things there are also uncool trace-appearance, too. One of this is that the Btrfs seems to run full of space. This means it have a poor performance like a fraqmented FAT device. So we have to maintain our filesystem fequently.
Note: It´s better that your device is connected to the carger and not in use while doing this. Also do not boot your device while it is not finished. The device may be unresponsible for a long time, because it need a lot of performance, be patient and wait.
!!! WARNING !!! NEVER, NEVER BOOT WHILE BALANCING - IT COULD BREAK YOUR DEVICE !!!
Doing by terminal
Enter Root mode
devel-su
Check the allocation (how many space is free / how unbalanced is your filesystem)
btrfs-balancer allocation
Note: everything over 90% is critical for the performance and the stability of the system
Balance the Btrfs Filesystem
btrfs-balancer balance
Now you can realocate the data chunks
btrfs balance start -dusage=55 /
If no space is left, try a lower number. But retry later with higher numbers up to 100%
Sometimes the Metadata also unbalanced, you can also realocate the metadata using this
btrfs balance start -musage=55 /
Note: The option -d stand for data and -m for metadata
Now we create a new loop device on the sd-card to outsorce space for balancing
First we have to check what name our sdcard have
ls /media/sdcard
Now we create a loop device on the sdcard and set it up to btrfs
dd if=/dev/zero of=/media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs bs=100M count=5
losetup -v -f /media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs
btrfs device add /dev/loop0 /
Now we can retry to balance the filesystem.
After balancing is finished, delete the Loop0 device. I´m not sure whats happens if you reboot / disconnect your sdcard while Loop0 is existing.
btrfs device delete /dev/loop0 /
Hope this will help other solving the btrfs problem
Thanks to: https://together.jolla.com/question/30822/root-and-home-disks-full-and-causing-various-problems/ @Juho, https://btrfs.wiki.kernel.org/index.php/Balance_Filters
4 | No.4 Revision |
Btrfs is a cool file system, but with all cool things there are also uncool trace-appearance, too. One of this is that the Btrfs seems to run full of space. This means it have a poor performance like a fraqmented FAT device. So we have to maintain our filesystem fequently.
Note: It´s better that your device is connected to the carger and not in use while doing this. Also do not boot your device while it is not finished. The device may be unresponsible for a long time, because it need a lot of performance, be patient and wait.
Edit: To reduce the risk of breaking your device, go to Airplain-Mode, close all open apps and stop dalvik
!!! WARNING !!! NEVER, NEVER BOOT WHILE BALANCING - IT COULD BREAK BRIK YOUR DEVICE !!!
Doing by terminal
Enter Root mode
devel-su
Check the allocation (how many space is free / how unbalanced is your filesystem)
btrfs-balancer allocation
Note: everything over 90% is critical for the performance and the stability of the system
Balance the Btrfs Filesystem
btrfs-balancer balance
Now you can realocate the data chunks
btrfs balance start -dusage=55 /
If no space is left, try a lower number. But retry later with higher numbers up to 100%
Sometimes the Metadata also unbalanced, you can also realocate the metadata using this
btrfs balance start -musage=55 /
Note: The option -d stand for data and -m for metadata
Now we create a new loop device on the sd-card to outsorce space for balancing
First we have to check what name our sdcard have
ls /media/sdcard
Now we create a loop device on the sdcard and set it up to btrfs
dd if=/dev/zero of=/media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs bs=100M count=5
losetup -v -f /media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs
btrfs device add /dev/loop0 /
Now we can retry to balance the filesystem.
After balancing is finished, delete the Loop0 device. I´m not sure whats happens if you reboot / disconnect your sdcard while Loop0 is existing.
btrfs device delete /dev/loop0 /
Hope this will help other solving the btrfs problem
Thanks to: https://together.jolla.com/question/30822/root-and-home-disks-full-and-causing-various-problems/ @Juho, https://btrfs.wiki.kernel.org/index.php/Balance_Filters
5 | No.5 Revision |
!!! WARNING: READ CAREFULLY BEFORE DOING SOMETHING - SOMEONE REPORTED BTRFS CORRUPTION !!!
Btrfs is a cool file system, but with all cool things there are also uncool trace-appearance, too. One of this is that the Btrfs seems to run full of space. This means it have a poor performance like a fraqmented FAT device. So we have to maintain our filesystem fequently.
Note: It´s better that your device is connected to the carger and not in use while doing this. Also do not boot your device while it is not finished. The device may be unresponsible for a long time, because it need a lot of performance, be patient and wait.
Edit: To reduce the risk of breaking your device, go to Airplain-Mode, close all open apps and stop dalvik
!!! WARNING !!! NEVER, NEVER BOOT WHILE BALANCING - IT COULD BRIK WILL BREAK YOUR DEVICE !!!
Doing by terminal
Enter Root mode
devel-su
Check the allocation (how many space is free / how unbalanced is your filesystem)
btrfs-balancer allocation
Note: everything over 90% is critical for the performance and the stability of the system
Balance the Btrfs Filesystem
btrfs-balancer balance
Now you can realocate the data chunks
btrfs balance start -dusage=55 /
If no space is left, try a lower number. But retry later with higher numbers up to 100%
Sometimes the Metadata also unbalanced, you can also realocate the metadata using this
btrfs balance start -musage=55 /
Note: The option -d stand for data and -m for metadata
Now we create a new loop device on the sd-card to outsorce space for balancing
First we have to check what name our sdcard have
ls /media/sdcard
Now we create a loop device on the sdcard and set it up to btrfs
dd if=/dev/zero of=/media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs bs=100M count=5
losetup -v -f /media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs
btrfs device add /dev/loop0 /
Now we can retry to balance the filesystem.
After balancing is finished, delete the Loop0 device. I´m not sure whats happens if you reboot / disconnect your sdcard while Loop0 is existing.
btrfs device delete /dev/loop0 /
Edit: It seems to be that in some cases the whole btrfs File system will be corrupted if /dev/loop0 will not be deleted before reboot.
If /dev/loop0 can not be deleted, never reboot! Try to balance again and again, delete local data until you can delete it. Write here for help but never reboot it. Hope this will help other solving the btrfs problem
Thanks to: https://together.jolla.com/question/30822/root-and-home-disks-full-and-causing-various-problems/ @Juho, https://btrfs.wiki.kernel.org/index.php/Balance_Filters
Edit: Have anyone an other solution for the situation that the Loop0 can not be deleted?
6 | No.6 Revision |
!!! WARNING: READ CAREFULLY AND COMPLETLY BEFORE DOING SOMETHING - SOMEONE REPORTED HIGHRISK OF BTRFS CORRUPTION AND NEED OF DEVICE BRIK IF DONE WRONG !!!
Btrfs is a cool file system, but with all cool things there are also uncool trace-appearance, too. One of this is that the Btrfs seems to run full of space. This means it have a poor performance like a fraqmented FAT device. So we have to maintain our filesystem fequently.
Note: It´s better that your device is connected to the carger and not in use while doing this. Also do not boot your device while it is not finished. The device may be unresponsible for a long time, because it need a lot of performance, be patient and wait.
Edit: To reduce the risk of breaking your device, go to Airplain-Mode, close all open apps and stop dalvik
!!! WARNING !!! NEVER, NEVER BOOT WHILE BALANCING - IT WILL BREAK YOUR DEVICE !!!
Doing by terminal
Enter Root mode
devel-su
Check the allocation (how many space is free / how unbalanced is your filesystem)
btrfs-balancer allocation
Note: everything over 90% is critical for the performance and the stability of the system
Balance the Btrfs Filesystem
btrfs-balancer balance
Now you can realocate the data chunks
btrfs balance start -dusage=55 /
If no space is left, try a lower number. But retry later with higher numbers up to 100%
Sometimes the Metadata also unbalanced, you can also realocate the metadata using this
btrfs balance start -musage=55 /
Note: The option -d stand for data and -m for metadata
Now we create a new loop device on the sd-card to outsorce space for balancing
First we have to check what name our sdcard have
ls /media/sdcard
Now we create a loop device on the sdcard and set it up to btrfs
dd if=/dev/zero of=/media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs bs=100M count=5
losetup -v -f /media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs
btrfs device add /dev/loop0 /
Now we can retry to balance the filesystem.
After balancing is finished, delete the Loop0 device. I´m not sure whats happens if you reboot / disconnect your sdcard while Loop0 is existing.
btrfs device delete /dev/loop0 /
Edit: It seems to be that in some cases the whole btrfs File system will be corrupted if /dev/loop0 will not be deleted before reboot.
If /dev/loop0 can not be deleted, never reboot! Try to balance again and again, delete local data until you can delete it. Write here for help but never reboot it. Hope this will help other solving the btrfs problem
Thanks to: https://together.jolla.com/question/30822/root-and-home-disks-full-and-causing-various-problems/ @Juho, https://btrfs.wiki.kernel.org/index.php/Balance_Filters
Edit: Have anyone an other solution for the situation that the Loop0 can not be deleted?
7 | No.7 Revision |
!!! WARNING: READ CAREFULLY AND COMPLETLY BEFORE DOING SOMETHING - HIGHRISK OF BTRFS CORRUPTION AND NEED OF DEVICE BRIK IF DONE WRONG !!!
Btrfs is a cool file system, but with all cool things there are also uncool trace-appearance, too. One of this is that the Btrfs seems to run full of space. This means it have a poor performance like a fraqmented FAT device. So we have to maintain our filesystem fequently.
Note: It´s better that your device is connected to the carger and not in use while doing this. Also do not boot your device while it is not finished. The device may be unresponsible for a long time, because it need a lot of performance, be patient and wait.
Edit: To reduce the risk of breaking your device, go to Airplain-Mode, close all open apps and stop dalvik
!!! WARNING !!! NEVER, NEVER BOOT WHILE BALANCING - IT WILL BREAK YOUR DEVICE !!!
Doing by terminal
Enter Root mode
devel-su
Check the allocation (how many space is free / how unbalanced is your filesystem)
btrfs-balancer allocation
Note: everything over 90% is critical for the performance and the stability of the system
Balance the Btrfs Filesystem
btrfs-balancer balance
Now you can realocate the data chunks
btrfs balance start -dusage=55 /
If no space is left, try a lower number. But retry later with higher numbers up to 100%90%
Edit: more than 90% can sometimes make your device to stay at a unresponsible condition for a long time > 12 h
Sometimes the Metadata also unbalanced, you can also realocate the metadata using this
btrfs balance start -musage=55 /
Note: The option -d stand for data and -m for metadata
Now we create a new loop device on the sd-card to outsorce space for balancing
First we have to check what name our sdcard have
ls /media/sdcard
Now we create a loop device on the sdcard and set it up to btrfs
dd if=/dev/zero of=/media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs bs=100M count=5
losetup -v -f /media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs
btrfs device add /dev/loop0 /
Now we can retry to balance the filesystem.
After balancing is finished, delete the Loop0 device. I´m not sure whats happens if you reboot / disconnect your sdcard while Loop0 is existing.
btrfs device delete /dev/loop0 /
Edit: It seems to be that in some cases the whole btrfs File system will be corrupted if /dev/loop0 will not be deleted before reboot.
If /dev/loop0 can not be deleted, never reboot! Try to balance again and again, delete local data until you can delete it. Write here for help but never reboot it. Hope this will help other solving the btrfs problem
Thanks to: https://together.jolla.com/question/30822/root-and-home-disks-full-and-causing-various-problems/ @Juho, https://btrfs.wiki.kernel.org/index.php/Balance_Filters
Edit: Have anyone an other solution for the situation that the Loop0 can not be deleted?
8 | No.8 Revision |
!!! WARNING: READ CAREFULLY AND COMPLETLY BEFORE DOING SOMETHING - HIGHRISK OF BTRFS CORRUPTION AND NEED OF DEVICE BRIK IF DONE WRONG !!!
Btrfs is a cool file system, but with all cool things there are also uncool trace-appearance, too. One of this is that the Btrfs seems to run full of space. This means it have a poor performance like a fraqmented FAT device. So we have to maintain our filesystem fequently.
Note: It´s better that your device is connected to the carger and not in use while doing this. Also do not boot your device while it is not finished. The device may be unresponsible for a long time, because it need a lot of performance, be patient and wait.
Edit: To reduce the risk of breaking your device, go to Airplain-Mode, close all open apps and stop dalvik
!!! WARNING !!! NEVER, NEVER BOOT WHILE BALANCING - IT WILL BREAK YOUR DEVICE !!!
Doing by terminal
Enter Root mode
devel-su
Check the allocation (how many space is free / how unbalanced is your filesystem)
btrfs-balancer allocation
Note: everything over 90% is critical for the performance and the stability of the system
Balance the Btrfs Filesystem
btrfs-balancer balance
Now you can realocate the data chunks
btrfs balance start -dusage=55 /
If no space is left, try a lower number. But retry later with higher numbers up to 90% Edit: more than 90% can sometimes make your device to stay at a unresponsible condition for a long time > 12 h
Sometimes the Metadata also unbalanced, you can also realocate the metadata using this
btrfs balance start -musage=55 /
Note: The option -d stand for data and -m for metadata
Now we create a new loop device on the sd-card to outsorce space for balancing
First we have to check what name our sdcard have
ls /media/sdcard
Now we create a loop device on the sdcard and set it up to btrfs
dd if=/dev/zero of=/media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs bs=100M count=5
losetup -v -f /media/sdcard/***ID-OF-YOUR-SDCARD***/btrfs
btrfs device add /dev/loop0 /
Now we can retry to balance the filesystem.
After balancing is finished, delete the Loop0 device. I´m not sure whats happens if you reboot / disconnect your sdcard while Loop0 is existing.
btrfs device delete /dev/loop0 /
Edit: It seems to be that in some cases the whole btrfs File system will be corrupted if /dev/loop0 will not be deleted before reboot.
If /dev/loop0 can not be deleted, never reboot! Try to balance again and again, delete local data until you can delete it. Write here for help but never reboot it. Hope this will help other solving the btrfs problem
Thanks to: https://together.jolla.com/question/30822/root-and-home-disks-full-and-causing-various-problems/ @Juho, https://btrfs.wiki.kernel.org/index.php/Balance_Filters
Edit: Have anyone an other solution for the situation that the Loop0 can not be deleted?