Hi,
I started a scrub and then did a reboot:
sudo btrfs scrub start / && sleep 1 && sudo btrfs scrub status / &&
sleep 1 && sudo shutdown -r now
Now, after the boot there are no scrub stats:
$ sudo btrfs scrub status /
scrub status for 190d4803-f404-458f-85a1-f6ebf42554d4
no stats available
total bytes scrubbed: 0.00B with 0 errors
I wonder: did the scrub finish before the shutdown or got the scrub
status lost somehow? I attached excerpts of the journal that seemed
relevant. According to them it does not look like the scrub finished
in time. The 90s wait period just look too regular. But maybe I am
wrong.
Oh wait, I just tried resume:
$ sudo btrfs scrub resume /
scrub resumed on /, fsid 190d4803-f404-458f-85a1-f6ebf42554d4 (pid=2457)
$ sudo btrfs scrub status /
scrub status for 190d4803-f404-458f-85a1-f6ebf42554d4
no stats available
total bytes scrubbed: 1.30GiB with 0 errors
wait a bit
$ sudo btrfs scrub status /
scrub status for 190d4803-f404-458f-85a1-f6ebf42554d4
no stats available
total bytes scrubbed: 10.04GiB with 0 errors
So somehow the interrupted scrub is recorded but there is no automatic
resume. I thought the kernel would do that automatically. Am I wrong?
Kind regards
robert
--
[guy, jim, charlie, sho].each {|him| remember.him do |as, often|
as.you_can - without end}
http://blog.rubybestpractices.com/
user@host:~$ { journalctl -b -1; journalctl -b -0; } | egrep -i 'btrfs|scrub'
Feb 15 11:31:49 host kernel: Btrfs loaded, crc32c=crc32c-generic
Feb 15 11:31:49 host kernel: BTRFS: device fsid 190d4803-f404-458f-85a1-f6ebf42554d4 devid 1 transid 114856 /dev/sdc3
Feb 15 11:31:49 host kernel: BTRFS info (device sdc3): disk space caching is enabled
Feb 15 11:31:49 host kernel: BTRFS info (device sdc3): has skinny extents
Feb 15 11:31:49 host kernel: BTRFS info (device sdc3): enabling ssd optimizations
Feb 15 11:31:49 host kernel: BTRFS info (device sdc3): disk space caching is enabled
Feb 15 11:31:51 host systemd[1]: Started Run btrfs scrub periodically.
Feb 15 11:35:27 host sudo[2440]: user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/bin/btrfs scrub start /
Feb 15 11:35:28 host sudo[2446]: user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/bin/btrfs scrub status /
Feb 15 11:35:29 host systemd[1]: Stopped Run btrfs scrub periodically.
Feb 15 11:36:59 host systemd[1]: session-c2.scope: Stopping timed out. Killing.
Feb 15 11:36:59 host systemd[1]: session-c2.scope: Killing process 2442 (btrfs) with signal SIGKILL.
90s wait
Feb 15 11:38:29 host systemd[1]: session-c2.scope: Still around after SIGKILL. Ignoring.
Feb 15 11:38:29 host systemd[1]: session-c2.scope: Failed with result 'timeout'.
Feb 15 11:38:29 host systemd[1]: Stopped Session c2 of user user.
Feb 15 11:38:29 host systemd[1]: Removed slice User Slice of user.
Feb 15 11:38:30 host systemd-journald[289]: Journal stopped
reboot
Feb 15 11:39:16 host kernel: microcode: microcode updated early to revision 0xa0b, date = 2010-09-28
Feb 15 11:39:16 host kernel: Btrfs loaded, crc32c=crc32c-generic
Feb 15 11:39:16 host kernel: BTRFS: device fsid 190d4803-f404-458f-85a1-f6ebf42554d4 devid 1 transid 114881 /dev/sdc3
Feb 15 11:39:16 host kernel: BTRFS info (device sdc3): disk space caching is enabled
Feb 15 11:39:16 host kernel: BTRFS info (device sdc3): has skinny extents
Feb 15 11:39:16 host kernel: BTRFS info (device sdc3): enabling ssd optimizations
Feb 15 11:39:16 host kernel: BTRFS info (device sdc3): disk space caching is enabled
Feb 15 11:39:18 host systemd[1]: Started Run btrfs scrub periodically.
Feb 15 12:45:58 host sudo[1805]: user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/bin/btrfs scrub status /
Feb 15 12:46:10 host sudo[1807]: user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/bin/btrfs scrub status /
user@host:~$ sudo btrfs scrub status /
scrub status for 190d4803-f404-458f-85a1-f6ebf42554d4
no stats available
total bytes scrubbed: 0.00B with 0 errors
user@host:~$ uname -a; lsb_release -a
Linux host 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic