Menu

BTRFS filesystem errors after cloning partition

2024-05-28
2025-04-17
  • Krzysztof Szwaba

    Lasted stable version 3.1.2.22 (amd64.iso) Clonezilla still not be
    able to clone properly BTRFS filesystem.
    After cloning btrfs partition, I can't mount cloned partition.
    Errors in log:
    BTRFS info (device sdb6): using crc32c (crc32c-generic) checksum algorithm
    [ 138.908514] BTRFS info (device sdb6): use zstd compression, level 3
    [ 138.908517] BTRFS info (device sdb6): disk space caching is enabled
    [ 138.908518] BTRFS info (device sdb6): has skinny extents
    [ 138.909596] BTRFS error (device sdb6): bad tree block start, want 1064960 have 0
    [ 138.909609] BTRFS error (device sdb6): failed to read chunk root
    [ 138.909943] BTRFS error (device sdb6): open_ctree failed
    [ 171.677006] BTRFS: device label ssd_share devid 1 transid 5386 /dev/sdb6 scanned by mount (3878)
    Similar problem was described here:
    https://www.spinics.net/lists/linux-btrfs/msg134792.html

    Copying BTRFS partition using dd was successful.
    The partition can be mounted without problems.

    dd if=/dev/sdh6 dd of=/dev/sdb6

    467857408+0 przeczytanych rekordów
    467857408+0 zapisanych rekordów

    skopiowane 239542992896 bajtów (240 GB, 223 GiB), 8431,4 s, 28,4 MB/s
    467857408+0 przeczytanych rekordów
    467857408+0 zapisanych rekordów
    skopiowane 239542992896 bajtów (240 GB, 223 GiB), 8436,99 s, 28,4 MB/s

    Regards
    Krzysztof

     

    Last edit: Krzysztof Szwaba 2024-05-28
  • Steven Shiau

    Steven Shiau - 2024-05-31

    Do you know the version of your BTRFS?
    How did you install that? Please give more details so that we can try to create such a BTRFS file system and reproduce this issue.
    If it's reproducible, there is a chance to fix that.
    Thanks.

    Steven

     
  • Krzysztof Szwaba

    $ modinfo btrfs | grep -i ver
    srcversion: 7EFF40EDD470468712636DE
    vermagic: 6.5.0-35-lowlatency SMP preempt mod_unload modversions

    ~$ cat /etc/os-release
    NAME="Linux Mint"
    VERSION="21.3 (Virginia)"
    ID=linuxmint
    ID_LIKE="ubuntu debian"
    PRETTY_NAME="Linux Mint 21.3"
    VERSION_ID="21.3"

    $ uname -a
    linux-pc 6.5.0-35-lowlatency #35.1~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 11:32:45 UTC x86_64 x86_64 x86_64 GNU/Linux

    $ mount |grep -i btrfs
    /dev/sdb6 on /mnt/share2 type btrfs (rw,nosuid,nodev,relatime,compress=zstd:3,ssd,discard=async,space_cache,subvolid=5,subvol=/)
    /dev/sda3 on /mnt/share type btrfs (rw,nosuid,nodev,relatime,compress=zstd:3,discard=async,space_cache,subvolid=5,subvol=/)

    source SSD:
    $ sudo fdisk -l /dev/sdg
    Dysk /dev/sdg: 447,13 GiB, bajtów: 480103981056, sektorów: 937703088
    Disk model: SSDPR-CL100-480-
    Jednostki: sektorów, czyli 1 * 512 = 512 bajtów
    Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
    Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
    Typ etykiety dysku: dos
    Identyfikator dysku: 0xed787246

    Urządzenie Rozruch Początek Koniec Sektory Rozmiar Id Typ
    /dev/sdg1 * 2048 1968089 1966042 960M b W95 FAT32
    /dev/sdg2 1968090 937701375 935733286 446,2G 5 Rozszerzona
    /dev/sdg5 1968092 469841919 467873828 223,1G 83 Linux
    /dev/sdg6 469843968 937701375 467857408 223,1G 83 Linux

    target SSD:
    $ sudo fdisk -l /dev/sdb
    Dysk /dev/sdb: 476,94 GiB, bajtów: 512110190592, sektorów: 1000215216
    Disk model: TS512GSSD230S
    Jednostki: sektorów, czyli 1 * 512 = 512 bajtów
    Rozmiar sektora (logiczny/fizyczny) w bajtach: 512 / 512
    Rozmiar we/wy (minimalny/optymalny) w bajtach: 512 / 512
    Typ etykiety dysku: dos
    Identyfikator dysku: 0xed787246

    Urządzenie Rozruch Początek Koniec Sektory Rozmiar Id Typ
    /dev/sdb1 * 2048 1968089 1966042 960M b W95 FAT32
    /dev/sdb2 1968090 937701375 935733286 446,2G 5 Rozszerzona
    /dev/sdb3 937701376 1000215215 62513840 29,8G 83 Linux
    /dev/sdb4 937701376 1000214527 62513152 29,8G 83 Linux
    /dev/sdb5 1968092 469841919 467873828 223,1G 83 Linux
    /dev/sdb6 469843968 937701375 467857408 223,1G 83 Linux

    Regards
    Krzysztof

     

    Last edit: Krzysztof Szwaba 2024-06-04
  • Steven Shiau

    Steven Shiau - 2024-06-06

    So how did you format your /dev/sdb6 as BTRFS? Any specific parameters?
    Thanks.

    Steven

     
  • Krzysztof Szwaba

    I didn't format /dev/sdb6.
    The partition was restored by disk-to-disk cloning feature in clonezilla.

    Regards
    Krzysztof

     

    Last edit: Krzysztof Szwaba 2024-06-06
  • Steven Shiau

    Steven Shiau - 2024-06-06

    No, I meant the original source partition, the BTRFS one (or it's /dev/sda6? /dev/sdh6? whatever), not the cloned one.
    How did you create that? Is it formatted by Mint when you installed that? Or?

    Steven

     
  • Krzysztof Szwaba

    See in attachements.

    Krzysztof

     
  • Krzysztof Szwaba

    BTRFS source part info

     
  • Krzysztof Szwaba

    BTRFS dst part info

     
  • Steven Shiau

    Steven Shiau - 2024-06-09

    Thanks. We will try to reproduce this and, and will update Partclone about BTRFS recently.

    Steven

     
    👍
    1
  • Steven Shiau

    Steven Shiau - 2024-06-18

    Please give testing Clonezilla live a try, i.e., 3.1.3-8 or 20240614-*:
    https://clonezilla.org/downloads.php
    We have updated Partclone with newer BTRFS version support.
    Please let us know the results.

    Steven

     
  • Steven Shiau

    Steven Shiau - 2024-06-18

    Please give testing Clonezilla live a try, i.e., 3.1.3-8 or 20240614-*:
    https://clonezilla.org/downloads.php
    We have updated Partclone with newer BTRFS version support.
    Please let us know the results.

    Steven

     
  • Krzysztof Szwaba

    Still doesn't work.
    BTRFS clone program is buggy.
    I don't see why btrfs support is marked as stable.
    Sould be as experimental.
    For BTRFS filesystem currently sould be dd used in my opinion.
    Regards
    Krzysztof

     

    Last edit: Krzysztof Szwaba 2024-09-26
  • Steven Shiau

    Steven Shiau - 2024-09-26

    Well, since the upstream BTRFS changes very fast, I believe we should mark BTRFS as experimental support, and warn users to use that carefully.

    Steven

     
  • ilyas

    ilyas - 2024-12-27

    I am facing the same issue. I imaged my whole SSD and upon restoring only the BTRFS partition is toast ( bad tree block start, want XXX have 0) with the latest "stable". Original disk image has fat/ntfs partitions and they all work upon restore. Maybe the BTRFS support should be disabled for now ? The partition image has been checked by clonezilla an seems fine.

     
  • Steven Shiau

    Steven Shiau - 2025-01-08

    The BTRFS is now processed by dd in Clonezilla live >= 3.2.0-32 by default. In the future when our file system engine Partclone has better support for that, we will enable it again.

    Steven

     
  • Krzysztof Szwaba

    Great :)

     
  • Caleb Davis

    Caleb Davis - 2025-02-07

    I had to migrate my partitions from btrfs to ext4 because of this issue (my backups were suddenly taking forever, and sizes were huge). Is there an estimate for when btrfs support might come back?

     
  • Steven Shiau

    Steven Shiau - 2025-02-09

    Actually no. The change in BTRFS sometimes is so huge that we can not catch...

    Steven

     

    Last edit: Steven Shiau 2025-02-09
  • Caleb Davis

    Caleb Davis - 2025-04-14

    Just to follow up - the latest 'testing' build (3.2.1-21) seems to properly handle btrfs again. I just backed up and restored a drive with both a windows install and a Fedora linux system (160G btrfs '/' partiton). Well done, thank you.

     
    👍
    1
  • Steven Shiau

    Steven Shiau - 2025-04-17

    It's good to know that.
    However, as we mentioned before, BTRFS changes so fast so that please remember the risk when using Clonezilla to backup it.
    Thanks.

    Steven

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.