We have moved to a new Sailfish OS Forum. Please start new discussions there.
3

btrfs balancing is running for 5 days

asked 2015-06-17 22:53:40 +0300

pkz gravatar image

updated 2015-06-18 15:03:23 +0300

Dear all,

I have the problem with the btrfs that leads to continuous reboots. I followed the instructions in the thread regarding btrfs full in home and root that needs balancing.

I tried with the -dusage option but without any success. Then I started the full balance but the phone is stuck since 5 days.

I tried also to cancel the full balance with the appropriate command but nothing happens. What else can I do?

This is the result of top O l:

top - 21:51:50 up 6 days, 15:51,  1 user,  load average: 5.95, 5.72, 5.59
Tasks: 246 total,   1 running, 245 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us, 11.2%sy,  0.0%ni, 22.9%id, 65.8%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    828696k total,   761876k used,    66820k free,      636k buffers
Swap:   627908k total,    10672k used,   617236k free,   413316k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+    TIME COMMAND
  144 root      20   0     0    0    0 D  7.2  0.0 596:57.40 596:57 btrfs-balance
  138 root      20   0     0    0    0 D  6.9  0.0 590:03.54 590:03 btrfs-transacti
  109 root      20   0     0    0    0 D  4.3  0.0 359:59.25 359:59 mmcqd/0
  126 root      20   0     0    0    0 S  2.0  0.0 144:46.83 144:46 btrfs-submit-1
  393 root      20   0 13592 3228 2600 S  0.7  0.4  49:48.96  49:48 mce
 1516 root       0 -20  6664  376  200 S  0.3  0.0  42:48.70  42:48 mpdecision 
  133 root      20   0     0    0    0 S  0.3  0.0  19:01.68  19:01 btrfs-freespace
 5404 root      20   0     0    0    0 S  3.0  0.0   9:04.44   9:04 btrfs-worker-4
  682 root      20   0  6500 2232 1792 S  0.3  0.3   8:37.86   8:37 connmand
 2555 root      20   0 14256 3388 2664 S  0.0  0.4   2:32.35   2:32 upowerd
  444 root      20   0 87580 5304 4060 S  0.0  0.6   2:26.44   2:26 statefs
 2742 nemo      20   0  8324 1296  840 S  0.3  0.2   2:20.56   2:20 sshd
 2759 nemo      20   0  225m  85m  44m S  0.0 10.5   1:46.76   1:46 lipstick
  463 dbus      20   0  4216 2736 1148 S  0.0  0.3   1:37.20   1:37 dbus-daemon
  137 root      20   0     0    0    0 S  0.3  0.0   1:28.36   1:28 btrfs-cleaner
  642 root       0 -20 22996  316  276 S  0.0  0.0   1:11.14   1:11 thermald
  569 system    20   0  2264  304  248 S  0.0  0.0   1:01.32   1:01 sensord
  627 root      20   0     0    0    0 S  0.0  0.0   0:39.23   0:39 MC_Thread
10788 nemo      20   0  100m  26m  11m S  0.0  3.3   0:38.80   0:38 contactsd
 1076 nemo      20   0 75964  12m 9624 S  0.0  1.6   0:37.10   0:37 messageserver5
  188 root      20   0  157m  17m  17m S  0.0  2.2   0:37.02   0:37 systemd-journal
 1091 nemo      20   0 88316  17m  11m S  0.0  2.2   0:36.92   0:36 as-daemon
  219 root      20   0  9240 1052  888 S  0.0  0.1   0:34.66   0:34 systemd-udevd
  551 root      -2  -1 10676 1892 1676 S  0.0  0.2   0:33.65   0:33 dsme-server
 1061 nemo      20   0 75916 8776 6768 S  0.0  1.1   0:28.98   0:28 msyncd
 7837 root      20   0     0    0    0 S  0.0  0.0   0:26.77   0:26 btrfs-worker-4
    3 root      20   0     0    0    0 S  0.0  0.0   0:26.38   0:26 ksoftirqd/0
 1058 nemo       9 -11  165m 6916 3408 S  0.0  0.8   0:23.64   0:23 pulse

With the command "btrfs balance status /" I can see

Balance on '/' is running, cancel requested
1 out of about 16 chunks balanced (20 considered),  94% left

and with "btrfs fi show" I have:

ERROR: unable get label Inappropriate ioctl for device
Label: 'sailfish'  uuid: 86180ca0-d351-4551-b262-22b49e1adf47
    Total devices 1 FS bytes used 11.43GiB
    devid    1 size 13.75GiB used 13.75GiB path /dev/mmcblk0p28

Btrfs v3.16

Thanks in advance pkz

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
1

answered 2015-06-18 01:27:43 +0300

chemist gravatar image

D state is un-interruptible sleep - means it is waiting for something to complete... I guess your device was not really unbalanced (or not much) if the -dusage did not help your cause, so your device is either filled up with metadata or really full with actual data, you better try to remove some large files and reattempt to balance. No idea if you get it to stop in this state though.

edit flag offensive delete publish link more

Comments

Thanks, the problem is that I cannot stop the actual balancing.

With the command "btrfs balance status /" I can see

Balance on '/' is running, cancel requested
1 out of about 16 chunks balanced (20 considered),  94% left

and with "btrfs fi show" I have:

ERROR: unable get label Inappropriate ioctl for device
Label: 'sailfish'  uuid: 86180ca0-d351-4551-b262-22b49e1adf47
    Total devices 1 FS bytes used 11.43GiB
    devid    1 size 13.75GiB used 13.75GiB path /dev/mmcblk0p28

Btrfs v3.16

pkz

pkz ( 2015-06-18 12:11:27 +0300 )edit
1

Delete some bigger files...(delete at least 2GB) balancing task usually survives reboots... might be that it does not even shutdown though :/ but you might delete some files and try to reboot

chemist ( 2015-06-18 12:23:22 +0300 )edit

Dear chemist, thanks again.

At the moment there are 2 GB free. I can try to delete other files.

How can I trigger a "safe" reboot? Can I use the simple reboot command?

pkz ( 2015-06-18 12:28:05 +0300 )edit
1

dsmetool -b

chemist ( 2015-06-18 12:28:48 +0300 )edit
2

Your balancing does take ages as there is no space left to balance with so the more free space you have the less you need to balance and it is getting faster as it can move larger chunks at once

chemist ( 2015-06-18 12:30:12 +0300 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2015-06-17 22:53:40 +0300

Seen: 1,811 times

Last updated: Jun 18 '15