btrfs check Causes File Corruption
Hello everyone, I use Btrfs as the file system on my laptop. Yesterday, I was preparing to backup a snapshot to an external hard drive using btrfs send, and the following error occurred: ERROR: send ioctl failed with -5: Input/Output error I used btrfs scrub to scan the disk, and the result was: Error summary:csum=1 Corrected: 0 Uncorrectable: 1 Unverified: 0 Afterwards, I booted a LiveCD and ran: btrfs check --init-csum-tree During the running process, many outputs similar to this appeared: root 1380 inode 5006723 errors 2001, no inode item, link count wrong unresolved ref dir 1164151 index 1566 namelen 28 name filetype 1 errors 4, no inode ref Then I found that the file in the above had disappeared. At this point, I immediately backed up all the existing files and then used: btrfs check --repair btrfs rescue in an attempt to recover the lost files, but was unsuccessful. The current issues are: How do I recover the lost files? Why does btrfs check --init-csum-tree cause file loss? Is this a bug? LiveCD information: Linux ubuntu 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Thank you for your help.
btrfs check Causes File Corruption
Hello everyone, I use Btrfs as the file system on my laptop. Yesterday, I was preparing to backup a snapshot to an external hard drive using btrfs send, and the following error occurred: ERROR: send ioctl failed with -5: Input/Output error I used btrfs scrub to scan the disk, and the result was: Error summary:csum=1 Corrected: 0 Uncorrectable: 1 Unverified: 0 Afterwards, I booted a LiveCD and ran: btrfs check --init-csum-tree During the running process, many outputs similar to this appeared: root 1380 inode 5006723 errors 2001, no inode item, link count wrong unresolved ref dir 1164151 index 1566 namelen 28 name filetype 1 errors 4, no inode ref Then I found that the file in the above had disappeared. At this point, I immediately backed up all the existing files and then used: btrfs check --repair btrfs rescue in an attempt to recover the lost files, but was unsuccessful. The current issues are: How do I recover the lost files? Why does btrfs check --init-csum-tree cause file loss? Is this a bug? LiveCD information: Linux ubuntu 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Thank you for your help.
Re: btrfs check Causes File Corruption
Thanks for your reply. I previously read in the btrfs documentation that "when repairing the file system, it is advisable to choose a newer kernel", so I used Ubuntu's livecd for the repair. >On 20 Aug 2023 17:42 +0800, from longhao.c...@outlook.com (Longhao.Chen): >> LiveCD information: >> >> Linux ubuntu 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC >> Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux > >This mailing list is for users of Debian, where current stable ships a >6.1 series kernel. I'm not saying you can't get any suggestions here >(you might), but you will likely have better luck on some forum for >Ubuntu users, as it appears that the corruption (other than possibly a >single initial checksum error, which may have happened for reasons >related or unrelated to any software) occured from within an Ubuntu >environment; or alternatively, some forum focusing on Btrfs, as that >is the part that appears to have caused problems for you. >
Re: btrfs check Causes File Corruption
I'm sorry, because a long time after I sent the first email, I didn't see it in the web archive. I suspected there was a problem during the sending process, so I sent a second one. I apologize for my mistake. >Hello everyone, I use Btrfs as the file system on my laptop. Yesterday, I was >preparing to backup a snapshot to an external hard drive using btrfs send, and >the following error occurred: > >ERROR: send ioctl failed with -5: Input/Output error > >I used btrfs scrub to scan the disk, and the result was: > >Error summary:csum=1 > >Corrected: 0 > >Uncorrectable: 1 > >Unverified: 0 > >Afterwards, I booted a LiveCD and ran: > >btrfs check --init-csum-tree > >During the running process, many outputs similar to this appeared: > >root 1380 inode 5006723 errors 2001, no inode item, link count wrong >unresolved ref dir 1164151 index 1566 namelen 28 name filetype 1 >errors 4, no inode ref > >Then I found that the file in the above had disappeared. At this >point, I immediately backed up all the existing files and then used: > >btrfs check --repair > >btrfs rescue > >in an attempt to recover the lost files, but was unsuccessful. > >The current issues are: > >How do I recover the lost files? > >Why does btrfs check --init-csum-tree cause file loss? Is this a bug? > >LiveCD information: > >Linux ubuntu 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul >13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux > >Thank you for your help. >
Re: btrfs check Causes File Corruption
Thanks for your reply. The disk is a 1TB Samsung SSD with less than 4TiB written, the SMART is completely normal with no errors. I suspect that this error may have been caused by random bit flipping in the memory (DDR4 non-ECC memory). I just want to fix the checksum error (because the file with the checksum error is not important), so I used the command 'btrfs check --init-csum-tree'. 于 2023年8月20日 GMT+08:00 下午8:12:31, piorunz 写到: >On 20/08/2023 12:11, Longhao.Chen wrote: >> Thanks for your reply. I previously read in the btrfs documentation that >> "when repairing the file system, it is advisable to choose a newer kernel", >> so I used Ubuntu's livecd for the repair. > >First of all, did you found the cause of this unrepairable error? >Is HDD failing? What SMART data say? >You should not repair or use medium which is failing, it may cause >further damage. > >-- >With kindest regards, Piotr. > >⢀⣴⠾⠻⢶⣦⠀ >⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system >⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/ >⠈⠳⣄ >
Re: FW: Grub Error
You can try manually boot the system from the grub command line, like this: https://superuser.com/questions/1237684/how-to-boot-from-grub-shell Then, you can try running 'update-grub'. On August 20, 2023 12:45:50 PM UTC, s.mol...@sbcglobal.net wrote: >Follow-up: I managed to boot into live system. What Do I do now to solve the >problem? > > > >From: s.mol...@sbcglobal.net >Sent: Sunday, August 20, 2023 8:15 AM >To: 'debian-user@lists.debian.org' >Subject: Grub Error > > > >My primary computer is an AMD FM-8320 8-Core Processor.. This morning, when >I booted the system I got this result: > > > >Grub loading > >Welcome to GFUB! > > > >error: no such device; 1d937ccf-2b57-4dcd-97d9-83522d7s04f1. > >error: unknown filesystem. > >grub fescue> > > > >ls results in: > > > ><(hd0) (hd0,msdos8) (hd0,msdos7) (hd0,msdos6) (hd0,msdos5) (hd0,msdos1) >(hd1) (hd1,msdos1) (hd2) (hd2msdos5) (hd2msdos1) (hd3) (hd3msdos5) >(hd3msdos1) > > > >Guidance towards a solution will be greatly appreciated. > > > >Thanks in advance. > > > > > >Stephen P. Molnar, Ph.D. > >https:insilicochemistry.net > >Cell: (614)312-7528 > >Skype: smolnar1 > > >
Re: btrfs check Causes File Corruption
>Why not btrfs check? 'btrfs check' also reported a checksum error. >As already suggested, you might do better looking elsewhere for help. >Perhaps the linux-btrfs mailing list? Thank you for your suggestion, I am preparing to seek help from linux-btrfs mailing list. On August 20, 2023 12:54:01 PM UTC, debian-u...@howorth.org.uk wrote: >"Longhao.Chen" wrote: >> Hello everyone, I use Btrfs as the file system on my laptop. >> Yesterday, I was preparing to backup a snapshot to an external hard >> drive using btrfs send, and the following error occurred: >> >> ERROR: send ioctl failed with -5: Input/Output error > >I use btrfs but don't know much about it :( I certainly know nothing >about btrfs send, but the error seems to suggest perhaps an error with >the send rather than with reading the source? > >> I used btrfs scrub to scan the disk, and the result was: > >Why not btrfs check? > >> Error summary:csum=1 >> >> Corrected: 0 >> >> Uncorrectable: 1 >> >> Unverified: 0 > >OK so that sounds like a hardware problem. > >> Afterwards, I booted a LiveCD and ran: >> >> btrfs check --init-csum-tree >> >> During the running process, many outputs similar to this appeared: >> >> root 1380 inode 5006723 errors 2001, no inode item, link count wrong >> unresolved ref dir 1164151 index 1566 namelen 28 name >> filetype 1 errors 4, no inode ref >> >> Then I found that the file in the above had disappeared. >> At this point, I immediately backed up all the existing files and >> then used: >> >> btrfs check --repair >> >> btrfs rescue >> >> in an attempt to recover the lost files, but was unsuccessful. >> >> The current issues are: >> >> How do I recover the lost files? > >From a backup? I think they're gone from the source. (But what do I >know) > >> Why does btrfs check --init-csum-tree cause file loss? Is this a bug? > >Seems unlikely. Why do you think the command causes the file loss? Why >do you not think the corruption was already there? And did you read the >DANGEROUS description in the docs? > >> LiveCD information: >> >> Linux ubuntu 6.2.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC >> Thu Jul 13 16:27:29 UTC 2 x86_64 x86_64 x86_64 GNU/Linux >> >> Thank you for your help. > >As already suggested, you might do better looking elsewhere for help. >Perhaps the linux-btrfs mailing list? >
Re: btrfs check Causes File Corruption
Only one file was erroneous, but now it's not just the erroneous file that has disappeared, over eight thousand other files have disappeared as well. The disappeared files seem to be those that were recently modified or newly created. I create a snapshot every day, and each snapshot is kept for a month. Those over eight thousand files have disappeared from all the snapshots. On August 20, 2023 5:03:12 PM UTC, piorunz wrote: >Ok. You said file with error has disappeared from the system. Is that >still the case? If there anything you need to "recover"? If file with >error is already gone, then you should have no more errors while reading >the drive to backup it. > > >On 20/08/2023 13:24, Longhao.Chen wrote: >> Thanks for your reply. >> >> The disk is a 1TB Samsung SSD with less than 4TiB written, the SMART is >> completely normal with no errors. I suspect that this error may have been >> caused by random bit flipping in the memory (DDR4 non-ECC memory). >> >> I just want to fix the checksum error (because the file with the checksum >> error is not important), so I used the command 'btrfs check >> --init-csum-tree'. >> >> 于 2023年8月20日 GMT+08:00 下午8:12:31, piorunz 写到: >>> On 20/08/2023 12:11, Longhao.Chen wrote: >>>> Thanks for your reply. I previously read in the btrfs documentation that >>>> "when repairing the file system, it is advisable to choose a newer >>>> kernel", so I used Ubuntu's livecd for the repair. >>> >>> First of all, did you found the cause of this unrepairable error? >>> Is HDD failing? What SMART data say? >>> You should not repair or use medium which is failing, it may cause >>> further damage. >>> >>> -- >>> With kindest regards, Piotr. >>> >>> ⢀⣴⠾⠻⢶⣦⠀ >>> ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system >>> ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/ >>> ⠈⠳⣄ >>> >> > >-- >With kindest regards, Piotr. > >⢀⣴⠾⠻⢶⣦⠀ >⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system >⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/ >⠈⠳⣄ >