* Virtualbox and btrfs superblock issue
@ 2024-07-29 14:02 Jérôme Bardot
2024-07-29 14:32 ` Johannes Thumshirn
2024-07-29 21:30 ` Qu Wenruo
0 siblings, 2 replies; 4+ messages in thread
From: Jérôme Bardot @ 2024-07-29 14:02 UTC (permalink / raw)
To: linux-btrfs
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.
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.
thx for your feedback.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Virtualbox and btrfs superblock issue
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
1 sibling, 1 reply; 4+ messages in thread
From: Johannes Thumshirn @ 2024-07-29 14:32 UTC (permalink / raw)
To: Jérôme Bardot, linux-btrfs@vger.kernel.org
On 29.07.24 16:03, Jérôme Bardot wrote:
> 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.
> 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.
>
> thx for your feedback.
This looks like the superblock didn't get written correctly, probably
because of some kind of cache (volatile write cache in case of a disk,
or some other cache in case of Virtualbox).
Ypu could try to mount with -o ro,rescue=usebackuproot and see if one of
the backup roots is still valid.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Virtualbox and btrfs superblock issue
2024-07-29 14:32 ` Johannes Thumshirn
@ 2024-07-29 20:50 ` BARDOT Jérôme
0 siblings, 0 replies; 4+ messages in thread
From: BARDOT Jérôme @ 2024-07-29 20:50 UTC (permalink / raw)
To: Johannes Thumshirn, linux-btrfs@vger.kernel.org
Le 29/07/2024 à 16:32, Johannes Thumshirn a écrit :
> On 29.07.24 16:03, Jérôme Bardot wrote:
>> 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.
>> 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.
>>
>> thx for your feedback.
> This looks like the superblock didn't get written correctly, probably
> because of some kind of cache (volatile write cache in case of a disk,
> or some other cache in case of Virtualbox).
>
> Ypu could try to mount with -o ro,rescue=usebackuproot and see if one of
> the backup roots is still valid.
>
>
I try with the same result, the thing is with a xfs i can came back to
life a disk with the fsck command.
Maybe virtualbox manage better xfs . If it's not only related to vb,
btrfs can be a improve based on my feedback.
(ready to redo with some debug option or whatever, just ask)
For my issue i guess one of my only solution is to use photorec or
similar software.
I will make update here if i achieve my rescue.
thx for your help.
J.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Virtualbox and btrfs superblock issue
2024-07-29 14:02 Virtualbox and btrfs superblock issue Jérôme Bardot
2024-07-29 14:32 ` Johannes Thumshirn
@ 2024-07-29 21:30 ` Qu Wenruo
1 sibling, 0 replies; 4+ messages in thread
From: Qu Wenruo @ 2024-07-29 21:30 UTC (permalink / raw)
To: Jérôme Bardot, linux-btrfs
在 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.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-29 21:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox