public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: "Jérôme Bardot" <bardot.jerome@gmail.com>, linux-btrfs@vger.kernel.org
Subject: Re: Virtualbox and btrfs superblock issue
Date: Tue, 30 Jul 2024 07:00:57 +0930	[thread overview]
Message-ID: <2ab71fbf-6366-4407-a74d-3f172c488d67@suse.com> (raw)
In-Reply-To: <CAK6hYTsFwBVXAJ3yBkBX-3tgmAj=1OFxN=2kybiovxjtTX4yOQ@mail.gmail.com>



在 2024/7/29 23:32, Jérôme Bardot 写道:
> Hi,
> 
> Sorry if I post at the wrong place but  I didn't find an issue manager
> (like gitlab).
> (I also asking myself if a not already post but maybe before i subscribe)
> 
> So my issue :
> 
> On a windows host laptop and with a parrot vm with a btrfs and after a
> power failure the vm looks broken.

IIRC VBox default to ignore flush/fua to improve performance, at the 
cost of protection against power loss.

https://forums.virtualbox.org/viewtopic.php?t=13661

Although traditional journal based filesystems are also affected by this 
bad behavior, btrfs is especially sensitive to bad flush/fua behavior.

> At start the vm drop down to initramfs.
> When I try to mount from an iso (of the same os/version) i get following error :
> 
> mount -t btrfs /dev/sdc1 /media/user/to-rescue
> mount: /media/user/to-rescue: can't read superblock on /dev/sdc1.
>         dmesg(1) may have more information after failed mount system call.
> 
> and dmesg get following :
> [71283.615636] BTRFS: device fsid 70bf0953-3ee3-481f-8a7d-f7327c6fba67
> devid 1 transid 182616 /dev/sdc1 (8:33) scanned by mount (24156)
> [71283.627681] BTRFS info (device sdc1): first mount of filesystem
> 70bf0953-3ee3-481f-8a7d-f7327c6fba67
> [71283.627711] BTRFS info (device sdc1): using crc32c (crc32c-intel)
> checksum algorithm
> [71283.627725] BTRFS info (device sdc1): using free-space-tree
> [71283.639345] BTRFS error (device sdc1): parent transid verify failed
> on logical 26984693760 mirror 1 wanted 182616 found 182618
> [71283.642087] BTRFS error (device sdc1): parent transid verify failed
> on logical 26984693760 mirror 2 wanted 182616 found 182618
> [71283.645163] BTRFS warning (device sdc1): couldn't read tree root
> [71283.646224] BTRFS error (device sdc1): open_ctree failed
> 
> How can (if I can) I fix that kind of issue.
> (i did not create backup/btrfs snapshot)
> I get that issue on 2 similar setup / power failure and one with a xfs
> system too.
> 
> I'm really newbie with btrfs.

Transid mismatch is already a death sentence, not to mention it's 
corruption on root tree (the tree for all other trees).

It's really better to just restore from the backup, and go some more 
sane VMM tools other than VBox.

Thanks,
Qu

> 
> thx for your feedback.
> 

      parent reply	other threads:[~2024-07-29 21:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29 14:02 Virtualbox and btrfs superblock issue Jérôme Bardot
2024-07-29 14:32 ` Johannes Thumshirn
2024-07-29 20:50   ` BARDOT Jérôme
2024-07-29 21:30 ` Qu Wenruo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ab71fbf-6366-4407-a74d-3f172c488d67@suse.com \
    --to=wqu@suse.com \
    --cc=bardot.jerome@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox