Btrfs filesystem on primary machine completely destroyed itself, secondary in the process of dying 😭

Hmm, ordering it like that causes scrub/balance to run every day instead of once every month.
Would be interesting to see if it reduces the life of SSD, personally I don’t think it would as the default balance script is only freeing up completely unused (yet allocated) blocks and finishes very fast compared to full rebalance.

It doesn’t on host freiburg, a sibling of ■■■■■■■■■■■■■■■■■■■■■■:

root@freiburg: ~
# journalctl -q -u transactional-update.service -u btrfs-scrub.service --identifier systemd --no-pager 
Feb 01 00:00:00 freiburg systemd[1]: Started Scrub btrfs filesystem, verify block checksums.
Feb 01 00:02:13 freiburg systemd[1]: btrfs-scrub.service: Deactivated successfully.
Feb 01 00:02:13 freiburg systemd[1]: btrfs-scrub.service: Consumed 15.556s CPU time.
Feb 25 19:23:29 freiburg systemd[1]: Starting Update the system...
Feb 25 19:23:32 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Feb 25 19:23:32 freiburg systemd[1]: Finished Update the system.
Feb 25 19:23:32 freiburg systemd[1]: transactional-update.service: Consumed 1.382s CPU time.
Feb 26 14:20:45 freiburg systemd[1]: Starting Update the system...
Feb 26 14:20:49 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Feb 26 14:20:49 freiburg systemd[1]: Finished Update the system.
Feb 26 14:20:49 freiburg systemd[1]: transactional-update.service: Consumed 1.446s CPU time.
Feb 26 14:36:53 freiburg systemd[1]: Starting Update the system...
Feb 26 14:36:56 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Feb 26 14:36:56 freiburg systemd[1]: Finished Update the system.
Feb 26 14:36:56 freiburg systemd[1]: transactional-update.service: Consumed 1.462s CPU time.
Feb 27 07:10:39 freiburg systemd[1]: Starting Update the system...
Feb 27 07:10:53 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Feb 27 07:10:53 freiburg systemd[1]: Finished Update the system.
Feb 27 07:10:53 freiburg systemd[1]: transactional-update.service: Consumed 2.568s CPU time.
Feb 27 07:16:06 freiburg systemd[1]: Starting Update the system...
Feb 27 07:16:08 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Feb 27 07:16:08 freiburg systemd[1]: Finished Update the system.
Feb 27 07:16:08 freiburg systemd[1]: transactional-update.service: Consumed 1.400s CPU time.
Feb 27 10:37:15 freiburg systemd[1]: Starting Update the system...
Feb 27 10:37:17 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Feb 27 10:37:17 freiburg systemd[1]: Finished Update the system.
Feb 27 10:37:17 freiburg systemd[1]: transactional-update.service: Consumed 1.367s CPU time.
Feb 28 07:12:52 freiburg systemd[1]: Starting Update the system...
Feb 28 07:14:03 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Feb 28 07:14:03 freiburg systemd[1]: Stopped Update the system.
Feb 28 07:14:03 freiburg systemd[1]: transactional-update.service: Consumed 20.338s CPU time.
Feb 29 07:13:24 freiburg systemd[1]: Starting Update the system...
Feb 29 07:16:04 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Feb 29 07:16:05 freiburg systemd[1]: Stopped Update the system.
Feb 29 07:16:05 freiburg systemd[1]: transactional-update.service: Consumed 1min 2.261s CPU time.
Mar 01 07:03:47 freiburg systemd[1]: Started Scrub btrfs filesystem, verify block checksums.
Mar 01 07:03:47 freiburg systemd[1]: Starting Update the system...
Mar 01 07:06:24 freiburg systemd[1]: btrfs-scrub.service: Deactivated successfully.
Mar 01 07:06:24 freiburg systemd[1]: btrfs-scrub.service: Consumed 21.821s CPU time.
Mar 01 07:06:47 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Mar 01 07:06:47 freiburg systemd[1]: Stopped Update the system.
Mar 01 07:06:47 freiburg systemd[1]: transactional-update.service: Consumed 1min 6.487s CPU time.
Mar 02 09:38:22 freiburg systemd[1]: Starting Update the system...
Mar 02 09:39:19 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Mar 02 09:39:19 freiburg systemd[1]: Stopped Update the system.
Mar 02 09:39:19 freiburg systemd[1]: transactional-update.service: Consumed 22.454s CPU time.
Mar 03 08:38:21 freiburg systemd[1]: Starting Update the system...
Mar 03 08:39:45 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Mar 03 08:39:45 freiburg systemd[1]: Stopped Update the system.
Mar 03 08:39:45 freiburg systemd[1]: transactional-update.service: Consumed 36.907s CPU time.
Mar 04 07:17:06 freiburg systemd[1]: Starting Update the system...
Mar 04 07:18:33 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Mar 04 07:18:33 freiburg systemd[1]: Stopped Update the system.
Mar 04 07:18:33 freiburg systemd[1]: transactional-update.service: Consumed 33.381s CPU time.
Mar 05 00:00:00 freiburg systemd[1]: Starting Update the system...
Mar 05 00:03:45 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Mar 05 00:03:46 freiburg systemd[1]: Stopped Update the system.
Mar 05 00:03:46 freiburg systemd[1]: transactional-update.service: Consumed 1min 28.380s CPU time.
Mar 05 08:14:38 freiburg systemd[1]: Starting Update the system...
Mar 05 08:14:41 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Mar 05 08:14:41 freiburg systemd[1]: Finished Update the system.
Mar 05 08:14:41 freiburg systemd[1]: transactional-update.service: Consumed 1.354s CPU time.
Mar 06 07:30:57 freiburg systemd[1]: Starting Update the system...
Mar 06 07:31:30 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Mar 06 07:31:30 freiburg systemd[1]: Stopped Update the system.
Mar 06 07:31:30 freiburg systemd[1]: transactional-update.service: Consumed 24.143s CPU time.
Mar 07 07:15:53 freiburg systemd[1]: Starting Update the system...
Mar 07 07:17:29 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Mar 07 07:17:29 freiburg systemd[1]: Stopped Update the system.
Mar 07 07:17:29 freiburg systemd[1]: transactional-update.service: Consumed 46.298s CPU time.
Mar 07 08:26:45 freiburg systemd[1]: Started Scrub btrfs filesystem, verify block checksums.
Mar 07 08:29:22 freiburg systemd[1]: btrfs-scrub.service: Deactivated successfully.
Mar 07 08:29:22 freiburg systemd[1]: btrfs-scrub.service: Consumed 26.026s CPU time.
Mar 08 07:27:46 freiburg systemd[1]: Starting Update the system...
Mar 08 07:29:45 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Mar 08 07:29:45 freiburg systemd[1]: Stopped Update the system.
Mar 08 07:29:45 freiburg systemd[1]: transactional-update.service: Consumed 40.649s CPU time.
Mar 08 09:13:55 freiburg systemd[1]: Starting Update the system...
Mar 08 09:13:58 freiburg systemd[1]: transactional-update.service: Deactivated successfully.
Mar 08 09:13:58 freiburg systemd[1]: Finished Update the system.
Mar 08 09:13:58 freiburg systemd[1]: transactional-update.service: Consumed 1.345s CPU time.

root@freiburg: ~
# 

systemd starts btrfs-scrub.service and transactional-update.service as scheduled. Ordering doesn’t affect the schedule.

Would be interesting to see if it reduces the life of SSD, personally I don’t think it would as the default balance script is only freeing up completely unused (yet allocated) blocks and finishes very fast compared to full rebalance.

Defaults of btrfs-balance.service result in only a few chunks being relocated:

erlangen:~ # journalctl -q -u btrfs-balance.service -g relocate
Feb 19 04:39:44 erlangen btrfs-balance.sh[10034]: Done, had to relocate 0 out of 799 chunks
Feb 19 04:39:44 erlangen btrfs-balance.sh[10034]: Done, had to relocate 0 out of 799 chunks
Feb 19 04:39:44 erlangen btrfs-balance.sh[10034]: Done, had to relocate 0 out of 799 chunks
Feb 19 04:39:44 erlangen btrfs-balance.sh[10034]: Done, had to relocate 0 out of 799 chunks
Feb 19 04:39:45 erlangen btrfs-balance.sh[10034]: Done, had to relocate 2 out of 799 chunks
Feb 26 03:37:08 erlangen btrfs-balance.sh[31039]: Done, had to relocate 0 out of 811 chunks
Feb 26 03:37:08 erlangen btrfs-balance.sh[31039]: Done, had to relocate 0 out of 811 chunks
Feb 26 03:37:11 erlangen btrfs-balance.sh[31039]: Done, had to relocate 1 out of 811 chunks
Feb 26 03:37:11 erlangen btrfs-balance.sh[31039]: Done, had to relocate 1 out of 810 chunks
Feb 26 03:37:11 erlangen btrfs-balance.sh[31039]: Done, had to relocate 1 out of 809 chunks
Mar 01 02:13:40 erlangen btrfs-balance.sh[21908]: Done, had to relocate 0 out of 815 chunks
Mar 01 02:13:40 erlangen btrfs-balance.sh[21908]: Done, had to relocate 0 out of 815 chunks
Mar 01 02:13:40 erlangen btrfs-balance.sh[21908]: Done, had to relocate 0 out of 815 chunks
Mar 01 02:13:40 erlangen btrfs-balance.sh[21908]: Done, had to relocate 0 out of 815 chunks
Mar 01 02:13:40 erlangen btrfs-balance.sh[21908]: Done, had to relocate 2 out of 815 chunks
Mar 04 06:54:34 erlangen btrfs-balance.sh[17718]: Done, had to relocate 0 out of 818 chunks
Mar 04 06:54:34 erlangen btrfs-balance.sh[17718]: Done, had to relocate 0 out of 818 chunks
Mar 04 06:54:34 erlangen btrfs-balance.sh[17718]: Done, had to relocate 0 out of 818 chunks
Mar 04 06:54:34 erlangen btrfs-balance.sh[17718]: Done, had to relocate 0 out of 818 chunks
Mar 04 06:54:34 erlangen btrfs-balance.sh[17718]: Done, had to relocate 2 out of 818 chunks
erlangen:~ # 
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.