Results 1 to 4 of 4

Thread: btrfs scrub starts then aborts

  1. #1
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    289

    Default btrfs scrub starts then aborts

    After BTRFS devoured space on my / partition am watching it, and disk space a bit closer, scrubbing regularly appeared useful.

    So usually start checking scrub status, then scrub start, then scrub status after enough time passes, when usually see completed OK.


    Today, several attempts found btrfs scrub have aborted, not completing scrubs, how to learn why, and what (if anything) need do so scrub completes OK.




    Code:
    linux-7769:~ #  btrfs device stats /dev/sda3
    [/dev/sda3].write_io_errs   0
    [/dev/sda3].read_io_errs    0
    [/dev/sda3].flush_io_errs   0
    [/dev/sda3].corruption_errs 0
    [/dev/sda3].generation_errs 0
    linux-7769:~ # btrfs scrub status /dev/sda3
    scrub status for xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
        scrub started at Tue Apr 28 07:20:16 2015 and was aborted after 37 seconds
        total bytes scrubbed: 3.74GiB with 0 errors
    linux-7769:~ # btrfs scrub start /dev/sda3
    scrub started on /dev/sda3, fsid xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (pid=5413)
    linux-7769:~ # btrfs scrub status /dev/sda3
    scrub status for xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
        scrub started at Tue Apr 28 08:15:36 2015 and was aborted after 38 seconds
        total bytes scrubbed: 3.75GiB with 0 errors
    linux-7769:~ # btrfs device stats /dev/sda3
    [/dev/sda3].write_io_errs   0
    [/dev/sda3].read_io_errs    0
    [/dev/sda3].flush_io_errs   0
    [/dev/sda3].corruption_errs 0
    [/dev/sda3].generation_errs 0
    linux-7769:~ # df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sda3        41G   11G   29G  27% /
    devtmpfs        3.7G     0  3.7G   0% /dev
    tmpfs           3.7G   96K  3.7G   1% /dev/shm
    tmpfs           3.7G  2.2M  3.7G   1% /run
    tmpfs           3.7G     0  3.7G   0% /sys/fs/cgroup
    /dev/sda3        41G   11G   29G  27% /.snapshots
    /dev/sda3        41G   11G   29G  27% /var/tmp
    /dev/sda3        41G   11G   29G  27% /var/spool
    /dev/sda3        41G   11G   29G  27% /var/opt
    /dev/sda3        41G   11G   29G  27% /var/log
    /dev/sda3        41G   11G   29G  27% /var/lib/mailman
    /dev/sda3        41G   11G   29G  27% /var/lib/pgsql
    /dev/sda3        41G   11G   29G  27% /usr/local
    /dev/sda3        41G   11G   29G  27% /var/crash
    /dev/sda3        41G   11G   29G  27% /srv
    /dev/sda3        41G   11G   29G  27% /var/lib/named
    /dev/sda3        41G   11G   29G  27% /tmp
    /dev/sda3        41G   11G   29G  27% /opt
    /dev/sda3        41G   11G   29G  27% /boot/grub2/x86_64-efi
    /dev/sda3        41G   11G   29G  27% /boot/grub2/i386-pc
    /dev/sda4       424G   47G  378G  11% /home
    linux-7769:~ #

    Code:
    linux-7769:~ # journalctl --all --since='2015-04-28 06:00' | grep -i 'btrfs'
    Apr 28 06:40:35 linux-7769 kernel: Btrfs loaded, assert=on
    Apr 28 06:40:35 linux-7769 kernel: BTRFS: device fsid xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx devid 1 transid 50569 /dev/sda3
    Apr 28 06:40:35 linux-7769 systemd-fsck[298]: /sbin/fsck.btrfs: BTRFS file system.
    Apr 28 06:40:35 linux-7769 kernel: BTRFS info (device sda3): disk space caching is enabled
    Apr 28 06:40:38 linux-7769 kernel: BTRFS info (device sda3): disk space caching is enabled
    linux-7769:~ #

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,201
    Blog Entries
    15

    Default Re: btrfs scrub starts then aborts

    Hi
    Flush and balance as well...?

    There is a script /usr/share/btrfsmaintenance/btrfs-balance.sh which on SLE 12 runs via a cron job weekly.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    289

    Default Re: btrfs scrub starts then aborts

    sorry delay.

    appeared run ok, command: /usr/share/btrfsmaintenance/btrfs-balance.sh


    If not set in cron, how do we set it to run weekly ?

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,201
    Blog Entries
    15

    Default Re: btrfs scrub starts then aborts

    On Sun 03 May 2015 10:56:01 PM CDT, paulparker wrote:


    sorry delay.

    appeared run ok, command: /usr/share/btrfsmaintenance/btrfs-balance.sh



    If not set in cron, how do we set it to run weekly ?


    Hi
    Just create a softlink to it;
    Code:
    cd /etc/cron.weekly
    ln -s /usr/share/btrfsmaintenance/btrfs-balance.sh
    ls

    --
    Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.39-47-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •